This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: AW: name space troubles
- From: "Hunsberger, Peter" <Peter dot Hunsberger at stjude dot org>
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Date: Mon, 27 May 2002 09:44:11 -0500
- Subject: RE: AW: [xsl] name space troubles
- Reply-to: xsl-list at lists dot mulberrytech dot com
>
> take the following example:
>
> <book xmlns="http://www.bookstore.com/book">
> <title/>
> <para/>
> <book>
>
> How would I come to this result:
>
> <book>
> <title/>
> <para/>
> </book>
Roman,
there are many examples of doing various identity transforms in the
archives. Basically, you just want the local name of a given element or
attribute. Thus, for this specific case:
<xsl:template match="*">
<xsl:element name="{local-name()}">
<xsl:apply-templates select="*"/>
</xsl:element>
</xsl:template>
Adding matchers and selectors for attributes and text nodes are likely
required for any real life example:
match ="* | @* | text()"
...
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list