Subject: Re: ampersand in data
From: Mike Brown <mike@xxxxxxxx>
Date: Fri, 21 Jul 2000 14:01:28 -0700 (PDT)
|
John Gethoefer wrote:
> I am trying to transform XML data such as follows:
>
> <Name>Jack & Jill</Name>
That's not XML, because it's not well-formed.
Any of these are XML:
<Name>Jack & Jill</Name>
<Name>Jack & Jill</Name>
<Name>Jack " Jill</Name>
<Name><![CDATA[Jack & Jill]]></Name>
If you don't make your XML well-formed, it will never get past
the parser, which is what tells the XSLT parser what logical
structures (elements, attributes, etc) are in the document.
The parser requires well-formed XML, because otherwise how is
it supposed to know when your markup characters ("&" "<" ">"
and sometimes "'" """) are really just ordinary character data?
-Mike
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|