[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Using attributes with XPath
Hello: I am writing a XSL-FO style sheet and am trying to output a list. The list's XML is: <list type="marked" mark="*"> <item>- The item contains more than one language one of which may be a sign language</item> <item>- The item is or includes a translation</item> <item>- The language of the summaries, abstracts, or accompanying material differs from the language of the main item</item> <item>- The language of a table of contents differs from the language of the main item</item> </list> My XSL-FO code is: <xsl:template match="list"> <fo:list-block> <xsl:apply-templates select="@* | *[contains(@type, $my_version) or string-length(@type)=0] | text()"/> </fo:list-block> </xsl:template> <xsl:template match="item[parent::list]"> <fo:list-item> <fo:list-item-label> <fo:block>•</fo:block> </fo:list-item-label> <fo:list-item-body> <fo:block> <xsl:apply-templates select="@* | *[contains(@type, $my_version) or string-length(@type)=0] | text()"/> </fo:block> </fo:list-item-body> </fo:list-item> </xsl:template> I have tried to use the attribute expression in XPATH for the @type and @mark attributes of the list element. The code looked like: <xsl:template match="list[attribute::type and attribute::mark]"> <fo:list-block> <xsl:apply-templates select="@* | *[contains(@type, $my_version) or string-length(@type)=0] | text()"/> </fo:list-block> </xsl:template> Unfortunately, I did not receive the list output. Could you please inform me on what I am doing incorrectly with my XPATH expressions and or XSLT code? Thank you very much for your help! Best wishes, Jackie Radebaugh Library of Congress Network Development & MARC Standards Office Washington, DC USA Phone: +1-202-707-1153 FAX: +1-202-707-0115 E-Mail: jrad@xxxxxxx
|
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
|