Calvin Smith wrote:
I'm having some trouble using xpointer in conjuntion with aggregate() in a
pipeline. I have the following XML document:
[...]
  <p:input name="documentID" href="aggregate('DocumentID',
#requestDocument#xpointer(/WorkflowRequest/Create/@documentID))"/>

Calvin, you need to use the string() function in this case. I.e. your href expression should look like:


aggregate('DocumentID', #requestDocument#xpointer(string(/WorkflowRequest/Create/@documentID)))

Without the string(), your XPath expression returns an Attribute node. We should not allow this, but instead, we are silently ignoring any node returned by the XPath expression if it not a Document or an Element.

We have implemented this behavior because Jaxen (the XPath library) had a bug and was returning "Namespace nodes" (corresponding to xmlns declarations). So we were just ignoring nodes that were not Documents or Elements. Since then, we have fixed the problem in Jaxen. So instead, we can now throw an exception if the XPath expression returns an unsupported node type.

I will modify this, and it will be included in our next release. You will still need to use the string() function when addressing attributes, but if you forget to do so, you will get an error message.

Alex

_______________________________________________
oxf-users mailing list
[EMAIL PROTECTED]
http://mail.orbeon.com/mailman/listinfo/oxf-users

Reply via email to