473,323 Members | 1,551 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Context Node in XPath 1.0

Hi, there!

As I understand the XPaht recommendation, the context node is a node;
not a node-list, not XPath object -- but a single node.

Now, the WS-BPEL 2.0 specification allows an XML simple type value to be
the context of an XPath expression, by converting it to an XPath object
-- either boolean, string or float.

I do not see how this is possible, but I would like your thoughts on it.

A note, that might help: In the WS-BPEL specification the phrase is "the
context node MUST point to the XPath object" -- the "point to" makes it
sound like some kind of reference.

Thanks.

Nov 11 '07 #1
7 2778
Since your question is really about how WS-BPEL is using XPath, you
might want to direct this question straight to that working group's
public comments list.
>Now, the WS-BPEL 2.0 specification allows an XML simple type value to
be the context of an XPath expression
Could you indicate where you think you're seeing this?

Section 8.2.3 says that an XPath context consists of five basic items --
context node, context position and size, variable bindings, function
library, and namespaces in scope for the expression. Later sections go
on to explain how these are set up before the XPath runs. That's exactly
what I would have expected...

(I assume that the current copy is indeed the one posted at
http://docs.oasis-open.org/wsbpel/2....#_Toc164738496)

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
Nov 11 '07 #2
Joe Kesselman skrev:
Since your question is really about how WS-BPEL is using XPath, you
might want to direct this question straight to that working group's
public comments list.
That list is dead quiet -- besides my own post, nothing had happened
since January. This is why it tried to make it about XPath...
>Now, the WS-BPEL 2.0 specification allows an XML simple type value to
>be the context of an XPath expression

Could you indicate where you think you're seeing this?
In section 8.2.6:
"The context node is determined as follows: ... If the type is a simple
type, the context node MUST point to the XPath object specified in
section 8.2.2"

In section 8.2.2:
"WS-BPEL simple type variables MUST be manifested directly as either an
XPath string, Boolean or float object."
Section 8.2.3 says that an XPath context consists of five basic items --
context node, context position and size, variable bindings, function
library, and namespaces in scope for the expression. Later sections go
on to explain how these are set up before the XPath runs. That's exactly
what I would have expected...
Yes, the five basic items are listed exactly as in the XPath
recommendation. However, as I read the above quoted, the context node
must point to either a XPath string, Boolean or float object. Is this
possible; how do you create a node pointing to an XPath object?
(I assume that the current copy is indeed the one posted at
http://docs.oasis-open.org/wsbpel/2....#_Toc164738496)
Indeed. Thanks.
Nov 12 '07 #3
I need to look at this in more detail, but I think you're confusing the
context node with the type of the node's contents. A node can't "be" a
simple type, but its content can.
--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
Nov 13 '07 #4
Joe Kesselman skrev:
I need to look at this in more detail, but I think you're confusing the
context node with the type of the node's contents. A node can't "be" a
simple type, but its content can.
Yes, I can pass a TextNode holding the simple type content, but how do I
declare it to be either string, boolean or float?

For example. passing a TextNode, holding the string "false", to the
expression "boolean(self::node())", will return true, because it is a
string, not a boolean: a string is true if and only if its length is
non-zero.

Your opinion is much appreciated. Thanks.
Nov 15 '07 #5
Joe Kesselman skrev:
Tim Hallwyl wrote:
To _declare_ it as such, you say so in the schema and validate against
the schema so that information is in the Post-Schema-Validation Infoset.
I admit that I have not tried using a PSVI, but I do not believe this
helps. As I understand it, XPath 1.0 does not support XML Schema at all
-- thus, any content of a TextNode, regardless of its intended type, is
always an XPath String object -- also when passed as the context node.

Am I wrong?
To _retrieve_ it as such, you may have to explicitly use the appropriate
method in your XPath API [...]
I have no problems retrieving typed values, corresponding the XPath 1.0
objects.
I believe XPath 2.0 and XQuery have syntax that allows the expression to
say what type the value is expected to be.
Yes, I believe so too. However, the WS-BPEL specification, section
2.8.6, says: "When XPath 1.0 is used as Query Language [...]"

So, to summarize: The WS-BPEL specification requires in some cases, that
the context node must point to an XPath object. The question is, how
is this possible, using XPath 1.0?

Thanks.
Nov 15 '07 #6
Tim Hallwyl wrote:
I am somewhat convinced that XPath 1.0 does not support XML Schema and
all node values are string objects in XPath.
Actually, I think that is true in 1.0.
If so, what could they
mean, when writing that the context node must point to an XPath object,
such as boolean, float or string?
I'm still not convinced they intended to say that. At this point I
really would suggest trying to bounce this back to the working group, or
picking out one of the authors and pestering them...


--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Nov 15 '07 #7
Joseph Kesselman skrev:
At this point I really would suggest trying to bounce this back to
the working group, or picking out one of the authors and pestering
them...
I have moved the discussion to the newly created WS-BPEL forum at:

http://bpel.xml.org/how-can-context-...t-xpath-object

Thank you for your input so far. You are more than welcome to join the
discussions at http://bpel.xml.org

--tim
Nov 25 '07 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Eliza Zadura | last post by:
The following question is about XPath and context, as I am not sure I'm grasping the concept entirely and this is causing me some problems while working on my XSL transformation. I have checked...
3
by: ricky | last post by:
I want to return with only one xpath expression the first following node relative to a node with a XPTO attribute. Example: <node> xxx </node> <node XPTO="true"> yyy
4
by: Jim Garrison | last post by:
I know how to use the name() function to access the name of the current node. How do I get the 'fully qualified' name, consisting of the path from the root to the current node? I.e. <a> <b>...
2
by: nicholas | last post by:
Hi folks, I'm diving into XPathNavigator.SelectDescendants method. There's a boolean type parameter matchSelf, and MSDN says "To include the context node in the selection, true; otherwise,...
0
by: XML newbie: Urgent pls help! | last post by:
I am using VB.Net. My program is to connect to a remote IPAddress. Once, it verifies the login information it should display the SessionID and enable some button . I appreciate your help and thanku...
4
by: XML newbie: Urgent pls help! | last post by:
I am using VB.Net. My program is to connect to a remote IPAddress. Once, it verifies the login information it should display the SessionID and enable some button . I appreciate your help and thanku...
3
by: orit | last post by:
I have the following xml: <?xml version="1.0" ?> <course> <globalProperties> <externalMetadata> <source>ADL</source> <model>ADL SCORM 1.0</model> </externalMetadata> </globalProperties>
4
by: Thomas Schmidt | last post by:
Given this document: <doc> <head> <someElementWithID id="X"/> <someElementWithID id="Y"/> </head> <body> <element> <otherElement>
4
by: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= | last post by:
Hi; If I have an XPathNavigator object and for a given xpath statement need to know if the node exists, how should I do this? I have found for some xpath functions it returns an empty string if...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.