Subject: Re: [xsl] Selecting non-duplicate nodes From: "Mark" <mark@xxxxxxxxxxxx> Date: Wed, 12 Oct 2011 11:14:02 -0700 |
Thanks for your help, Mark
My question now is: how can I change this stylesheet so that for the listed input, no <FormatButtons> in the output contains more than one copy of a <Format> with the same attribute name and value? That is, where the current output is, for example:
<FormatPage souvenir-sheet="365"> <FormatButtons> <Formats se-tenant="365"/> <Formats se-tenant="365"/> <Formats coupon="367"/> <Formats coupon="368"/> </FormatButtons> </FormatPage>
<xsl:template match="FormatButtons"> <xsl:copy> <xsl:for-each-group select="Formats" group-by="string-join( for $i in 1 to count(@*) return concat(name(@*[$i]), '=', @*[$i]), ' ')"> <xsl:apply-templates select="."/> </xsl:for-each-group> </xsl:copy> </xsl:template>
-- _______________________________________________________________ Michael M|ller-Hillebrand: Dokumentation Technology Adobe Certified Expert, FrameMaker Consulting and Training, FrameScript, XML/XSL, Unicode Blog [de]: http://cap-studio.de/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Selecting non-duplicate n, Michael Müller-Hille | Thread | Fw: [xsl] Selecting non-duplicate n, Mark |
Re: [xsl] Selecting non-duplicate n, Mark | Date | Re: [xsl] XSLT vs Schematron Decisi, Eliot Kimber |
Month |