Hi all,
I have an XML document that I need to reformat using XSL, basically changing all the attribute="value" stuff to their own child elements. This works great EXCEPT & quot ; and & #34 ; get changed to " (34 is ASCII for "
while & amp ; remains as-is.
Why? Aren't < > & " and ' forbidden in XML aside from their special meanings? So why would an XSL transform screw with the entities? Better yet, why does it only screw with HALF of them?
I've tried
and
to try to work around this, but it doesn't make any difference.
I've done this with different parsers, too, and the behavior is the same. What's up with this?
(I've seen this included in other questions here, but this peculiarity itself hasn't been addressed.)
--harebrain
I have an XML document that I need to reformat using XSL, basically changing all the attribute="value" stuff to their own child elements. This works great EXCEPT & quot ; and & #34 ; get changed to " (34 is ASCII for "
Why? Aren't < > & " and ' forbidden in XML aside from their special meanings? So why would an XSL transform screw with the entities? Better yet, why does it only screw with HALF of them?
I've tried
Code:
<xsl:value-of select="." disable-output-escaping="no"/>
Code:
<xsl:value-of select="." disable-output-escaping="yes"/>
I've done this with different parsers, too, and the behavior is the same. What's up with this?
(I've seen this included in other questions here, but this peculiarity itself hasn't been addressed.)
--harebrain