[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: NCName, QName and colons

Subject: Re: NCName, QName and colons
From: Justin Johansson <procode@xxxxxxxxxxx>
Date: Mon, 22 Feb 2010 23:13:25 +1030
Re:  NCName
Michael Kay wrote:
"XML documents operated on by XPath must conform to the XML Namespaces
Recommendation [XML Names]."
Is this rule binding on an XSLT 2 processor as well (by virtue of
its association with XPath 2)?

Source document:



<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">

<xsl:output method="xml" omit-xml-declaration="yes"/>

   <xsl:template match="node()|@*">
           <xsl:apply-templates select="node()|@*"/>




The error messages that I posted when initiating this thread a few weeks ago gave me a forensic clue that the above might work (i.e. without an error occurring).

Justin Johansson

<original message> 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">

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?


Justin Johansson
</original message>

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.