Subject: Re: Saxon errors
From: Kamal Bhatt <kbhatt@xxxxxxxxx>
Date: Thu, 10 May 2007 10:21:37 +1000
|
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 "<" for "<" in
attribute values.
Error on line 9 of file:convert.xsl:
FODC0005: org.xml.sax.SAXParseException: Use "<" 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 < and ">" to > .
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
|