Re: Model child nodes order?

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. 

Cheers,
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: 
http://www.ibm.com/developerworks/blogs/rss/JohnBoyer?flavor=rssdw





From:
Adam Flinton <adam.flinton@nhs.net>
To:
Www-Forms Www-Forms <www-forms@w3.org>
Date:
08/10/2009 02:07 AM
Subject:
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:choice>
<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"/>
</xsd:choice>
</xsd:sequence>


Adam


********************************************************************************************************************

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 
www.connectingforhealth.nhs.uk/nhsmail

********************************************************************************************************************

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