[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
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
|
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
|