|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: select="*/@UNITS/.."
>Well one point is that the spec doesn't say whether an element is >considered to be the parent of its attributes; it does however say that >the children of an element are its child elements and character content >(i.e. not its attributes), and we can guess that "parent" is intended to >be the inverse relationship of "child". > > But if an element is not the parent of its attributes, what is? In order for the XML document to be a tree, something must be the parent of each node. Attributes are nodes. Therefore each must have exactly one parent. >But there's a much easier and cleaner way of doing it anyway: > > >> <xsl:template match="ATOM"> >> <xsl:apply-templates select="*[@UNITS]"/> >> </xsl:template> > > Agreed +-----------------------+------------------------+-------------------+ | Elliotte Rusty Harold | elharo@xxxxxxxxxxxxxxx | Writer/Programmer | +-----------------------+------------------------+-------------------+ | XML: Extensible Markup Language (IDG Books 1998) | | http://www.amazon.com/exec/obidos/ISBN=0764531999/cafeaulaitA/ | +----------------------------------+---------------------------------+ | Read Cafe au Lait for Java News: http://sunsite.unc.edu/javafaq/ | | Read Cafe con Leche for XML News: http://sunsite.unc.edu/xml/ | +----------------------------------+---------------------------------+ 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








