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

Matching Attributes with @

Subject: Matching Attributes with @
From: Paul_Martin@xxxxxxxxxxxxxx
Date: Fri, 26 May 2000 15:41:29 +1000
select all attributes called
XML Bible says the following in the subsection on "Matching Attributes with @" :-

"You must remember that what's being matched is the attribute node, not the element that contains it. It's a very common mistake to implicitly confuse the attribute node with the element node that contains it. For example, consider this rule, which attempts to apply templates to all child elements that have UNITS attributes:

<xsl:template match="ATOM">
  <xsl:apply-templates select="@UNITS"/>
</xsl:template>

What it actually does is apply templates to the UNITS attributes of ATOM elements.

You can also use the * to select all attributes of an element, for example BOILING_POINT/@* to select all attributes of BOILING_POINT elements."


     I thought that apply-templates was only applied to elements, so how is apply-templates applied to attributes ?? Or does this mean that apply-templates is applied to all child elements of ATOM that have an attribute called UNITS ??
If my last assumption is correct, then further to the last paragraph from the XML Bible extract above, does
<xsl:apply-templates select="BOILING_POINT/@*"/> cause apply-templates to be applied to all BOILING_POINT children that have at least one attribute ??

Thanks very much in advance.


 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.