This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: 2.1 Must Allow Matching on Default Namespace Without Explicit Prefix
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: Re: [xsl] 2.1 Must Allow Matching on Default Namespace Without Explicit Prefix
- From: "Dave Hartnoll" <themainman at 3b2 dot com>
- Date: Thu, 22 Feb 2001 13:02:03 -0000
- References: <BNEMICIEADHDDOIKLHNCMELFDIAA.elenz@xyzfind.com>
- Reply-To: xsl-list at lists dot mulberrytech dot com
> okay, so something like:
>
> <xsl:stylesheet match-on-default="yes"...
I haven't thought through all the practicalities of this, but how about
something along the lines of:
<xsl:stylesheet xmlns:xsl="..." xsl:xmlns="some_uri" ...
This could then be applied to individual templates or any other element if
needed, and would be expected to apply to all XPaths in the element's scope
unless overridden by a descendent element:
<xsl:template match="/foo/bar" xsl:xmlns="some_uri">
<!-- count baz children in the some_uri namespace -->
<xsl:value-of select="count(baz)"/>
<!-- count baz children in the null namespace -->
<xsl:value-of select="count(baz)" xsl:xmlns=""/>
</xsl:template>
I can see that the use of xsl:'xmlns' might cause parser compatibility
problems, but some other name like xsl:xpathns would work almost as well.
Dave Hartnoll.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list