xsl-list
[Top] [All Lists]

Re: [xsl] Xalan producing error - (Location of error unknown)org.xml.sax.SAXException: Can not resolve namespace prefix: #all

2014-01-07 13:29:19
On 14-01-07 11:26 AM, Graydon wrote:
On Tue, Jan 07, 2014 at 01:09:00PM -0600, a kusa scripsit:
When I try to run transformation using xalan, I keep getting this error:

(Location of error unknown)org.xml.sax.SAXException: Can not resolve
namespace prefix: #all

I do have exclude-result-prefixes in my stylesheet and I use XSLT2.0.

How do I prevent this error?!

By using an XSLT 2.0 processor -- Xalan is strictly 1.0, see
<http://xml.apache.org/xalan-j/> -- or by using an XSLT 1.0 stylesheet
that doesn't try to use a 2.0 construct like #all.

Especially since #all is a keyword for _modes_, not prefixes; if you've
got something in your code where a namespace prefix starts with an
octothorpe (#) that's not going to work anywhere, prefixes can have the
characters of the Name production except for

Surely #all is an allowed value for exclude-result-prefixes? It's in the example code here:

<http://www.w3.org/TR/xslt20/#lre-namespaces>

Cheers,
Martin

the colon (:).  Name
production start characters don't include #.

-- Graydon

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