OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

wsbpel message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: New Issue 211: Proposal for container node to simplify XML variables and message parts


Title: Message

 
This issue has been added to the wsbpel issue list with a status of "received". The status will be changed to "open" if the TC accepts it as identifying a bug in the spec or decides it should be accepted specially. Otherwise it will be closed without further consideration (but will be marked as "Revisitable")

The issues list is posted as a Technical Committee document to the OASIS WSBPEL TC pages on a regular basis. The current edition, as a TC document, is the most recent version of the document entitled in the "Issues" folder of the WSBPEL TC document list - the next posting as a TC document will include this issue. The list editor's working copy, which will normally include an issue when it is announced, is available at this constant URL  

 


Issue 211: Proposal for container node to simplify XML variables and message parts

Status: received
Date added: 2 Jun 2005
Categories: Expressions, Syntax & semantics
Date submitted: 01 June 2005
Submitter: Assaf Arkin
Description: The proposal is to support XML variables and message types based on a notion that exists in XPath, XQuery and DOM that does not require the complexity of adhering to the strict info-set model.

Problem:

  1. We want to support variables values and message parts that can be elements, simple types and complex types, with as little complexity to the spec as possible.
  2. We want to support existing specifications and implementations without deviation.
  3. We want expressions and assignments to be human readable and intuitive.

Solution:

We define a 'container node' (and later on argue exactly what to call it) that has the following properties:

  • It's a type of XML node
  • It has no parent node, i.e. the container node is always a root node
  • It has any number of child nodes, zero child nodes are allowed (e.g. an empty string)
  • Child nodes may be any valid node types, e.g. element, attribute, text, comment, etc
  • The order of child nodes is preserved, in order to honor XPath document order

We declare that each XML variable or message part is a container node, where the value of that variable or message part are the child nodes of the container node. More specifically:

  • For a variable/message part that is an element, the only child node of the container node is an element of that type
  • For a variable/message part that is a simple type, the only child node of the container node is a character data node with a text value of that type
  • For a variable/message part that is a complex type, the child nodes of the container nodes are the elements allowed in the complex type, based on the content model of the complex type

To handle assignments and expressions, we declare that:

  • When XML content is assigned to a variable or message part, the XML content (character data, element, sequence of elements) becomes the child nodes of the container node[*]
  • When the variable or message part is referenced in an expression (XPath or XQuery), the result of that reference is a nodeset with the child nodes of the container node
  • When the variable or message part is used as the context for an expression (XPath or XQuery), the container node is used as the context node

[*] In XPath this is just a matter of iterating over the returned nodeset, cloning each node and appending it as a child of the container node.

Examples

Declare a variable of simple type string and assign the value 'hello world' to it:

<variable name="text" type="xsd:string"/>
<assign>
  <copy>
    <from>
      <literal>hello world</literal>
    </from>
    <to variable="text"/>
  </copy>
</assign>

Declare a variable that holds an element myElement and assign an element to it:

<variable name="element" element="ns:myElement"/>
<assign>
  <copy>
    <from>
      <literal><ns:myElement>hello world</ns:myElement></literal>
    </from>
    <to variable="element"/>
  </copy>
</assign>

Copy the text value from one variable to another:

<variable name="text2" type="xsd:string"/>
<assign>
  <copy>
    <from>$text</from>
    <to variable="text2"/>
  </copy>
</assign>

<variable name="text3" type="xsd:string"/> <assign> <copy> <from>$element/text()</from> <to variable="text3"/> </copy> </assign>

Copy an element from a complex type to an element variable:

<variable name="sequence" type="ns:myComplexType"/>
<variable name="element3" element="ns:myElement"/>
<assign>
  <copy>
    <from>$sequence/ns:myElement</from>
    <to variable="element3"/>
  </copy>
</assign>

Evaluate an expression using a context node:

<bpws:propertyAlias propertyName="tns:taxpayerNumber"
                    messageType="txmsg:taxpayerInfo" part="identification">
    <query>/txtyp:socialsecnumber</query>
</bpws:propertyAlias>

Note that '/txtyp:socialsecnumber', 'txtyp:socialsecnumber' and './txtyp:socialsecnumber' are all valid and refer to the same child node.

Conformance

The XPath 1.0 specification defines a 'root node' that may be used as a context node or a node in a node-set. The XPath 1.0 specification makes no restriction on the root node that prevent us from using the container node as a root node. Any XPath 1.0 conformant implementation would support the container node.

The XPath 2.0 data model specification defines a 'document node' that may be used as a context node or any other place a node is returned. The container node has the same properties as an XPath 2.0 data model document node. Any XPath 2.0 or XQuery 1.0 conformant implementation would support the container node.

The DOM Level 1 specification defines a 'document fragment' node type. The container node has the same properties as a DOM document fragment. An implementation that uses the DOM can use the DocumentFragment node to represent the container node, and to pass it to/from an XPath engine.
Changes: 2 Jun 2005 - new issue


 Best Regards,

Tony                          

Tony Fletcher

Technical Advisor
Choreology Ltd.
68, Lombard Street, London EC3V 9L J   UK

Phone: 

+44 (0) 1473 729537

Mobile:

+44 (0) 7801 948219

Fax:   

+44 (0) 870 7390077

Web:

www.choreology.com

Cohesions™

Business transaction management software for application coordination

Work: tony.fletcher@choreology.com

Home: amfletcher@iee.org

 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]