How to re-parse information to a different purpose with XSL?

Subject: How to re-parse information to a different purpose with XSL?
From: zze-minitel2001 balr002 <minitel2001.balr002@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 2 Jun 1999 18:28:15 +0200
I'm novice in XSL and I have the following problem when converting data
described in xml to generated HTML.
In my page, I want, first to display the names listItem1, then display
listItem2, then display again info on item1 (to put buttons for example).
The only solution I've found is this one but it's not very convenient for me
and I would like to know if there is another one:
 <!-- Root xsl:template - start processing here -->
 <xsl:template match="/">
    <!-- Here we build the table of item1 and the item2 info -->
    <xsl:apply-templates select="/data/*"/>
    <!-- Then I want to parse all item1 again, but with another rule! -->
    <xsl:apply-templates select="//listItem1/item1/*"/>
<!-- For the first pass -->
<xsl:template match="listItem1">
    <TABLE border="double">
    <xsl:apply-templates select="item1" />
<xsl:template match="item1">
    <TD><xsl:value-of select="name"/></TD>
<xsl:template match="listItem2">
<!-- Rules for the second pass -->
<xsl:template match="item1/id">
    <INPUT type="submit" >
        <xsl:attribute name="name"><xsl:value-of
        <xsl:attribute name="value"><xsl:value-of
<!-- Rule to avoid dislpaying the name during the second pass -->
<xsl:template match="name">


Simon Bécot 
Ingénieur développement Softeam -
<>  -
- CNET Rennes - 
mailto:simon.becot@xxxxxxxxxx <mailto:simon.becot@xxxxxxxxxx> 


 XSL-List info and archive:

Current Thread