xsl-list
[Top] [All Lists]

RE: [xsl] NCName, QName and colons

2010-02-05 23:34:40

Saxon is telling you that the message comes from the XML parser, so if you
think that the error messages from the XML parser can be improved, I'm sure
the authors of the parser in question would appreciate the feedback.

Regards,

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

-----Original Message-----
From: Justin Johansson [mailto:procode(_at_)adam(_dot_)com(_dot_)au] 
Sent: 06 February 2010 03:05
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] NCName, QName and colons

This seems rather odd.

Running an XSLT identity transform over the following source 
document with Saxon 9b produces the error underneath:

<?xml version="1.0" encoding="UTF-8" ?>

<:a:apple xmlns:a="foo">
    <banana/>
</:a:apple>

Error on line 3 column 25 of foo.xml:
  SXXP0003: Error reported by XML parser: The prefix ":a" for 
element ":a:apple" is not bound.TransformerException: 
net.sf.saxon.trans.XPathException: 
org.xml.sax.SAXParseException: The prefix ":a" for element 
":a:apple" is not bound.

Obviously the source document is not valid XML but the error 
message is confusing.

Since when was
1) a colon character allowed to start an NCName which a prefix is, and
2) a QName allowed to contain 2 colon characters which the 
error message suggests?

Cheers

Justin Johansson



--~------------------------------------------------------------------
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>
--~--



--~------------------------------------------------------------------
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>
--~--