This is an XSLT FAQ: the default namespace does not apply to names in path expressions. You have to use an explicit prefix to match a namespaced name, for example /n:doc/n:foo
In XSLT 2.0 you can set the xpath-default-namespace attribute to provide a default namespace for names in path expressions.
Michael Kay
-----Original Message-----
From: [] On Behalf Of Gil Tayar
Sent: 09 December 2003 18:59
Subject: [saxon] Specifying the default namespace for the template match

I have the following source document:
<n:doc xmlns:n="http://n">
    <n:foo>Some text</n:foo>
Now, the spreadsheet:
<xsl:stylesheet xmlns:stylesheet="..." xmlns="http://n">
    <xsl:template match="/doc/foo">
I would have expected that the "Found!" message would have been outputted, but it didn't. The following did work:
<xsl:stylesheet xmlns:stylesheet="..." xmlns:n="http://n">
    <xsl:template match="/n:doc/n:foo">
Is there something wrong in my understanding, or is this a bug?
Gil Tayar
Chief Technology Officer
Business: +1 (212) 563 2643
Mobile:     +1 (917) 509 9663