W3C home > Mailing lists > Public > www-forms@w3.org > August 2009

Re: Model child nodes order?

From: John Boyer <boyerj@ca.ibm.com>
Date: Mon, 10 Aug 2009 14:15:58 -0700
To: adam.flinton@nhs.net
Cc: Www-Forms Www-Forms <www-forms@w3.org>
Message-ID: <OFE58929CB.AAC99DFD-ON8825760E.00743A30-8825760E.0074D2C4@ca.ibm.com>
Hi Adam,

The form author is free to put the model's child elements in any order 
that makes the most sense to them.

One could, for example, put one or more "main" data instances and some 
binds and a submission, then have more instances and action handlers and a 
submission for a web service.

For the most part, you could reorder them without affecting behavior. 
Changing the first instance to being other than first would be the main 
notable thing not to do, but it doesn't sound like your automated process 
would do that anyway.

My first reaction is that reordering, relative to the order produced by 
straightforward XInclude expansion, wouldn't be desirable.  If someone 
took the trouble to create an XInclude-able component, then the content 
probably makes sense together, so seeing it in close proximity in the 
target document would seem to be most natural. 

John M. Boyer, Ph.D.
STSM, Interactive Documents and Web 2.0 Applications
Chair, W3C Forms Working Group
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab
E-Mail: boyerj@ca.ibm.com 

Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer
Blog RSS feed: 

Adam Flinton <adam.flinton@nhs.net>
Www-Forms Www-Forms <www-forms@w3.org>
08/10/2009 02:07 AM
Model child nodes order?

Dear All,

I have created a system for templating XForms which started off using
XInclude but then evolved from there as I needed to be able to put in
more advanced Xpath selects than a simple numeric e.g. /x/y[1] (&
because XInclude became much too slow).

My question is:

Given I replace something like:
    <xInclude href="./displayFragments/Models_Instances.xml"
xpointer="//SysInfo_Model[1]/*[1]/*" />

With the contents of a predefined model instance (which might itself
include xInclude elements) I have no definitive order set i.e. I might
get bind elements before an instance or a submission element as the
first child of <model>

I can happily add a sort for reasons of clarity (i.e. the code ends up
"compiling" a complete XForm which is then saved as a file & used & can
thus be looked at by a human), but I was wondering if there is any sort
of implied order as the schema appears not to have one e.g.:

<xsd:sequence minOccurs="0" maxOccurs="unbounded">
<xsd:element ref="xforms:instance"/>
<xsd:element ref="xsd:schema"/>
<xsd:element ref="xforms:submission"/>
<xsd:element ref="xforms:bind"/>
<xsd:group ref="xforms:Action"/>



This message may contain confidential information. If you are not the 
intended recipient please inform the
sender that you have received the message in error before deleting it.
Please do not disclose, copy or distribute information in this e-mail or 
take any action in reliance on its contents:
to do so is strictly prohibited and may be unlawful.

Thank you for your co-operation.

NHSmail is the secure email and directory service available for all NHS 
staff in England and Scotland
NHSmail is approved for exchanging patient data and other sensitive 
information with NHSmail and GSI recipients
NHSmail provides an email address for your career in the NHS and can be 
accessed anywhere
For more information and to find out how you can switch, visit 

Received on Monday, 10 August 2009 21:16:45 UTC

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