xsl-list
[Top] [All Lists]

RE: Answers to review questions in "Beginning XSLT": Chapter 8

2003-03-19 12:43:36
Americo wrote:
so, the new templates could be the normal identity template:

<xsl:template match="@* | node()">
 <xsl:copy>
  <xsl:apply-templates select="@* | node()"/>
 </xsl:copy>
</xsl:template>

But this rases another question that has been bugging me for awaile, how
can I match ANY element of no namespace?
If I do <xsl:template match="*"> I'll match any node even those with a
namespace

The one I remember to solve this is a generic <xsl:template match="*">
and several <xsl:template match="x:*" xmlns:x="..."/> one for each
namespace definition that I want to skip

Is there any other way of doing this???

How about <xsl:template match="*[namespace-uri()='']"> ?

Lars


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list