mike at saxonica.com
Wed Jul 20 09:20:40 PDT 2011
On 20/07/2011 17:01, David Lee wrote:
> Thanks, I will try this.
> I am using html tag but in the xhtml namespace ...
> <html xmlns="http://www.w3.org/1999/xhtml">
> But in the script tag its obviously not expanding the&
Don't use the XHTML namespace if you're trying to serialize as HTML.
Generally most of the special tricks used by an HTML serializer work
only on elements that are in no namespace.
> I will try the CDATA trick.
> David A. Lee
> dlee at calldei.com
> -----Original Message-----
> From: Ghislain Fourny [mailto:gfourny at inf.ethz.ch]
> Sent: Wednesday, July 20, 2011 11:58 AM
> To: David Lee
> Cc:<talk at x-query.com>
> Hi David,
> I am assuming you are using HTML, not XHTML, since if I am correct, XHTML
> would recognize the& entity reference. In HTML, entity references in
> the script tag are not parsed. In XHTML they are.
> I guess a possibility could be to use a CDATA section that is ignored by
> (: code generation here :)
> // ]]></cdata-section>
> and to tell the XQuery engine to serialize the contents of the element
> <cdata-section/> using a CDATA section, using the cdata-section-elements XML
> output method:
> will be extra CDATA tags that the browser will not understand.
> Does this help?
> Kind regards,
> talk at x-query.com
More information about the talk