Subject: AW: [xsl] grouping problem From: "Szabo, Patrick \(LNG-VIE\)" <patrick.szabo@xxxxxxxxxxxxx> Date: Thu, 17 Feb 2011 11:12:58 +0100 |
OMG -.- Thanks Probably would have never found that typo -.- . . . . . . . . . . . . . . . . . . . . . . . . . . Patrick Szabo XSLT-Entwickler LexisNexis Marxergasse 25, 1030 Wien mailto:patrick.szabo@xxxxxxxxxxxxx Tel.: +43 (1) 534 52 - 1573 Fax: +43 (1) 534 52 - 146 -----UrsprC<ngliche Nachricht----- Von: Michael Kay [mailto:mike@xxxxxxxxxxxx] Gesendet: Donnerstag, 17. Februar 2011 11:11 An: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Betreff: Re: [xsl] grouping problem Currently your group-starting-with pattern isn't matching anything because the elements with @typ='jur_start' are named "abatz" rather than "absatz". Michael Kay Saxonica > Hi, On 17/02/2011 09:59, Szabo, Patrick (LNG-VIE) wrote: > > I'm using XSLT 2.0 and Saxon 9 > > I got the following input: > > <einzelvorschrift> > <zaehlung normiert="Art. 2" nr="--TODO--" ordnungszeichen="--TODO--">Art. 2</zaehlung> > <abatz typ="jur_start"><gldsym>Artikel 2.</gldsym> (1) Csterreich ist ein Bundesstaat.</abatz> > <abatz typ="jur_start">(2) Der Bundesstaat wird gebildet aus den selbstC$ndigen LC$ndern:</abatz> > <absatz typ="erltext" ct="text" halign="j">Burgenland, KC$rnten, NiederC6sterreich, OberC6sterreich,</absatz> > <abatz typ="jur_start">(3) Cnderungen im Bestand der</abatz> > </einzelvorschrift> > > I did the following: > > <xsl:template match="einzelvorschrift"> > <xsl:copy> > <xsl:apply-templates select="zaehlung"/> > <xsl:for-each-group select="* except zaehlung" group-starting-with="absatz[@typ='jur_start']"> > <jurabsatz> > <xsl:apply-templates select="current-group()"/> > </jurabsatz> > </xsl:for-each-group> > </xsl:copy> > </xsl:template> > > Output: > > <einzelvorschrift> > <zaehlung normiert="Art. 2" nr="--TODO--" ordnungszeichen="--TODO--">Art. 2</zaehlung> > <jurabsatz> > <abatz typ="jur_start"><gldsym>Artikel 2.</gldsym> (1) Csterreich ist ein Bundesstaat.</abatz> > <abatz typ="jur_start">(2) Der Bundesstaat wird gebildet aus den selbstC$ndigen LC$ndern:</abatz> > <absatz typ="erltext" ct="text" halign="j">Burgenland, KC$rnten, NiederC6sterreich, OberC6sterreich,</absatz> > <abatz typ="jur_start">(3) Cnderungen im Bestand der</abatz> > <jurabsatz> > </einzelvorschrift> > > Shouldn't each absatz[@typ='jur_start'] be wrapped in his own jurabsatz !? > How can i do that ?! > > Kind regards > > > . . . . . . . . . . . . . . . . . . . . . . . . . . > Patrick Szabo > XSLT-Entwickler > LexisNexis > Marxergasse 25, 1030 Wien > > mailto:patrick.szabo@xxxxxxxxxxxxx > Tel.: +43 (1) 534 52 - 1573 > Fax: +43 (1) 534 52 - 146
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] grouping problem, Michael Kay | Thread | Re: AW: [xsl] grouping problem, Piet van Oostrum |
Re: [xsl] grouping problem, Michael Kay | Date | Re: [xsl] grouping problem, Vasu Chakkera |
Month |