You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by paul_se <pa...@anz.com> on 2008/09/25 03:17:06 UTC

Top-level XPath functions question

Hi,

Just looking for clarification of what 'Note that this method does not
support top-level XPath functions' means in XmlCursor.selectPath...

http://xmlbeans.apache.org/docs/2.0.0/reference/org/apache/xmlbeans/XmlCursor.html#selectPath(java.lang.String)

Background:

I'm running an xpath on an XmlObject with a count function in it and it's
failing, although non-function xpaths work fine.

e.g. $this/count(s:userRequestID) returns '0' when i expect '1'.

on

<xml-fragment xmlns:s="http://www.temp.com/fx/Session"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <s:userRequestID>4</s:userRequestID> 
  <s:userRequestType>1</s:userRequestType> 
  <s:username>FIX-ABC-CP2</s:username> 
  <s:password>q</s:password> 
  <s:userResponse> 
    <s:userRequestID>4</s:userRequestID> 
    <s:username>FIX-ABC-CP2</s:username> 
    <s:userStatus>2</s:userStatus> 
  </s:userResponse> 
</xml-fragment>

Can someone confirm that what I am doing is not supported and, if so, the
best workaround (besides only executing xpath on a level below the root
element).

Many thanks.

Using: XmlBeans: v2.4.0 Saxon: 9.0.0.4
-- 
View this message in context: http://www.nabble.com/Top-level-XPath-functions-question-tp19661491p19661491.html
Sent from the Xml Beans - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@xmlbeans.apache.org
For additional commands, e-mail: user-help@xmlbeans.apache.org