Subject: RE: [xsl] Retrieving Full XPATH expression From: "Oleg Tkachenko" <olegt@xxxxxxxxxxxxx> Date: Sat, 11 Aug 2001 17:38:52 +0200 |
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: [xsl] 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Retrieving Full XPATH exp, Robert Koberg | Thread | RE: [xsl] Retrieving Full XPATH exp, Tom Landon |
RE: [xsl] Retrieving Full XPATH exp, Tom Landon | Date | RE: [xsl] Conditional initialisatio, Oleg Tkachenko |
Month |