This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Namespace problems
- To: xsl-list at mulberrytech dot com
- Subject: Re: Namespace problems
- From: David Carlisle <davidc at nag dot co dot uk>
- Date: Fri, 1 Sep 2000 10:10:24 GMT
- CC: "Pawson, David" <DPawson at rnib dot org dot uk>
- References: <9B66BBD37D5DD411B8CE00508B69700F03C062@pborolocal.rnib.org.uk>
- Reply-To: xsl-list at mulberrytech dot com
> The result is, confusingly,
> **** Namespace URI is: Null Namespace
> Declared on element: //html***
isn't that what you'd expect?
With your modified DTD your source document is equivalent to
<html
xmlns:oeb="http://openebook.org/namespaces/oeb-document/1.0/">
...
so the html is in the null namespace, and the oeb prefix is declared but
not used.
With the original DTD your source document is equivalent to
<html
xmlns="http://openebook.org/namespaces/oeb-document/1.0/">
...
so the html element is in the OEB namespace and since you can only refer
to namespaced elements in xpath by using a prefix, your stylesheet has
to look like
<xsl:stylesheet
xmlns:oeb="http://openebook.org/namespaces/oeb-document/1.0/"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
>
...
<xsl:template match="oeb:html">
....
David
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list