cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Collen <colle...@umn.edu>
Subject Re: Exception: Saxon requires an XML parser that reports the QName of each element
Date Fri, 24 Jun 2005 19:26:51 GMT
CC:ing this to the dev list, might be useful for people there to see, also.

Regards,
Tony

Carlos M. S. Bento Nogueira wrote:
> Hello cocoon users!
> I'm forwarding a msg i sent to the mulberrytech xsl list. Although i 
> believed this is a xsl question, from Michael Kay words i believe some 
> help is necessary from the cocoon list as well.
> Note that i'm using a xsl files from the cforms examples provided with 
> cocoon.
> 
> TIA,
> CN
> 
>>
>> 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...
> 
> 
> 
> Michael Kay stated the following :
> 
>> ---------- Forwarded message ----------
>> Date: Fri, 24 Jun 2005 08:55:19 +0100
>> From: Michael Kay <mike@saxonica.com>
>> Reply-To: xsl-list@lists.mulberrytech.com
>> To: xsl-list@lists.mulberrytech.com
>> Subject: RE: [xsl] Exception: Saxon requires an XML parser that 
>> reports the QName of each element
>>
>> 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/
>>



Mime
View raw message