[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Multi-part search XPath expressions.

Subject: Re: Multi-part search XPath expressions.
From: Bruce D'Arcus <bdarcus@xxxxxxxxxxxxx>
Date: Sat, 11 Sep 2004 10:02:16 -0400
xpath search id
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>

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.