For the Expression xo.selectPath("//[EMAIL PROTECTED]/@id]") I get an empty result-array.

Doesn't the left- and the right-hand-side of that filter-expression
always refer to the same node, which would mean,
that the xpath-engine tries to select any nodes with
the two attributes @idRef & @id having the same value?

- Siggi -

Siggi,
can you try

   xo.selectPath("//[EMAIL PROTECTED]/@id]");

and see if that works?
- Wing Yew

-----Original Message-----
From: Siegfried Baiz [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 14, 2006 10:11 AM
To: [email protected]
Subject: selectPath with FilterExpression using $this

Hello,

for a given XmlObject xo with an ID-Attribute 'id',
I've tried to launch the following xpath-expression:

   xo.selectPath("//[EMAIL PROTECTED]/@id]")

in order to get all nodes (with idRef-Attribute) refering to my node xo.

Unfortunatlly this expression seems not to work. I always get an
java.lang.ArrayIndexOutOfBoundsException from the underlying
net.sf.saxon.expr.XPathContextMajor.setLocalVariable(XPathContextMajor.j
ava:213)

At
http://xmlbeans.apache.org/docs/2.0.0/guide/conSelectingXMLwithXQueryPat
hXPath.html
I found the following notice:
        "Notice in the query expression that the variable $this
represents
         the current context node (the XmlObject that you are querying
from).
         In this example you are querying from the document level
XmlObject."

After reading that sentence I've been thinking, that $this is somehow
similar to "curent()" in XSLT, but maybe a got the meaning wrong.

Does anyone know whats the problem here rsp.
is there a better way to accomplish the same thing?

Thanks a lot,

Siggi



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to