|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: I mean self::* doesn't select attributes :(
At 01/04/24 13:24 -0700, Evan Lenz wrote:
<correction> Anyone else have headaches with not being able to do @*[not(self::xyz:* or self::abc:*)] ? This is an excerpt from pages 182/183 of my book: Practical Transformation Using XSLT and XPath (XSL Transformations and the XML Path Language) Ninth Edition - 2001-01-19 - ISBN 1-894049-06-3 Copyright (c) 2001 Crane Softwrights Ltd. / 375 Pages / Subscription price includes free updates / / and separate copy of all example files. / / Free 137-page download preview excerpt. These pages describe the way to do a test of the current node as being one of every node type of XPath ... the following are the attribute tests I suggest for the current node: <--specific namespaced-unqualified attribute-->
<xsl:when test="count(.|../@version)=count(../@version)">
<xsl:text>version attribute </xsl:text>
</xsl:when>
<!--specific namespace-qualified attribute-->
<xsl:when test="count(.|../@book:ref)=count(../@book:ref)">
<xsl:text>book:ref attribute </xsl:text>
</xsl:when>
<!--any attribute-->
<xsl:when test="count(.|../@*)=count(../@*)">
<xsl:text>attribute </xsl:text>
</xsl:when>The use above of the XPath axes handles the prefix/URI issue. I hope this helps. ....................... Ken
Training Blitz: 3-days XSLT/XPath, 2-days XSLFO in Ottawa 2001-06-18/22 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
|

Cart








