[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: me escape logic escapes me

Subject: RE: me escape logic escapes me
From: "Evan Lenz" <elenz@xxxxxxxxxxx>
Date: Tue, 22 Aug 2000 16:27:11 -0700
escape in xsl
The parser is concerned with breaking an XML document into its respective
parts in order that it can be used to build a source tree.  So it's not the
parser.  It's whatever output handler your XSLT processor is invoking to
serialize the result tree into an XML document.  It knows that if the output
is to be well-formed XML, it must always escape & and <, except within a
CDATA section, comment, or processing instruction.  Read about it in the XML
spec: http://www.w3.org/TR/1998/REC-xml-19980210#dt-chardata

To get around this for some perverse reason, try:

<xsl:text disable-output-escaping="yes">&amp; &lt; etc.</xsl:text>


Otherwise, if your output is HTML, indicate so with this top-level element:

<xsl:output method="html"/>


But I'm not even sure if you're supposed to do that in HTML anyway.  Most of
the time, just trust the output handler.  It should understand what's
allowed and what's not allowed.

Hope this helps!

Evan Lenz
elenz@xxxxxxxxxxx
http://www.xyzfind.com


-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Aaron Miller
Sent: Tuesday, August 22, 2000 1:51 PM
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: me escape logic escapes me


Hi all,

I've noticed that when I use &amp; entity as part of a value in a
<xsl:attribute name="src"> node, nameley for a dynamic URL with encoded
parameters, the parser refuses to change it to a "&" character. Fortunately,
it doesn't interfere with the loading of the URL in the src attribute in the
output HTML, but I am curious as to why I can't produce "&" within an
attribute... I have tried double escaping it as well, to no avail, and I
have also tried <![CDATA]]> and <xsl:text>, both of which output literal
characters, but both of which become escaped in the attribute of an HTML
tag. What exactly are the rules forthis or what does the spec say about it
(or is someone gonig to tell me to go read my parser documentation? (which i
eventually will).?

aaron


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.