This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: repeating elements



----- Original Message -----
From: "Joeri Belis" <joeri.belis@nollekens.be>


> How can i copy everything between the <cell> tag more than once?
>
> <?xml version="1.0"?>
> <row>
>   <cell>
>     <data atr="1">9</data>
>     <namedcell name="A"/>
>     <data atr="2">9</data>
>     <namedcell name="B"/>
>   </cell>
> </row>
>


u could always use the <xsl:copy-of select="cell"/> tag... multiple times
either with a matching template, named template, or xsl:for-each.....u could
also place what u want repeated in a variable <xsl:variable name="cellstuff"
select="cell"/> and manipulate that.

there are also various discussions about repeat template in the archives of
this list.

cheers, jim fuller

> Should become:
>
> <?xml version="1.0"?>
> <row>
>   <cell>
>     <data atr="1">9</data>
>     <namedcell name="A"/>
>     <data atr="2">9</data>
>     <namedcell name="B"/>
>     <data atr="1">9</data>
>     <namedcell name="A"/>
>     <data atr="2">9</data>
>     <namedcell name="B"/>
>   </cell>
> </row>
>
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]