Thoughts about editorial note id() in XForms 1.1

All,

I've looked to the editorial note about the id() function 
(http://www.w3.org/TR/xforms11/#fn-id) and these are my personal notes 
about it. 
Please comment on them, they are personal view and I'm certain that I've 
overlooked some things because I'm not an xml schema specialist.


1) Does the XForms type MIP also apply such that an element would be 
returned if it contains an attribute with a matching ID and the XForms 
type has assigned the xsd:ID type to that attribute?

If you read the spec (6.1.1 The type Property) '...The effect of this 
model item property is the same as placing attribute xsi:type on the 
instance data. ...' (6.2.1 Atomic Datatype) 'The XForms Processing Model 
applies XML Schema facets as part of the validation process. At the 
simplest level, it is necessary to associate a set of facets (through an 
XML Schema datatype) with a model item. This has the effect of restricting 
the allowable values of the associated instance data node to valid 
representations of the lexical space of the datatype. ...'
I think you would expect that the schema type only is used in the 
validation process.

But, if you are authoring a form and put the following bind in your model 
:

    <bind nodeset="//@id" type="xs:id"/>

It would be handy for the form author that he can use the id() function to 
retrieve the element with a given id. (I know one implementation that 
supports this, but didn't check the other implementations)

Therefore I personally think it would be desirable that xs:id has effect 
on the id() function, if specified with the type MIP or xsi:type on 
instance data.



2) What would it mean if an xsd:ID type were assigned directly to the 
element's content by an xsi:type attribute or a schema?

If you read 3.3.8 ID of the 'XML Schema Part 2: Datatypes Second Edition' 
: "... For compatibility (see Terminology (§1.4)) ID should be used only 
on attributes."

Therefore I think this should be discouraged in our spec, or left 
Implementation dependant



3) Do XML schema types derived from xsd:ID count?

In XPath 1.0 is no reference to Schema, but in ‘XQuery 1.0 and XPath 2.0 
Data Model’ you can read:
 
  is-id : If the type-name is xs:ID or a type derived from xs:ID, true, 
otherwise false.

Therefore I personally think that types derived from xsd:ID count.


Regards,

Nick

-------------------------------
Inventive Designers' Email Disclaimer:
ivedesigners.com/email-disclaimer

Received on Monday, 3 April 2006 15:27:28 UTC