[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Hello,
Any help is appreciated...
Please find enclosed the xsl file which looks up the given input XML file to produce the html output file. I want to know how to avoid repitition of Parameter P1 in my output html file. I'm not sure how to use the "concat" and "contains" functions and couldn't find help on the web regarding the same.. I'm using Saxon6_5_2, if that helps! I would appreciate if you can throw some light!
Thank you.
Raghava
XSL file:
------------
<xsl:variable name="total" > </xsl:variable>
Parameters are: <br/>
<xsl:for-each select="Parent">
<xsl:for-each select="Class/Parameter">
<xsl:variable name="pNam" select="@Name" />
<xsl:choose>
<xsl:when test="contains($total,$pNam)" >
Present!
</xsl:when>
<xsl:otherwise>
Absent:
<xsl:value-of name="$total" select="concat($total, '_', $pNam, '_')" /> <br/>
<xsl:value-of select="@Name" /> <br/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:for-each>
_________________________________________________________________
Surf the Web without missing calls! Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
[xsl] Avoid repitition of XML data at different nodes??
Subject: [xsl] Avoid repitition of XML data at different nodes?? From: "Raghava Rao" <call_raghava@xxxxxxxxxxx> Date: Wed, 16 Oct 2002 17:44:42 +0000 |
Hello,
Any help is appreciated...
Please find enclosed the xsl file which looks up the given input XML file to produce the html output file. I want to know how to avoid repitition of Parameter P1 in my output html file. I'm not sure how to use the "concat" and "contains" functions and couldn't find help on the web regarding the same.. I'm using Saxon6_5_2, if that helps! I would appreciate if you can throw some light!
Thank you.
Raghava
Input XML file: -------------------- <Parent> <Class> <Parameter Name="P1" Type="str" /> <Parameter Name="P2" Type="int" /> </Class> <Class> <Parameter Name="P3" Type="long" /> <Parameter Name="P1" Type="str" /> </Class> </Parent>
XSL file:
------------
<xsl:variable name="total" > </xsl:variable>
Parameters are: <br/>
<xsl:for-each select="Parent">
<xsl:for-each select="Class/Parameter">
<xsl:variable name="pNam" select="@Name" />
<xsl:choose>
<xsl:when test="contains($total,$pNam)" >
Present!
</xsl:when>
<xsl:otherwise>
Absent:
<xsl:value-of name="$total" select="concat($total, '_', $pNam, '_')" /> <br/>
<xsl:value-of select="@Name" /> <br/>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:for-each>
Output html file: ------------------- Parameters are: Absent: P1 Absent: P2 Absent: P3 Present! -----------xxxxxxxxxxxxxxxxxxxxxx-------------
_________________________________________________________________
Surf the Web without missing calls! Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] flattening html table wit, Graham Seaman | Thread | Re: [xsl] Avoid repitition of XML d, Joerg Heinicke |
Re: [xsl] xsl:sort ... jeff comes b, Daniel Veillard | Date | [xsl] Re: Depth of an XML file usin, Dimitre Novatchev |
Month |