[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Retrieving Full XPATH expression
Hello Tom ! > -----Original Message----- > From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx > [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Tom Landon > Sent: Friday, August 10, 2001 8:51 PM > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: RE: Retrieving Full XPATH expression > > > This is not exactly what you need, but it might be a good starting point: > <!-- Attribute node (test if node is in set of parent's > attributes) --> > <xsl:when test="$node = $node/../@*"> Do you realize that this conditional statement can surprisingly evaluate to true for some element node either ? An operator "=" applyed to nodes doesn't test one operand to be the same as another one, it compares their string values instead. For example, above test will be true for <Book> element: <Books attr="value" > <Book>value</Book> </Books> It's a little artificial example, but anyway I don't think it's a good way to detect attribute node type, instead you can use one of thje following approaches : count(. | ../@*) = count(../@*) or generate-id() = generate-id(../@*[name()=name(current())]). --- Oleg Tkachenko, Multiconn International 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
|