[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Changing XPath 1.0 Semantics in XForms 1.0?


xforms multiple instances
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@a... [mailto:AndrewWatt2000@a...]
Sent: Wednesday, November 13, 2002 12:04 PM
To: MDubinko@c...; xml-dev@l...
Subject: Re:  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 

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.