[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: select="*/@UNITS/.."
Subject: RE: select="*/@UNITS/.." From: Elliotte Rusty Harold <elharo@xxxxxxxxxxxxxxx> Date: Fri, 19 Mar 1999 11:28:46 -0500 |
>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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: select="*/@UNITS/..", Kay Michael | Thread | Re: select="*/@UNITS/..", Jonathan Borden |
About Tim's article on IE XML imple, Didier PH Martin | Date | RE: need XML documents with XSL scr, Didier PH Martin |
Month |
Keywords