|
Subject: Re: [xsl] XPath selecting chain of following siblings of the same name From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Fri, 09 Mar 2007 16:05:10 +0100 |
I have following input XML:
<root> <a id="1"/> <a id="2"/> <b/> <d/> <g/> <a id="3"/> <a id="4"/> <a id="5"/> <x/> <a id="6"/> <a id="7"/> </root>
and I'm trying to create XSLT 1.0 script, which would nest "uninterrupted" sibling groups of 'a' elements into 'a-block' elements
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="root">
<xsl:copy>
<xsl:apply-templates select="*"/>
</xsl:copy>
</xsl:template><xsl:template match="a" mode="copy">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template><xsl:template match="* | @*">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| [xsl] XPath selecting chain of foll, Kolací Tomáš | Thread | Re: [xsl] XPath selecting chain of , David Carlisle |
| Re: [xsl] Schema-aware validation o, David Carlisle | Date | Re: [xsl] XPath selecting chain of , David Carlisle |
| Month |