RE: [xsl] Exception: Saxon requires an XML parser that reports the QName of each element

Subject: RE: [xsl] Exception: Saxon requires an XML parser that reports the QName of each element
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 24 Jun 2005 08:55:19 +0100
Interesting.

Ignore the advice to use escape-uri(), it's irrelevant.

The SAX2 specification defines the method (in class ContentHandler)

	startElement(String uri, String localName, String qName, Attributes
atts)

and states that if the namespaces-prefixes property is false (which it is),
then the qName argument is optional. All mainstream XML parsers, however,
supply the qName attribute, and since it would be quite expensive for Saxon
to remember all the namespace prefixes just in case the qName is omitted
(and quite hard to find a parser to test this against), Saxon instead relies
on the parser supplying this argument, and reports a failure if it is not
present.

To get to the bottom of this we need to find out what the "XML parser" is.
The chances are that it's not a real XML parser, but some kind of filter
that's filtering the events from the real XML parser. Perhaps it can be
easily changed to report the qName.

I'm afraid I don't know enough about Cocoon to advise on how to investigate
this further.

Michael Kay
http://www.saxonica.com/

 

> -----Original Message-----
> From: Carlos M. S. Bento Nogueira [mailto:cmsbn@xxxxxxxxxxxxxxxxx] 
> Sent: 23 June 2005 17:57
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] Exception: Saxon requires an XML parser that 
> reports the QName of each element
> 
> Hello xsl users.
> 
> I'm using saxon8 with cocoon 2.1.7. and i can't get rid of 
> the following 
> exception:
> org.xml.sax.SAXException: Saxon requires an XML parser that 
> reports the 
> QName of each element
> 
> Browsing the web and i found this never answered post in the cocoon 
> mailing list:
> http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=103799087924525&w=2
> 
> and an incomplete tip to solve the problem at:
> http://xmlfr.org/communautes/dev/listes/dev/2004/01/0034.html
> 
> When and how should i use the fn:escape-uri ?? I believe this 
> is a pure 
> xsl problem so i posted this question here.
> 
> TIA,
> CarlosN.
> 
> ps: No i can't use other parser...

Current Thread