Re: A possibility to bind XMLSchema to <instance> element, not only to <model>. What do you think?

Klotz, Leigh wrote:
> Victor,
> It already works pretty much like tht.
> You can do this with <model schema="schema1.xsd schema2.xsd"> and all
> instances under that model will share the same set of schemas.
> The bind attribute is necessary only if you don't use a Schema.
> Leigh.
> 

Well, it is possible that I just don't get something right.
But, could you give me just a little example?
Suppose, we have a schema like this:

<xsd:element name="date" type="xsd:date" />

then, we have an instance:

<xforms:instance id="i1" xmlns="">
	<date />
</xforms:instance>

How can I bind a XForms-control-element to "instance('i1')" - so that 
the rendering engine should understand that it must be rendered as a 
"date-picker" ? For me it seems, that I should do it as follows:

<xforms:bind nodeset="instance('i1')" type="xsd:date" />

Notice the "type" attribute in the <bind> - it duplicates the "type" 
from XMLSchema.

Again, if there is a way to avoid "type" attribute in the <bind> - then 
I'm just a bad reader...

Best regards, Victor.

Received on Friday, 22 September 2006 05:37:42 UTC