xsl-list
[Top] [All Lists]

Re: [xsl] Saxon errors

2007-05-09 17:14:39
Rob Newman wrote:
Hi All,

I am trying to parse a file (1.xml) that has the form:

1 <pfarr name="<?xml version="1.0" encoding="iso-8859-1"?>">



When I run Saxon (version 8.9J), I get the following errors:

saxon -o output.xml -s summary.xml convert.xsl
Error on line 1 of file: 1.xml:
SXXP0003: Error reported by XML parser: Use "&lt;" for "<" in attribute values.
Error on line 9 of file:convert.xsl:
FODC0005: org.xml.sax.SAXParseException: Use "&lt;" for "<" in attribute values.

No new (output.xml) file gets created. Should I just trash that header line (<pfarr name="<?xml version="1.0" encoding="iso-8859-1"?>">) if that is the problem?


In your input, change "<" to &lt; and ">" to &gt; .

You cannot use < and > in XML data (unless it is enclosed in CDATA "tags"). Actually, you probably could use < in some circumstances, but it is best to play it safe.

--
Kamal Bhatt


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>