[
Lists Home |
Date Index |
Thread Index
]
AndrewWatt200:
>how many "root nodes" an XForms processor would see in, or associated
with,a multinamespace XML document which contains three <xforms:model>
elements.
An XPath root node can only exist with relation to an XPath data model. The
XPath spec likes to use the word "document" for this, but it is closer in
concept to an "infoset". It can be seen through XPath APIs that in-memory
trees, SAX streams, and other non-document things can be used as a source
for an XPath data model. The XPath errata have a definitive mapping to
infoset.
Your hypothetical form would have at least three separate XPath data models,
each with exactly one root node. (I say "at least" because any
<xforms:model> can have multiple <xforms:instance>s.) Multi-namespace
doesn't have any bearing on this.
>For each of those root nodes which an XForms processor sees (I assume that
you will suggest there are three), can you provide the element type (name)
of the document element node which is the child node of the root node
The document element node will always map to the user-chosen XML for the
form. See below.
>Can you also specify how many root nodes a non-XForms processor would see
in the same document
This is a non-well-formed question. Presumably, you are talking about some
other XPath-based specification, in which case you'd need to read that
specification to see what it says. Example: XSLT would represent an entire
document as a single XPath data model, with a single root node.
Let's make this really plain. Here's a portion of a document like what you
described, with three <xforms:model>s.
<html:html>
<html:head>
<xforms:model>
<xforms:instance>
<my:a/>
</xforms:instance>
</xforms:model>
<xforms:model>
<xforms:instance>
<my:b/>
</xforms:instance>
</xforms:model>
<xforms:model>
<xforms:instance>
<my:c/>
</xforms:instance>
</xforms:model>
...
An XForms Processor will have three separate XPath data models to keep track
of. Serialized, these would look like:
1) <my:a/>
2) <my:b/>
3) <my:c/>
Note that:
* All 3 XPath data models have a single root node.
* All 3 XPath data models have a single document element node, as a child of
the root node
* The document element nodes are, respectively, my:a, my:b, and my:c
* The root node is special and has no representation in markup.
* In all 3 XPath data models, the html and xforms namespaced stuff is not
present, and barring an extension function like document(), is inaccessible
to XPath expressions.
I hope this helps,
.micah
-----Original Message-----
From: AndrewWatt2000@aol.com [mailto:AndrewWatt2000@aol.com]
Sent: Wednesday, November 13, 2002 12:04 PM
To: MDubinko@cardiff.com; xml-dev@lists.xml.org
Subject: Re: [xml-dev] Changing XPath 1.0 Semantics in XForms 1.0?
Micah,
I was hoping that some of the bright guys on the list could come at this
with a fresh pair of eyes. ... Typically, this isn't a list of shy
individuals. :) .... I assume that you have already looked at this issue and
made up your mind. :)
Let me fill in the time until some other responses arrive by asking you how
many "root nodes" an XForms processor would see in, or associated with, a
multinamespace XML document which contains three <xforms:model> elements.
For each of those root nodes which an XForms processor sees (I assume that
you will suggest there are three), can you provide the element type (name)
of the document element node which is the child node of the root node?
Can you also specify how many root nodes a non-XForms processor would see in
the same document and whether that root node / those root nodes would or
would not be the same root node(s) that the XForms processor sees?
Clear answers to those questions would help me better to understand your
mode of thought on this issue.
Regards
Andrew Watt
|