On Sunday, January 19, 2003, at 02:41 AM, Dimitre Novatchev wrote:
What am I doing wrong?
The problem is here:
<xsl:when
test="/grammar/start/element/zeroOrMore/choice/element[1]//
zeroOrMore//*[self=current()]">
You are testing if the current node has child named "self" and its
string value is equal to the string value of the current node.
gah! I can't believe it. I must have though I was using the self::
axis. Would self::* have worked? How do I know if it's going to treat
the stuff inside the predicate as a string or as a node-set?
I find the XPath spec to be unusually confusing ... would you mind
pointing out the part of the spec that defines this, because it's
totally unclear to me. In fact, I find there's a distinctive lack of
clear documentation on the net. I'd rather not have to waste the money
and dead trees on the O'Reilly book and usually the online docu is
enough for me.
Obviously, you wanted:
/grammar/start/element/zeroOrMore/choice/element[1]//zeroOrMore//
*[generate-id() = generate-id( current())]
Thanks,
simon
---
www.simonwoodside.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list