using escaped XML in xforms:value for an xforms:select1

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

using escaped XML in xforms:value for an xforms:select1

Rene Single
Hi evrybody,

I'm a newbie in XForms so bear with me, if this is a stupid question.

I have the follwing in my xhtml

<xforms:select1 ref="tree" appearance="xxforms:tree" class="exporttree">
    <xforms:itemset nodeset="instance('items')//item">
        <xforms:label ref="@label"/>
        <xforms:value ref="@value"/>
    </xforms:itemset>
</xforms:select1>

The value attribute that is referenced contains an escaped XML Fragment
like shown below, which I need to copy to an editfield upon selection of
the corresponding node in the tree.

<items>
    <item label="First Item [1593]">
        <item label="Second
Item-&lt;b&gt;&lt;u&gt;SomeText1&lt;/u&gt;&lt;/b&gt; [530]"
        value="&lt;ELEMENT KEY=&#34;Txt20_6&#34;
CONTENT=&#34;Value1&#34;&gt;&lt;/ELEMENT&gt;">
        </item>
    </item>
</items>

And this seems to block successfully loading my page. (Page loads
somewhat but no tree is shown, and navigational buttons on the page are
not working).
I suspect that upon binding this input to the xforms:value it gets
parsed and the escapes are unescaped and confusing XForms.
So my question is can something like this work at all ?

If not, what would be the best way to do this ?
I have thought about building the XML Fragment in the XHTML Page (having
a template for the fragmentstored in the xhtml and sending the two
required attribute values each in his own element) upon tree selection,
but am clueless about how this would be done.

Any pointers ?

Thanks in advance for any insight

Rene





--
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: using escaped XML in xforms:value for an xforms:select1

Erik Bruchez
Administrator
Not sure why this wouldn't work. Could you please send a complete  
example that runs in the XForms sandbox?

-Erik

On Aug 7, 2008, at 5:04 AM, Rene Single wrote:

> Hi evrybody,
>
> I'm a newbie in XForms so bear with me, if this is a stupid question.
>
> I have the follwing in my xhtml
>
> <xforms:select1 ref="tree" appearance="xxforms:tree"  
> class="exporttree">
>   <xforms:itemset nodeset="instance('items')//item">
>       <xforms:label ref="@label"/>
>       <xforms:value ref="@value"/>
>   </xforms:itemset>
> </xforms:select1>
>
> The value attribute that is referenced contains an escaped XML  
> Fragment like shown below, which I need to copy to an editfield upon  
> selection of the corresponding node in the tree.
>
> <items>
>   <item label="First Item [1593]">
>       <item label="Second Item-&lt;b&gt;&lt;u&gt;SomeText1&lt;/
> u&gt;&lt;/b&gt; [530]"
>       value="&lt;ELEMENT KEY=&#34;Txt20_6&#34;  
> CONTENT=&#34;Value1&#34;&gt;&lt;/ELEMENT&gt;">
>       </item>
>   </item>
> </items>
>
> And this seems to block successfully loading my page. (Page loads  
> somewhat but no tree is shown, and navigational buttons on the page  
> are not working).
> I suspect that upon binding this input to the xforms:value it gets  
> parsed and the escapes are unescaped and confusing XForms.
> So my question is can something like this work at all ?
>
> If not, what would be the best way to do this ?
> I have thought about building the XML Fragment in the XHTML Page  
> (having a template for the fragmentstored in the xhtml and sending  
> the two required attribute values each in his own element) upon tree  
> selection, but am clueless about how this would be done.
>
> Any pointers ?
>
> Thanks in advance for any insight
>
> Rene
--
Orbeon Forms - Web Forms for the Enterprise Done the Right Way
http://www.orbeon.com/



--
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: using escaped XML in xforms:value for an xforms:select1

Rene Single


Erik Bruchez schrieb:
> Not sure why this wouldn't work. Could you please send a complete
> example that runs in the XForms sandbox?
Can you give me pointers on how I would do that ?

I just selected my xhtml File at
http://www.orbeon.com/ops/xforms-sandbox/, but the Run XForms button is
remaining disabled.

I'm adding a zip File containing my (stripped down) XHTML Page that
exposes the issue and the required data input it uses.

contexts.xml is the one that works (with no escaped xml in the value
attribute)
contexts_error.xml doesn't work (escaped xml in the value attribute)

Thanks in advance to anyone taking a look


>
> -Erik
>
> On Aug 7, 2008, at 5:04 AM, Rene Single wrote:
>
>> Hi evrybody,
>>
>> I'm a newbie in XForms so bear with me, if this is a stupid question.
>>
>> I have the follwing in my xhtml
>>
>> <xforms:select1 ref="tree" appearance="xxforms:tree" class="exporttree">
>>   <xforms:itemset nodeset="instance('items')//item">
>>       <xforms:label ref="@label"/>
>>       <xforms:value ref="@value"/>
>>   </xforms:itemset>
>> </xforms:select1>
>>
>> The value attribute that is referenced contains an escaped XML
>> Fragment like shown below, which I need to copy to an editfield upon
>> selection of the corresponding node in the tree.
>>
>> <items>
>>   <item label="First Item [1593]">
>>       <item label="Second
>> Item-&lt;b&gt;&lt;u&gt;SomeText1&lt;/u&gt;&lt;/b&gt; [530]"
>>       value="&lt;ELEMENT KEY=&#34;Txt20_6&#34;
>> CONTENT=&#34;Value1&#34;&gt;&lt;/ELEMENT&gt;">
>>       </item>
>>   </item>
>> </items>
>>
>> And this seems to block successfully loading my page. (Page loads
>> somewhat but no tree is shown, and navigational buttons on the page
>> are not working).
>> I suspect that upon binding this input to the xforms:value it gets
>> parsed and the escapes are unescaped and confusing XForms.
>> So my question is can something like this work at all ?
>>
>> If not, what would be the best way to do this ?
>> I have thought about building the XML Fragment in the XHTML Page
>> (having a template for the fragmentstored in the xhtml and sending
>> the two required attribute values each in his own element) upon tree
>> selection, but am clueless about how this would be done.
>>
>> Any pointers ?
>>
>> Thanks in advance for any insight
>>
>> Rene
>
> --
> Orbeon Forms - Web Forms for the Enterprise Done the Right Way
> http://www.orbeon.com/
>


--
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

Example.zip (11K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: using escaped XML in xforms:value for an xforms:select1

Rene Single

Rene Single schrieb:

>
>
> Erik Bruchez schrieb:
>> Not sure why this wouldn't work. Could you please send a complete
>> example that runs in the XForms sandbox?
> Can you give me pointers on how I would do that ?
>
> I just selected my xhtml File at
> http://www.orbeon.com/ops/xforms-sandbox/, but the Run XForms button
> is remaining disabled.
>
> I'm adding a zip File containing my (stripped down) XHTML Page that
> exposes the issue and the required data input it uses.
>
> contexts.xml is the one that works (with no escaped xml in the value
> attribute)
> contexts_error.xml doesn't work (escaped xml in the value attribute)
>
> Thanks in advance to anyone taking a look
>
>
OK, got this solved myself. The XML Fragment was using escaped  double
quotes for the attribute values, which marks the end of the complete xml
Fragment string and thus will render the input broken.

Thanks anyway.

Rene



--
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