W3C home > Mailing lists > Public > www-forms@w3.org > June 2005

xpath reference to bind

From: Peter Nunn <peter.nunn@vistic-sw.com>
Date: Tue, 21 Jun 2005 08:12:07 +1200
Message-ID: <42B72317.1090009@vistic-sw.com>
To: www-forms@w3.org

At present you cannot refer to a bind inside a setvalue xpath reference 
to obtain the value:

given a fragment of a model:
       <xf:instance id="instNewItem">
         <Item xmlns="">
           <DateRequired type="xs:date"></DateRequired>
           <CatalogID type="xs:string"></CatalogID>
           <Quantity type="xs:decimal"></Quantity>
       <xf:bind id="newItem" nodeset="instance('instNewItem')">
         <xf:bind id="dateRequired" nodeset="DateRequired"/>
         <xf:bind id="catalogID" nodeset="CatalogID" />
         <xf:bind id="quantity" nodeset="Quantity" />
In a setvalue it is possible copy the value to another instance using an 
xpath to the instance data:
      <xf:setvalue bind="orderCatalogID"
                   value="instance('instNewItem')/CatalogID" />
The above works OK, however you cannot refer to the bind as the rvalue 
for the setvalue as in:
      <xf:setvalue bind="orderCatalogID"
                   value="catalogID" />

In fact a bind is outside the list of valid xpath expressions, would it 
be possible to include a syntax to allow for bind's to be used as part 
of an xpath expression?
Received on Tuesday, 21 June 2005 00:51:31 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:15 UTC