|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] a problem of mine....
hello everyone:
i'm a new guy to this heavenly place.
and now I have a problem with XSL, and wished to be helped.
the code is below: I'm so wondering with XPath Language: if .... can u give me a help??
xml:
<?xml version="1.0" encoding="GB2312"?>
<!DOCTYPE clone SYSTEM "simple.dtd">
<?xml:stylesheet type="text/xsl" href="simple.xsl"?>
<clone>
<rule>
<piece title="false" keyword="true">aaa</piece>
</rule>
<rule>
<piece title="false" keyword="true">bbb</piece>
</rule>
</clone>
XSL:
<?xsl version="1.0" encoding="GB2312"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" xmlns="http://www.w3.org/TR/REC-html40" result-ns="">
<xsl:template><xsl:apply-templates/></xsl:template>
<xsl:template match = "/">
<xsl:apply-templates select="clone"/>
</xsl:template>
<xsl:template match = "clone">
<xsl:for-each select="rule">
<xsl:for-each select="piece">
<xsl:value-of/>
<xsl:if test="{@title=true}">
<input type=checkbox checked>
</xsl:if>
<xsl:if test="{@keyword=true}">
<input type=checkbox checked>
</xsl:if>
</xsl:attribute>
</xsl:for-each>
<hr/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








