XSLT namespace and XML doc without one - how does it work



I have an XML document that defines a default namespace i.e.



<rootnode xmlns="..."><book>...</book>


None of the tags in this document carry any prefix.


Now I am looking at a XSLT document that is supposedly transforming the above document and it does define a namespace and includes patterns for nodes using this namespace prefix "foo:book".



<xsl:stylesheet xmlns:foo="...">


How does it work..i.e can this XSLT really match the tags using namespace prefix to tags in XML doc that do not have that prefix ?


The only thing I find intriguing is the URL for namespace in both XML and XSLT is exactly the same but not sure if that is relevant.


Can anyone explain this?


No comments:

Post a Comment