Dynamic type in xforms:bind

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Dynamic type in xforms:bind

Ryan Puddephatt

Hi all,

            I have the following

 

<instance>

            <element type=”xs:date”/>

</instance>

 

I want to do

 

<xforms:bind nodeset=”/instance/element” type=”@type”/>

 

But this doesn’t work or I’m not doing it correctly, has anyone managed to do this or is this a known bug?

 

Thanks

 

Ryan

 

Ryan Puddephatt

Software Engineer

TFX Group - IT UK

1 Michaelson Square

Livingston

West Lothian

Scotand

EH54 7DP

 

* [hidden email]

( 01506 407 110

7  01506 407 108

 

 



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Dynamic type in xforms:bind

Erik Bruchez
Administrator
Ryan,

This is not a bug. As per the XForms specification, the content of the
xforms:bind/@type attribute must be a qualified name ("Any xsd:QName
representing a datatype definition." [1]). You can't use an XPath
expression in there. If you want to use dynamic types, you will have to
write things such as:

<xforms:bind nodeset=”/instance/element[@type = 'date']” type=”xs:date”/>
<xforms:bind nodeset=”/instance/element[@type = 'integer']”
type=”xs:integer”/>

etc.

-Erik

[1] http://www.w3.org/TR/xforms/slice6.html#model-prop-type

Ryan Puddephatt wrote:

> Hi all,
>
>             I have the following
>
>  
>
> <instance>
>
>             <element type=”xs:date”/>
>
> </instance>
>
>  
>
> I want to do
>
>  
>
> <xforms:bind nodeset=”/instance/element” type=”@type”/>
>
>  
>
> But this doesn’t work or I’m not doing it correctly, has anyone managed
> to do this or is this a known bug?
>
>  
>
> Thanks
>
>  
>
> Ryan
>
>  
>
> *Ryan Puddephatt*
>
> Software Engineer
>
> TFX Group - IT UK
>
> 1 Michaelson Square
>
> Livingston
>
> West Lothian
>
> Scotand
>
> EH54 7DP
>
>  
>
> * [hidden email]
>
> ( 01506 407 110
>
> 7  01506 407 108
--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws