|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: removing duplicate children
I don't think this made it through - apologies for the duplicate if it
did.
On Friday, December 01, 2000, 2:10:41 AM, Cliff wrote:
> I have a chunk of script that looks something like:
> <xsl:template match="call">
> <xsl:text>void </xsl:text>
> <xsl:apply-templates select="name"/>
> <xsl:text>() throws </xsl:text>
> <xsl:for-each select=".//throws">
> <xsl:text>, </xsl:text>
> <xsl:apply-template select="."/>
> </xsl:for-each>
> </xsl:template>
How about
<xsl:template match="call">
<xsl:text>void </xsl:text>
<xsl:apply-templates select="name"/>
<xsl:text>() throws </xsl:text>
<xsl:for-each select=".//throws[not(parent::call/call/throws = .)]">
<xsl:text>, </xsl:text>
<xsl:apply-templates />
</xsl:for-each>
</xsl:template>
The xsl:for-each means 'select any throws elements whose parent does
not have a call child with a throws element of the same value'
Ian
--
Chief Technology Officer
Calaba - Discovering Technology
Tel: +44 (0)20 7494 1851
GSM: +44 (0)77 7964 9112
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








