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

how to match node set with attribute then pass to a te

Subject: how to match node set with attribute then pass to a template
From: Biying Huang <biying@xxxxxxxxxxxxxxx>
Date: Fri, 26 Sep 2003 12:24:38 -0400
xsl template match
Hello, all:

In PDF output, I am trying to display 2 images side by side and its info
above each image, but only display images that has the attribute
showImage="true".
But I don't know how to match node set with attribute then pass to a
template.

My XML data:=======================
<AttachmentList>
    <Attachment showImage="true">
        <filename>Image5445.jpg</filename>
        <info>image information</info>
  </Attachment>

  <Attachment showImage="false">
        <filename>Image5446.jpg</filename>
        <info>image information</info>
  </Attachment>

  <Attachment showImage="true">
        <filename>Image5447.jpg</filename>
        <info>image information</info>
  </Attachment>
</AttachmentList>

My xslt templates:===================================

<xsl:template match="AnalyticalList" >
    <xsl:apply-templates select="Attachment[@showImage = 'true']"
mode="AttachImage" />
</xsl:template>

<xsl:template match="Attachment[@showImage = 'true']" >
     ?? what do I do here ??
</xsl:template>

<xsl:template match="Attachment">
  <fo:table-row>
      <fo:table-cell>
        <fo:block><xsl:value-of select="info"/></fo:block>
      </fo:table-cell>

      <fo:table-cell>
        <fo:block>
            <!-- How do I get the next whose showImage="true" here ??
               <xsl:value-of select="following-sibling::Attachment/info"
/>
            -->
        </fo:block>
      </fo:table-cell>
  </fo:table-row>

  <fo:table-row>
      <!-- two images in a row here
  </fo:table-row>

</xsl:template>

Many thanks in advance.

Biying


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.