This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: ampersand in data
- To: xsl-list at mulberrytech dot com
- Subject: Re: ampersand in data
- From: Mike Brown <mike at skew dot org>
- Date: Fri, 21 Jul 2000 14:01:28 -0700 (PDT)
- Reply-To: xsl-list at mulberrytech dot com
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