[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Multi-part search XPath expressions.
On Sep 11, 2004, at 12:50 AM, David Adams wrote:
I'm still trying to get my head around the language and am now lead into wondering about subroutines. Someone else can correct me if I'm off a bit (I'm still learning myself), but you probably need to think about stuff like the following. I'm adding some css-styling-friendly stuff to the code. <xsl:template match="Australian_Birds"> <h1>Birds</h1> <div id="live"> <h2>Living Species</h2> <xsl:apply-templates select="Species[Extinct='True']"/> </div> <div id="extinct"> <h2>Extinct Species</h2> <xsl:apply-templates select="Species[Extinct='False']"/> </div> </xsl:template> <xsl:template match="Species"> <div id="{Species_Name}"> <!-- explicit select statements below are just to reorder the content if needed --> <xsl:apply-templates select="Species_Name"/> <xsl:apply-templates select="Family_Name"/> <xsl:apply-templates select="Genus_Name"/> </div> </xsl:template> <xsl:template match="Species_Name"> <h3> <xsl:value-of select="."/> </h3> </xsl:template> <xsl:template match="Family_Name"> <p>Family Name: <span class="family_name"> <xsl:value-of select="."/> </span> </p> </xsl:template> <xsl:template match="Genus_Name"> <p>Genus Name: <span class="genus_name"> <xsl:value-of select="."/> </span> </p> </xsl:template>
|
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
|