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

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 UTC