W3C home > Mailing lists > Public > www-forms@w3.org > November 2002

Re: XForms CR - A further departure from XPath 1.0?

From: Roger Perttu <roger.perttu@easit.se>
Date: Thu, 14 Nov 2002 13:06:42 +0100
Message-ID: <3DD391D2.7000409@easit.se>
To: www-forms@w3.org

John Boyer wrote:

 >Hi Andrew,
 >
 >The interpretation of / within XForms expressions that reference 
instance data is perfectly in keeping with XPath 1.0.  As is clearly 
stated in our definition of the instance element (Section 3.3.2), the 
content of the instance element is treated as *opaque data* that is 
disconnected from the original containing document.
 >
Found it, but it's easy to miss on a first read.

 >
 >
 >We form a valid ***separate*** XPath data model over a disconnected 
***copy*** of the content of the instance element.  I do not think you 
will find any spec (much less XPath) that says one is not allowed to 
take some content from an XML element and put it out to disk then read 
the separated data with an XML processor.  In XForms, we are careful to 
say that the instance element can only have one element child so that 
the ***disconnected copy*** of the content is a well-formed XML document 
whose resultant XPath data model has a root node wrapped around the root 
element.  It is this root node that the / operates from.
 >
This is a very good explanation, maybe it belongs somewhere in section 2.

 >
 >Although I am taking great pains to explain this, I do not understand 
why this is so hard to understand given that this is exactly what XSLT 
does.  In XSLT you have numerous XPath expressions that are not 
references to the document that contains them but rather they are 
references to the XPath data model of a ***separate*** XML document (the 
one being transformed by the XSLT that contains the XPath expressions).
 >
In XSLT it usually *is* a separate file. If you have only worked with
XPath in XSLT it might be a bit confusing when you see XForms for the
first time.

[snip]

/Roger P
Received on Thursday, 14 November 2002 07:09:30 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:21:54 GMT