This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
null and default namespace
- To: <XSL-List at lists dot mulberrytech dot com>
- Subject: [xsl] null and default namespace
- From: "Torsten Curdt" <tcurdt at dff dot st>
- Date: Tue, 30 Oct 2001 10:31:23 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
I am still a bit confused about namespaces in combination
with the default or null namespace. Hopefully someone
can give me an enlightenment...
Let's assume I have the following XML document:
1)
<?xml version="1.0" ?>
<bla:root bla:xmlns="http://bla.org">
<bla:title/>
<title/>
</bla:root>
I assume <title> is in the null namespace because no
default namespace is defined.
(Will this result in a SAX event like this:
startElement(null,"","title",null); or
startElement("","","title",null); or
??)
2)
<?xml version="1.0" ?>
<bla:root bla:xmlns="http://bla.org" xmlns="http://bla.org">
<bla:title/>
<title/>
</bla:root>
Now the default namespace is the same as for prefix bla.
I assume <title> is the same as <bla:title> now. So the
following xsl template should match both:
...
<xsl:match pattern="bla:title">
...
<xsl:match>
...
as long as the namespace is defined as bla:xmlns="http://bla.org".
Is this correct?
Now I am wondering how the SAX event differ for the two
tags. Do they look like this?
startElement("http://bla.org","bla","bla:title",null);
startElement("http://bla.org","","title",null);
Thanks
--
Torsten
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list