how do you create an attribute based on a value

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

how do you create an attribute based on a value

Jeremiah Jahn-4
I'm try to take a value from an attribute in one instance and convert
it to an attribute in another instance.


I was hoping    <xforms:insert
origin="xs:attribute(instance('new')/@newname)"
context="instance('data')"/> would work.

but It doesn't.

any suggestions.


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: how do you create an attribute based on a value

Hank Ratzesberger

There are some examples here that may help:

http://www.w3.org/TR/xforms11/#data-mutation-patterns-set-attribute

HTH,
Hank

On Sep 15, 2009, at 6:09 AM, Jeremiah Jahn wrote:

> I'm try to take a value from an attribute in one instance and convert
> it to an attribute in another instance.
>
>
> I was hoping    <xforms:insert
> origin="xs:attribute(instance('new')/@newname)"
> context="instance('data')"/> would work.
>
> but It doesn't.
>
> any suggestions.
>
> --
> 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
> OW2 mailing lists service home page: http://www.ow2.org/wws
Hank Ratzesberger
NEES@UCSB
Institute for Crustal Studies,
University of California, Santa Barbara
805-893-8042







--
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
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: how do you create an attribute based on a value

Jeremiah Jahn-4
thanks for the help, actually I just found it. There are no functions
like that in standard xpath as far as I can tell. Finally managed to
find one in the orbeon xxforms extensions though. I just never know
where to look first.

xxforms:attribute($qname as xs:anyAtomicType?, $value as
xs:anyAtomicType?) as attribute()
<xforms:insert context="section" origin="xxforms:attribute('id',
'first-name')"/>

this was just what I needed.

On Tue, Sep 15, 2009 at 11:49 AM, Hank Ratzesberger
<[hidden email]> wrote:

>
> There are some examples here that may help:
>
> http://www.w3.org/TR/xforms11/#data-mutation-patterns-set-attribute
>
> HTH,
> Hank
>
> On Sep 15, 2009, at 6:09 AM, Jeremiah Jahn wrote:
>
>> I'm try to take a value from an attribute in one instance and convert
>> it to an attribute in another instance.
>>
>>
>> I was hoping    <xforms:insert
>> origin="xs:attribute(instance('new')/@newname)"
>> context="instance('data')"/> would work.
>>
>> but It doesn't.
>>
>> any suggestions.
>>
>> --
>> 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
>> OW2 mailing lists service home page: http://www.ow2.org/wws
>
> Hank Ratzesberger
> NEES@UCSB
> Institute for Crustal Studies,
> University of California, Santa Barbara
> 805-893-8042
>
>
>
>
>
>
>
> --
> 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
> OW2 mailing lists service home page: http://www.ow2.org/wws
>
>


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws