Re: [xsl] How to replace a reference to a tag by the tag itself?

Subject: Re: [xsl] How to replace a reference to a tag by the tag itself?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 6 Aug 2009 13:49:35 +0100
well doing a full job is complicated as the actual schema may be
skattered opver multiple xml files, but assuming that isn't thecase,
something like

<xsl:key name="g" match="xsd:group[@name]" use="@name"/>


then

<xsl:template match="xsd:group[@ref]">
  <xsl:apply-templates select="key('g',@ref)/*"/>
</xsl:template>

together with an identity template to copy the rest of the stuff.

Of course xslt never handles tags, despite the subject line.

David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________

Current Thread