NCName, QName and colons
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?
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format