Possible bug in Attribute Value Template evaluation

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

Possible bug in Attribute Value Template evaluation

Jeremy Nix
I am doing some things in my form in native javascript.  One of the
things that I was doing was storing JSON data structures as attributes
of various HTML elements.  I realized that I needed to escape out any
curly braces in order to avoid AVT expression evaluation.  I've noticed,
however, that even though the attributes are properly escaped, the
attribute values are not properly parsed through in the resulting html.  
I've outlined a simple example of this below.  Notice that one of my
divs that contains this custom attribute is within a group that
references a non existent node (and therefore is not relevant) while the
other is outside the context of that group.  When this gets rendered in
the latest/greatest version of Orbeon (today's dev release) the
non-relevant div's attribute does not get propagated through.  I changed
the group reference to be "instance('inst')" to see if the inner div
would then have the attribute value, and it did which confirms my
suspicion.  The question is, did I uncover a bug or is this by design.


<xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
<xhtml:head>
<xforms:model id="model" version="1.1">
<xforms:instance id="inst">
<Root/>
</xforms:instance>
</xforms:model>
<xhtml:title>Attribute Value Template Escape Test</xhtml:title>
</xhtml:head>
<xhtml:body>
<xforms:group ref="instance('inst')/Root/NonExistentNode">
<xhtml:div data="{{'item':'value'}}">This div will not have the data
attribute value</xhtml:div>
</xforms:group>
<xhtml:div data="{{'item':'value'}}">This div will have the data
attribute value</xhtml:div>
</xhtml:body>
</xhtml:html>


--
------------------------------------------------------------------------
Jeremy Nix
Senior Application Developer
Cincinnati Children's Hospital Medical Center


--
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: Possible bug in Attribute Value Template evaluation

Jeremy Nix
Has anyone else had to use curly braces within attributes?  If so, have
you come across this particular case that I have described below?  Are
you aware of any workarounds?

Thanks for the help,

------------------------------------------------------------------------
Jeremy Nix
Senior Application Developer
Cincinnati Children's Hospital Medical Center

On 03/26/2010 03:51 PM, Jeremy Nix wrote:

> I am doing some things in my form in native javascript.  One of the
> things that I was doing was storing JSON data structures as attributes
> of various HTML elements.  I realized that I needed to escape out any
> curly braces in order to avoid AVT expression evaluation.  I've
> noticed, however, that even though the attributes are properly
> escaped, the attribute values are not properly parsed through in the
> resulting html.  I've outlined a simple example of this below.  Notice
> that one of my divs that contains this custom attribute is within a
> group that references a non existent node (and therefore is not
> relevant) while the other is outside the context of that group.  When
> this gets rendered in the latest/greatest version of Orbeon (today's
> dev release) the non-relevant div's attribute does not get propagated
> through.  I changed the group reference to be "instance('inst')" to
> see if the inner div would then have the attribute value, and it did
> which confirms my suspicion.  The question is, did I uncover a bug or
> is this by design.
>
>
> <xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
> xmlns:xhtml="http://www.w3.org/1999/xhtml">
> <xhtml:head>
> <xforms:model id="model" version="1.1">
> <xforms:instance id="inst">
> <Root/>
> </xforms:instance>
> </xforms:model>
> <xhtml:title>Attribute Value Template Escape Test</xhtml:title>
> </xhtml:head>
> <xhtml:body>
> <xforms:group ref="instance('inst')/Root/NonExistentNode">
> <xhtml:div data="{{'item':'value'}}">This div will not have the data
> attribute value</xhtml:div>
> </xforms:group>
> <xhtml:div data="{{'item':'value'}}">This div will have the data
> attribute value</xhtml:div>
> </xhtml:body>
> </xhtml:html>
>
>


--
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: Possible bug in Attribute Value Template evaluation

Louis Ratzesberger
In reply to this post by Jeremy Nix

  recall that if you process your view through xslt, then you have to
"double escape" your ATV's so they remain for the XForms engine to
use.

However, I have never seen a case where one works and the next one doesn't.

--Hank

On Apr 1, 2010, at 5:20 AM, Jeremy Nix wrote:

Has anyone else had to use curly braces within attributes?  If so, have you come across this particular case that I have described below?  Are you aware of any workarounds?

Thanks for the help,

------------------------------------------------------------------------
Jeremy Nix
Senior Application Developer
Cincinnati Children's Hospital Medical Center

On 03/26/2010 03:51 PM, Jeremy Nix wrote:
I am doing some things in my form in native javascript.  One of the things that I was doing was storing JSON data structures as attributes of various HTML elements.  I realized that I needed to escape out any curly braces in order to avoid AVT expression evaluation.  I've noticed, however, that even though the attributes are properly escaped, the attribute values are not properly parsed through in the resulting html.  I've outlined a simple example of this below.  Notice that one of my divs that contains this custom attribute is within a group that references a non existent node (and therefore is not relevant) while the other is outside the context of that group.  When this gets rendered in the latest/greatest version of Orbeon (today's dev release) the non-relevant div's attribute does not get propagated through.  I changed the group reference to be "instance('inst')" to see if the inner div would then have the attribute value, and it did which confirms my suspicion.  The question is, did I uncover a bug or is this by design.


<xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<xhtml:head>
<xforms:model id="model" version="1.1">
<xforms:instance id="inst">
<Root/>
</xforms:instance>
</xforms:model>
<xhtml:title>Attribute Value Template Escape Test</xhtml:title>
</xhtml:head>
<xhtml:body>
<xforms:group ref="instance('inst')/Root/NonExistentNode">
<xhtml:div data="{{'item':'value'}}">This div will not have the data attribute value</xhtml:div>
</xforms:group>
<xhtml:div data="{{'item':'value'}}">This div will have the data attribute value</xhtml:div>
</xhtml:body>
</xhtml:html>



--
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: Possible bug in Attribute Value Template evaluation

Jeremy Nix
In reply to this post by Jeremy Nix
I did not think about having to double escape the curly braces in the attribute value, but in my particular case is does not matter as I'm not using XSLT to generate the XHTML markup.  Were you able to try out and see what I was referring to?  Just curious if this is something particular to my configuration.

-- Jeremy

>>> Louis Ratzesberger <[hidden email]> 04/02/10 5:47 PM >>>


  recall that if you process your view through xslt, then you have to
"double escape" your ATV's so they remain for the XForms engine to
use.

However, I have never seen a case where one works and the next one doesn't.

--Hank

On Apr 1, 2010, at 5:20 AM, Jeremy Nix wrote:

Has anyone else had to use curly braces within attributes?  If so, have you come across this particular case that I have described below?  Are you aware of any workarounds?

Thanks for the help,

------------------------------------------------------------------------
Jeremy Nix
Senior Application Developer
Cincinnati Children's Hospital Medical Center

On 03/26/2010 03:51 PM, Jeremy Nix wrote:
I am doing some things in my form in native javascript.  One of the things that I was doing was storing JSON data structures as attributes of various HTML elements.  I realized that I needed to escape out any curly braces in order to avoid AVT expression evaluation.  I've noticed, however, that even though the attributes are properly escaped, the attribute values are not properly parsed through in the resulting html.  I've outlined a simple example of this below.  Notice that one of my divs that contains this custom attribute is within a group that references a non existent node (and therefore is not relevant) while the other is outside the context of that group.  When this gets rendered in the latest/greatest version of Orbeon (today's dev release) the non-relevant div's attribute does not get propagated through.  I changed the group reference to be "instance('inst')" to see if the inner div would then have the attribute value, and it did which confirms my suspicion.  The question is, did I uncover a bug or is this by design.

<xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xhtml="http://www.w3.org/1999/xhtml">
<xhtml:head>
<xforms:model id="model" version="1.1">
<xforms:instance id="inst">
<Root/>
</xforms:instance>
</xforms:model>
<xhtml:title>Attribute Value Template Escape Test</xhtml:title>
</xhtml:head>
<xhtml:body>
<xforms:group ref="instance('inst')/Root/NonExistentNode">
<xhtml:div data="{{'item':'value'}}">This div will not have the data attribute value</xhtml:div>
</xforms:group>
<xhtml:div data="{{'item':'value'}}">This div will have the data attribute value</xhtml:div>
</xhtml:body>
</xhtml:html>

--
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: Possible bug in Attribute Value Template evaluation

Alessandro  Vernet
Administrator
In reply to this post by Jeremy Nix
Jeremy,

I am not sure to understand what is the problem you are seeing. I run
the example you attached, and the first div is not shown, as inside a
group bound to an empty sequence, while the second one is shown. The
HTML for second div reads:

<div data="{'item':'value'}" id="xf-5">This div will have the data
attribute value</div>

This looks correct (as you escaped {{ and }} so it wouldn't be
interpreted as an AVT by the XForms engine).

Alex

On Fri, Mar 26, 2010 at 12:51 PM, Jeremy Nix <[hidden email]> wrote:

> I am doing some things in my form in native javascript.  One of the things
> that I was doing was storing JSON data structures as attributes of various
> HTML elements.  I realized that I needed to escape out any curly braces in
> order to avoid AVT expression evaluation.  I've noticed, however, that even
> though the attributes are properly escaped, the attribute values are not
> properly parsed through in the resulting html.  I've outlined a simple
> example of this below.  Notice that one of my divs that contains this custom
> attribute is within a group that references a non existent node (and
> therefore is not relevant) while the other is outside the context of that
> group.  When this gets rendered in the latest/greatest version of Orbeon
> (today's dev release) the non-relevant div's attribute does not get
> propagated through.  I changed the group reference to be "instance('inst')"
> to see if the inner div would then have the attribute value, and it did
> which confirms my suspicion.  The question is, did I uncover a bug or is
> this by design.
>
>
> <xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
> xmlns:xhtml="http://www.w3.org/1999/xhtml">
> <xhtml:head>
> <xforms:model id="model" version="1.1">
> <xforms:instance id="inst">
> <Root/>
> </xforms:instance>
> </xforms:model>
> <xhtml:title>Attribute Value Template Escape Test</xhtml:title>
> </xhtml:head>
> <xhtml:body>
> <xforms:group ref="instance('inst')/Root/NonExistentNode">
> <xhtml:div data="{{'item':'value'}}">This div will not have the data
> attribute value</xhtml:div>
> </xforms:group>
> <xhtml:div data="{{'item':'value'}}">This div will have the data attribute
> value</xhtml:div>
> </xhtml:body>
> </xhtml:html>
>
>
> --
> ------------------------------------------------------------------------
> Jeremy Nix
> Senior Application Developer
> Cincinnati Children's Hospital Medical Center
>
>
> --
> 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
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Re: Possible bug in Attribute Value Template evaluation

Jeremy Nix
Alex,

What I noticed is that the other div that is within the group bound to a
non existent node did not bring through the value of the attribute to
the client.  So, if you view the page source, you will see something
like this:

<div  data=""id="xf-3">This div will not have the data attribute value</div>


I would have expected the attribute value to be there as it was with the
other div.
------------------------------------------------------------------------
Jeremy Nix
Senior Application Developer
Cincinnati Children's Hospital Medical Center

On 04/06/2010 02:05 PM, Alessandro Vernet wrote:

> Jeremy,
>
> I am not sure to understand what is the problem you are seeing. I run
> the example you attached, and the first div is not shown, as inside a
> group bound to an empty sequence, while the second one is shown. The
> HTML for second div reads:
>
> <div data="{'item':'value'}" id="xf-5">This div will have the data
> attribute value</div>
>
> This looks correct (as you escaped {{ and }} so it wouldn't be
> interpreted as an AVT by the XForms engine).
>
> Alex
>
> On Fri, Mar 26, 2010 at 12:51 PM, Jeremy Nix<[hidden email]>  wrote:
>    
>> I am doing some things in my form in native javascript.  One of the things
>> that I was doing was storing JSON data structures as attributes of various
>> HTML elements.  I realized that I needed to escape out any curly braces in
>> order to avoid AVT expression evaluation.  I've noticed, however, that even
>> though the attributes are properly escaped, the attribute values are not
>> properly parsed through in the resulting html.  I've outlined a simple
>> example of this below.  Notice that one of my divs that contains this custom
>> attribute is within a group that references a non existent node (and
>> therefore is not relevant) while the other is outside the context of that
>> group.  When this gets rendered in the latest/greatest version of Orbeon
>> (today's dev release) the non-relevant div's attribute does not get
>> propagated through.  I changed the group reference to be "instance('inst')"
>> to see if the inner div would then have the attribute value, and it did
>> which confirms my suspicion.  The question is, did I uncover a bug or is
>> this by design.
>>
>>
>> <xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
>> xmlns:xhtml="http://www.w3.org/1999/xhtml">
>> <xhtml:head>
>> <xforms:model id="model" version="1.1">
>> <xforms:instance id="inst">
>> <Root/>
>> </xforms:instance>
>> </xforms:model>
>> <xhtml:title>Attribute Value Template Escape Test</xhtml:title>
>> </xhtml:head>
>> <xhtml:body>
>> <xforms:group ref="instance('inst')/Root/NonExistentNode">
>> <xhtml:div data="{{'item':'value'}}">This div will not have the data
>> attribute value</xhtml:div>
>> </xforms:group>
>> <xhtml:div data="{{'item':'value'}}">This div will have the data attribute
>> value</xhtml:div>
>> </xhtml:body>
>> </xhtml:html>
>>
>>
>> --
>> ------------------------------------------------------------------------
>> Jeremy Nix
>> Senior Application Developer
>> Cincinnati Children's Hospital Medical Center
>>
>>
>> --
>> 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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Possible bug in Attribute Value Template evaluation

Alessandro  Vernet
Administrator
Jeremy,

I see. Orbeon Forms can't evaluate an AVT when it doesn't have an
XPath context, but here you don't want to use an AVTs; you are just
escaping the JSON so it isn't understood as an AVT; is that right?

Alex

On Tue, Apr 6, 2010 at 11:14 AM, Jeremy Nix <[hidden email]> wrote:

> Alex,
>
> What I noticed is that the other div that is within the group bound to a non
> existent node did not bring through the value of the attribute to the
> client.  So, if you view the page source, you will see something like this:
>
> <div  data=""id="xf-3">This div will not have the data attribute value</div>
>
>
> I would have expected the attribute value to be there as it was with the
> other div.
> ------------------------------------------------------------------------
> Jeremy Nix
> Senior Application Developer
> Cincinnati Children's Hospital Medical Center
>
> On 04/06/2010 02:05 PM, Alessandro Vernet wrote:
>>
>> Jeremy,
>>
>> I am not sure to understand what is the problem you are seeing. I run
>> the example you attached, and the first div is not shown, as inside a
>> group bound to an empty sequence, while the second one is shown. The
>> HTML for second div reads:
>>
>> <div data="{'item':'value'}" id="xf-5">This div will have the data
>> attribute value</div>
>>
>> This looks correct (as you escaped {{ and }} so it wouldn't be
>> interpreted as an AVT by the XForms engine).
>>
>> Alex
>>
>> On Fri, Mar 26, 2010 at 12:51 PM, Jeremy Nix<[hidden email]>  wrote:
>>
>>>
>>> I am doing some things in my form in native javascript.  One of the
>>> things
>>> that I was doing was storing JSON data structures as attributes of
>>> various
>>> HTML elements.  I realized that I needed to escape out any curly braces
>>> in
>>> order to avoid AVT expression evaluation.  I've noticed, however, that
>>> even
>>> though the attributes are properly escaped, the attribute values are not
>>> properly parsed through in the resulting html.  I've outlined a simple
>>> example of this below.  Notice that one of my divs that contains this
>>> custom
>>> attribute is within a group that references a non existent node (and
>>> therefore is not relevant) while the other is outside the context of that
>>> group.  When this gets rendered in the latest/greatest version of Orbeon
>>> (today's dev release) the non-relevant div's attribute does not get
>>> propagated through.  I changed the group reference to be
>>> "instance('inst')"
>>> to see if the inner div would then have the attribute value, and it did
>>> which confirms my suspicion.  The question is, did I uncover a bug or is
>>> this by design.
>>>
>>>
>>> <xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
>>> xmlns:xhtml="http://www.w3.org/1999/xhtml">
>>> <xhtml:head>
>>> <xforms:model id="model" version="1.1">
>>> <xforms:instance id="inst">
>>> <Root/>
>>> </xforms:instance>
>>> </xforms:model>
>>> <xhtml:title>Attribute Value Template Escape Test</xhtml:title>
>>> </xhtml:head>
>>> <xhtml:body>
>>> <xforms:group ref="instance('inst')/Root/NonExistentNode">
>>> <xhtml:div data="{{'item':'value'}}">This div will not have the data
>>> attribute value</xhtml:div>
>>> </xforms:group>
>>> <xhtml:div data="{{'item':'value'}}">This div will have the data
>>> attribute
>>> value</xhtml:div>
>>> </xhtml:body>
>>> </xhtml:html>
>>>
>>>
>>> --
>>> ------------------------------------------------------------------------
>>> Jeremy Nix
>>> Senior Application Developer
>>> Cincinnati Children's Hospital Medical Center
>>>
>>>
>>> --
>>> 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
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Re: Possible bug in Attribute Value Template evaluation

Jeremy Nix
Alex,

That's correct.
------------------------------------------------------------------------
Jeremy Nix
Senior Application Developer
Cincinnati Children's Hospital Medical Center

On 04/06/2010 02:41 PM, Alessandro Vernet wrote:

> Jeremy,
>
> I see. Orbeon Forms can't evaluate an AVT when it doesn't have an
> XPath context, but here you don't want to use an AVTs; you are just
> escaping the JSON so it isn't understood as an AVT; is that right?
>
> Alex
>
> On Tue, Apr 6, 2010 at 11:14 AM, Jeremy Nix<[hidden email]>  wrote:
>    
>> Alex,
>>
>> What I noticed is that the other div that is within the group bound to a non
>> existent node did not bring through the value of the attribute to the
>> client.  So, if you view the page source, you will see something like this:
>>
>> <div  data=""id="xf-3">This div will not have the data attribute value</div>
>>
>>
>> I would have expected the attribute value to be there as it was with the
>> other div.
>> ------------------------------------------------------------------------
>> Jeremy Nix
>> Senior Application Developer
>> Cincinnati Children's Hospital Medical Center
>>
>> On 04/06/2010 02:05 PM, Alessandro Vernet wrote:
>>      
>>> Jeremy,
>>>
>>> I am not sure to understand what is the problem you are seeing. I run
>>> the example you attached, and the first div is not shown, as inside a
>>> group bound to an empty sequence, while the second one is shown. The
>>> HTML for second div reads:
>>>
>>> <div data="{'item':'value'}" id="xf-5">This div will have the data
>>> attribute value</div>
>>>
>>> This looks correct (as you escaped {{ and }} so it wouldn't be
>>> interpreted as an AVT by the XForms engine).
>>>
>>> Alex
>>>
>>> On Fri, Mar 26, 2010 at 12:51 PM, Jeremy Nix<[hidden email]>    wrote:
>>>
>>>        
>>>> I am doing some things in my form in native javascript.  One of the
>>>> things
>>>> that I was doing was storing JSON data structures as attributes of
>>>> various
>>>> HTML elements.  I realized that I needed to escape out any curly braces
>>>> in
>>>> order to avoid AVT expression evaluation.  I've noticed, however, that
>>>> even
>>>> though the attributes are properly escaped, the attribute values are not
>>>> properly parsed through in the resulting html.  I've outlined a simple
>>>> example of this below.  Notice that one of my divs that contains this
>>>> custom
>>>> attribute is within a group that references a non existent node (and
>>>> therefore is not relevant) while the other is outside the context of that
>>>> group.  When this gets rendered in the latest/greatest version of Orbeon
>>>> (today's dev release) the non-relevant div's attribute does not get
>>>> propagated through.  I changed the group reference to be
>>>> "instance('inst')"
>>>> to see if the inner div would then have the attribute value, and it did
>>>> which confirms my suspicion.  The question is, did I uncover a bug or is
>>>> this by design.
>>>>
>>>>
>>>> <xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
>>>> xmlns:xhtml="http://www.w3.org/1999/xhtml">
>>>> <xhtml:head>
>>>> <xforms:model id="model" version="1.1">
>>>> <xforms:instance id="inst">
>>>> <Root/>
>>>> </xforms:instance>
>>>> </xforms:model>
>>>> <xhtml:title>Attribute Value Template Escape Test</xhtml:title>
>>>> </xhtml:head>
>>>> <xhtml:body>
>>>> <xforms:group ref="instance('inst')/Root/NonExistentNode">
>>>> <xhtml:div data="{{'item':'value'}}">This div will not have the data
>>>> attribute value</xhtml:div>
>>>> </xforms:group>
>>>> <xhtml:div data="{{'item':'value'}}">This div will have the data
>>>> attribute
>>>> value</xhtml:div>
>>>> </xhtml:body>
>>>> </xhtml:html>
>>>>
>>>>
>>>> --
>>>> ------------------------------------------------------------------------
>>>> Jeremy Nix
>>>> Senior Application Developer
>>>> Cincinnati Children's Hospital Medical Center
>>>>
>>>>
>>>> --
>>>> 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
>>
>>
>>      
>
>
>    


--
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: Re: Re: Re: Possible bug in Attribute Value Template evaluation

Alessandro  Vernet
Administrator
Jeremy,

Understood; I created a bug for this:

http://forge.ow2.org/tracker/index.php?func=detail&aid=314901&group_id=168&atid=350207

Alex

On Tue, Apr 6, 2010 at 12:37 PM, Jeremy Nix <[hidden email]> wrote:

> Alex,
>
> That's correct.
> ------------------------------------------------------------------------
> Jeremy Nix
> Senior Application Developer
> Cincinnati Children's Hospital Medical Center
>
> On 04/06/2010 02:41 PM, Alessandro Vernet wrote:
>>
>> Jeremy,
>>
>> I see. Orbeon Forms can't evaluate an AVT when it doesn't have an
>> XPath context, but here you don't want to use an AVTs; you are just
>> escaping the JSON so it isn't understood as an AVT; is that right?
>>
>> Alex
>>
>> On Tue, Apr 6, 2010 at 11:14 AM, Jeremy Nix<[hidden email]>  wrote:
>>
>>>
>>> Alex,
>>>
>>> What I noticed is that the other div that is within the group bound to a
>>> non
>>> existent node did not bring through the value of the attribute to the
>>> client.  So, if you view the page source, you will see something like
>>> this:
>>>
>>> <div  data=""id="xf-3">This div will not have the data attribute
>>> value</div>
>>>
>>>
>>> I would have expected the attribute value to be there as it was with the
>>> other div.
>>> ------------------------------------------------------------------------
>>> Jeremy Nix
>>> Senior Application Developer
>>> Cincinnati Children's Hospital Medical Center
>>>
>>> On 04/06/2010 02:05 PM, Alessandro Vernet wrote:
>>>
>>>>
>>>> Jeremy,
>>>>
>>>> I am not sure to understand what is the problem you are seeing. I run
>>>> the example you attached, and the first div is not shown, as inside a
>>>> group bound to an empty sequence, while the second one is shown. The
>>>> HTML for second div reads:
>>>>
>>>> <div data="{'item':'value'}" id="xf-5">This div will have the data
>>>> attribute value</div>
>>>>
>>>> This looks correct (as you escaped {{ and }} so it wouldn't be
>>>> interpreted as an AVT by the XForms engine).
>>>>
>>>> Alex
>>>>
>>>> On Fri, Mar 26, 2010 at 12:51 PM, Jeremy Nix<[hidden email]>
>>>>  wrote:
>>>>
>>>>
>>>>>
>>>>> I am doing some things in my form in native javascript.  One of the
>>>>> things
>>>>> that I was doing was storing JSON data structures as attributes of
>>>>> various
>>>>> HTML elements.  I realized that I needed to escape out any curly braces
>>>>> in
>>>>> order to avoid AVT expression evaluation.  I've noticed, however, that
>>>>> even
>>>>> though the attributes are properly escaped, the attribute values are
>>>>> not
>>>>> properly parsed through in the resulting html.  I've outlined a simple
>>>>> example of this below.  Notice that one of my divs that contains this
>>>>> custom
>>>>> attribute is within a group that references a non existent node (and
>>>>> therefore is not relevant) while the other is outside the context of
>>>>> that
>>>>> group.  When this gets rendered in the latest/greatest version of
>>>>> Orbeon
>>>>> (today's dev release) the non-relevant div's attribute does not get
>>>>> propagated through.  I changed the group reference to be
>>>>> "instance('inst')"
>>>>> to see if the inner div would then have the attribute value, and it did
>>>>> which confirms my suspicion.  The question is, did I uncover a bug or
>>>>> is
>>>>> this by design.
>>>>>
>>>>>
>>>>> <xhtml:html xmlns:xforms="http://www.w3.org/2002/xforms"
>>>>> xmlns:xhtml="http://www.w3.org/1999/xhtml">
>>>>> <xhtml:head>
>>>>> <xforms:model id="model" version="1.1">
>>>>> <xforms:instance id="inst">
>>>>> <Root/>
>>>>> </xforms:instance>
>>>>> </xforms:model>
>>>>> <xhtml:title>Attribute Value Template Escape Test</xhtml:title>
>>>>> </xhtml:head>
>>>>> <xhtml:body>
>>>>> <xforms:group ref="instance('inst')/Root/NonExistentNode">
>>>>> <xhtml:div data="{{'item':'value'}}">This div will not have the data
>>>>> attribute value</xhtml:div>
>>>>> </xforms:group>
>>>>> <xhtml:div data="{{'item':'value'}}">This div will have the data
>>>>> attribute
>>>>> value</xhtml:div>
>>>>> </xhtml:body>
>>>>> </xhtml:html>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> ------------------------------------------------------------------------
>>>>> Jeremy Nix
>>>>> Senior Application Developer
>>>>> Cincinnati Children's Hospital Medical Center
>>>>>
>>>>>
>>>>> --
>>>>> 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
>>>
>>>
>>>
>>
>>
>>
>
>
> --
> 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
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

How to reference a temporary file in the Zip processor

Alan Leavy

Hi,

I have a pipeline that writes an XML document to a temporary file scoped to the session:

 

<!-- Write the document to a temporary file -->

  <p:processor name="oxf:file-serializer">

  <p:input name="config">

    <config>

      <scope>session</scope>

    </config>

  </p:input>

  <p:input name="data" href="#converted"/>

  <p:output name="data" id="url-written"/>

</p:processor>

 

Then I'd like to zip this file (as sheet1.xml) with a bunch of other resource files. How can I reference the temporary file in the Zip Processor? My first attempt was to try this:

 

<!-- Zip up this file with the other Excel template components to create the Excel file -->  <p:processor name="oxf:zip">

    <p:input name="data">

        <files><file name="[Content_Types].xml">file:///excel-template/Content_Types.xml</file>

          <file name="docProps/app.xml">file:///excel-template/docProps/app.xml</file>

          <file name="docProps/core.xml">file:///excel-template/docProps/core.xml</file>

          <file name="xl/sharedStrings.xml">file:///excel-template/xl/sharedStrings.xml</file>

          <file name="xl/styles.xml">file:///excel-template/xl/styles.xml</file>

          <file name="xl/workbook.xml">file:///excel-template/xl/workbook.xml</file>

          <file name="xl/theme/theme1.xml">file:///excel-template/xl/theme/theme1.xml</file>

          <file name="xl/worksheets/sheet1.xml" href="#url-written"></file>

          <file name="xl/_rels/workbook.xml.rels">file:///excel-template/xl/_rels/workbook.xml.rels</file>

          <file name="_rels/.rels">file:///excel-template/_rels/.rels</file>

        </files>

      </p:input>

      <p:output name="data" id="zip"/>

    </p:processor>

 

I wasn’t really expecting this to work, and indeed, I got an “URI is not absolute” error.

 

Can the <file> parameters of the zip processor be anything other than literals?  If so, how can I use the URL returned by the file-serializer processor as one of the files?

 

Regards,

   Alan.



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

theme.xsl ignored?

Baker, Matt
I'm trying to include a theme.xsl file in my app directory (to override theme-examples.xsl). When I force-refresh my app, it still seems to be using the theme-examples.xsl file (noticed by making a change in theme-examples.xsl). The theme.xsl is just a copy of theme-examples.xsl with an extra word added to the title to check to see if it is loading.

I am using a current nightly build (3.8).

Thanks!

Matt Baker
University of Arkansas for Medical Sciences

--
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 to reference a temporary file in the Zip processor

Louis Ratzesberger
In reply to this post by Alan Leavy

Hi Alan,

Look to the example of the unzip processor, which takes advantage of an
xpl feature that will process the input with xslt when you provide the
transform attribute:

http://wiki.orbeon.com/forms/doc/developer-guide/processors-zip-unzip

Cheers,
Hank

Quoting "Leavy, Alan" <[hidden email]>:

> Hi,
>
> I have a pipeline that writes an XML document to a temporary file scoped
> to the session:
>
>
>
> <!-- Write the document to a temporary file -->
>
>   <p:processor name="oxf:file-serializer">
>
>   <p:input name="config">
>
>     <config>
>
>       <scope>session</scope>
>
>     </config>
>
>   </p:input>
>
>   <p:input name="data" href="#converted"/>
>
>   <p:output name="data" id="url-written"/>
>
> </p:processor>
>
>
>
> Then I'd like to zip this file (as sheet1.xml) with a bunch of other
> resource files. How can I reference the temporary file in the Zip
> Processor? My first attempt was to try this:
>
>
>
> <!-- Zip up this file with the other Excel template components to create
> the Excel file -->  <p:processor name="oxf:zip">
>
>     <p:input name="data">
>
>         <files><file
> name="[Content_Types].xml">file:///excel-template/Content_Types.xml</fil
> e>
>
>           <file
> name="docProps/app.xml">file:///excel-template/docProps/app.xml</file>
>
>           <file
> name="docProps/core.xml">file:///excel-template/docProps/core.xml</file>
>
>           <file
> name="xl/sharedStrings.xml">file:///excel-template/xl/sharedStrings.xml<
> /file>
>
>           <file
> name="xl/styles.xml">file:///excel-template/xl/styles.xml</file>
>
>           <file
> name="xl/workbook.xml">file:///excel-template/xl/workbook.xml</file>
>
>           <file
> name="xl/theme/theme1.xml">file:///excel-template/xl/theme/theme1.xml</f
> ile>
>
>           <file name="xl/worksheets/sheet1.xml"
> href="#url-written"></file>
>
>           <file
> name="xl/_rels/workbook.xml.rels">file:///excel-template/xl/_rels/workbo
> ok.xml.rels</file>
>
>           <file
> name="_rels/.rels">file:///excel-template/_rels/.rels</file>
>
>         </files>
>
>       </p:input>
>
>       <p:output name="data" id="zip"/>
>
>     </p:processor>
>
>
>
> I wasn't really expecting this to work, and indeed, I got an "URI is not
> absolute" error.
>
>
>
> Can the <file> parameters of the zip processor be anything other than
> literals?  If so, how can I use the URL returned by the file-serializer
> processor as one of the files?
>
>
>
> Regards,
>
>    Alan.
>
>


--
Hank Ratzesberger
[hidden email]



--
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: theme.xsl ignored?

Alessandro  Vernet
Administrator
In reply to this post by Baker, Matt
Matt,

I tried this, and it works for me. I copied the theme-examples.xsl to
apps/xforms-hello/theme.xsl, and if I load the xforms-hello example, I
can see it uses that theme because I get the error "Cannot read from
file /apps/apps-list.xml". This is because the XSLT does a
doc('../apps-list.xml'), which needs to be changed to
doc('../../apps-list.xml'). After this everything works. Are you doing
something different?

Alex

On Fri, Apr 16, 2010 at 8:49 AM, Baker, Matt <[hidden email]> wrote:

> I'm trying to include a theme.xsl file in my app directory (to override theme-examples.xsl). When I force-refresh my app, it still seems to be using the theme-examples.xsl file (noticed by making a change in theme-examples.xsl). The theme.xsl is just a copy of theme-examples.xsl with an extra word added to the title to check to see if it is loading.
>
> I am using a current nightly build (3.8).
>
> Thanks!
>
> Matt Baker
> University of Arkansas for Medical Sciences
>
> --
> 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
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

RE: Re: How to reference a temporary file in the Zip processor

Alan Leavy
In reply to this post by Louis Ratzesberger

Hi Hank,

 

Ah, yes, that makes sense. Thanks for pointing me in the right direction.

 

For the record, the relevant part of my pipeline, which works a treat, now looks like this:

 

  <!-- Write the document to a temporary file -->

  <p:processor name="oxf:file-serializer">

    <p:input name="config">

      <config>

        <scope>session</scope>

      </config>

    </p:input>

    <p:input name="data" href="#converted"/>

    <p:output name="data" id="url-written"/>

  </p:processor>

 

  <!-- Zip up this file with the other Excel template components to create the Excel file -->

 

    <!-- Create the list of files to be zipped-->

  <p:processor name="oxf:xslt">

    <p:input name="config">

      <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

        <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no"/>

          <xsl:template match="/">

            <files>

              <file name="[Content_Types].xml">file:///excel-template/Content_Types.xml</file>

              <file name="docProps/app.xml">file:///excel-template/docProps/app.xml</file>

              <file name="docProps/core.xml">file:///excel-template/docProps/core.xml</file>

              <file name="xl/sharedStrings.xml">file:///excel-template/xl/sharedStrings.xml</file>

              <file name="xl/styles.xml">file:///excel-template/xl/styles.xml</file>

              <file name="xl/workbook.xml">file:///excel-template/xl/workbook.xml</file>

              <file name="xl/theme/theme1.xml">file:///excel-template/xl/theme/theme1.xml</file>

              <file name="xl/worksheets/sheet1.xml">

                <xsl:value-of select="."/>

              </file>

              <file name="xl/_rels/workbook.xml.rels">file:///excel-template/xl/_rels/workbook.xml.rels</file>

              <file name="_rels/.rels">file:///excel-template/_rels/.rels</file>

            </files>

          </xsl:template>

        </xsl:stylesheet>

      </p:input>

      <p:input name="data" href="#url-written"></p:input>

      <p:output name="data" id="file-list"/>

    </p:processor>

 

      <!-- ZIP the files -->

    <p:processor name="oxf:zip">

      <p:input name="temp-file" href="#url-written"/>

      <p:input name="data" href="#file-list"/>

    <p:output name="data" id="zip"/>

  </p:processor>

 

Regards,

    Alan.

 

-----Original Message-----
From: Louis Ratzesberger [mailto:[hidden email]]
Sent: Friday, April 16, 2010 7:28 PM
To: [hidden email]
Subject: [ops-users] Re: How to reference a temporary file in the Zip processor

 

 

Hi Alan,

 

Look to the example of the unzip processor, which takes advantage of an xpl feature that will process the input with xslt when you provide the transform attribute:

 

http://wiki.orbeon.com/forms/doc/developer-guide/processors-zip-unzip

 

Cheers,

Hank

 

Quoting "Leavy, Alan" <[hidden email]>:

 

> Hi,

> 

> I have a pipeline that writes an XML document to a temporary file

> scoped to the session:

> 

> 

> 

> <!-- Write the document to a temporary file -->

> 

>   <p:processor name="oxf:file-serializer">

> 

>   <p:input name="config">

> 

>     <config>

> 

>       <scope>session</scope>

> 

>     </config>

> 

>   </p:input>

> 

>   <p:input name="data" href="#converted"/>

> 

>   <p:output name="data" id="url-written"/>

> 

> </p:processor>

> 

> 

> 

> Then I'd like to zip this file (as sheet1.xml) with a bunch of other

> resource files. How can I reference the temporary file in the Zip

> Processor? My first attempt was to try this:

> 

> 

> 

> <!-- Zip up this file with the other Excel template components to

> create the Excel file -->  <p:processor name="oxf:zip">

> 

>     <p:input name="data">

> 

>         <files><file

> name="[Content_Types].xml">file:///excel-template/Content_Types.xml</f

> il

> e>

> 

>           <file

> name="docProps/app.xml">file:///excel-template/docProps/app.xml</file>

> 

>           <file

> name="docProps/core.xml">file:///excel-template/docProps/core.xml</fil

> e>

> 

>           <file

> name="xl/sharedStrings.xml">file:///excel-template/xl/sharedStrings.xm

> l<

> /file>

> 

>           <file

> name="xl/styles.xml">file:///excel-template/xl/styles.xml</file>

> 

>           <file

> name="xl/workbook.xml">file:///excel-template/xl/workbook.xml</file>

> 

>           <file

> name="xl/theme/theme1.xml">file:///excel-template/xl/theme/theme1.xml<

> /f

> ile>

> 

>           <file name="xl/worksheets/sheet1.xml"

> href="#url-written"></file>

> 

>           <file

> name="xl/_rels/workbook.xml.rels">file:///excel-template/xl/_rels/work

> bo

> ok.xml.rels</file>

> 

>           <file

> name="_rels/.rels">file:///excel-template/_rels/.rels</file>

> 

>         </files>

> 

>       </p:input>

> 

>       <p:output name="data" id="zip"/>

> 

>     </p:processor>

> 

> 

> 

> I wasn't really expecting this to work, and indeed, I got an "URI is

> not absolute" error.

> 

> 

> 

> Can the <file> parameters of the zip processor be anything other than

> literals?  If so, how can I use the URL returned by the

> file-serializer processor as one of the files?

> 

> 

> 

> Regards,

> 

>    Alan.

> 

> 

 

 

 

--

Hank Ratzesberger

[hidden email]

 



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

Page flow, default submission, and instances

Baker, Matt
I am trying to expand on the "wizard" example app (see my page-flow.xml below). If I remove the action, the form data is persisted through all four pages. However, after I add the action to the "subjects" page and that action is fired (redirecting me to the "multisite" page), I seem to lose the instance (the "multipage" page has 4 elements on it, which according to Firebug seem to be hidden).

I am very new at both advanced XML and Orbeon Forms, so please bear with me! I have a few questions:

1. The form element "is-multisite" is on the "basic" page. Why does the action need to be on the next page in the flow?

2. The "wizard" example uses "default-submission", without any "model" attributes for pages. How would the "wizard" example work using models instead of the single default submission? Should I use models instead of the default-submission tag here?

3. I'm still unclear as to how the form data is being transferred between each page, and why the "multisite" page (which refers to the same path for form elements as the other pages) is hiding its form elements.

Thank you for helping out a newcomer!

Matt Baker
University of Arkansas for Medical Sciences


<config xmlns="http://www.orbeon.com/oxf/controller"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:oxf="http://www.orbeon.com/oxf/processors" instance-passing="redirect">

   
<!-- The 4 steps (4 pages) of the wizard -->
   
<page id="basic"     path-info="/uams-protocol/"              view="000-basic.xhtml"  default-submission="initial-instance.xml"/>
   
<page id="subjects"  path-info="/uams-protocol/subjects"      view="100-subjects.xhtml">
       
<action when="/form/protocol/study-sites/is-multisite = 'YES'">
           
<result id="needs-multisite" page="multisite" />
       
</action>
   
</page>
   
<page id="multisite" path-info="/uams-protocol/sites"         view="110-sites.xhtml"/>
   
<page id="summary"   path-info="/uams-protocol/summary"       view="999-summary.xhtml"/>

   
<epilogue url="oxf:/config/epilogue.xpl"/>

</config>


--
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: theme.xsl ignored?

Baker, Matt
In reply to this post by Alessandro Vernet
After playing with the latest nightly build, I am able to get the custom theme.xsl to be used by all of my form pages except the first one on my page-flow. 

The path-info for the first form page was set to the app directory, and not to a specific name:
    <page id="basic"     path-info="/myapp/"              view="000-basic.xhtml"  default-submission="initial-instance.xml"/>
   
<page id="subjects"  path-info="/myapp/subjects"      view="100-subjects.xhtml">

changing "/myapp/" to "/myapp/basic" fixed the template.


Thanks for the help!

Matt


On Apr 16, 2010, at 10:08 PM, Alessandro Vernet wrote:

Matt,

I tried this, and it works for me. I copied the theme-examples.xsl to
apps/xforms-hello/theme.xsl, and if I load the xforms-hello example, I
can see it uses that theme because I get the error "Cannot read from
file /apps/apps-list.xml". This is because the XSLT does a
doc('../apps-list.xml'), which needs to be changed to
doc('../../apps-list.xml'). After this everything works. Are you doing
something different?

Alex

On Fri, Apr 16, 2010 at 8:49 AM, Baker, Matt <[hidden email]> wrote:
I'm trying to include a theme.xsl file in my app directory (to override theme-examples.xsl). When I force-refresh my app, it still seems to be using the theme-examples.xsl file (noticed by making a change in theme-examples.xsl). The theme.xsl is just a copy of theme-examples.xsl with an extra word added to the title to check to see if it is loading.

I am using a current nightly build (3.8).

Thanks!

Matt Baker
University of Arkansas for Medical Sciences

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





--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet
<message-footer.txt>



--
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: Page flow, default submission, and instances

Alessandro  Vernet
Administrator
In reply to this post by Baker, Matt
Matt,

On Mon, Apr 19, 2010 at 8:00 AM, Baker, Matt <[hidden email]> wrote:
> 1. The form element "is-multisite" is on the "basic" page. Why does the
> action need to be on the next page in the flow?

I assume that in 000-basic.xhtml you are doing a post to
/uams-protocol/subjects, so that entry in the page flow will be hit
when the submission runs.

> 2. The "wizard" example uses "default-submission", without any "model"
> attributes for pages. How would the "wizard" example work using models
> instead of the single default submission? Should I use models instead of the
> default-submission tag here?

The default-submission defines the instance used in your model and
view if that page doesn't receive XML through a POST. So this is
unrelated to you having a model defined for that page or not.

> 3. I'm still unclear as to how the form data is being transferred between
> each page, and why the "multisite" page (which refers to the same path for
> form elements as the other pages) is hiding its form elements.

I think that what you're saying is that you're surprised that the
/uams-protocol/subjects page is being hit while you still see
/uams-protocol/ in the URL bar of the browser. The short answer is
that we can't really show the URL of the target page in the browser
URL bar because of the way XForms works, but rest assure that the
request on your server comes in to /uams-protocol/subjects (the
request is just made from the server itself).

Alex
--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: theme.xsl ignored?

Alessandro  Vernet
Administrator
In reply to this post by Baker, Matt
Matt,

This is rather strange, since it is working for me testing this with
the XForms Hello example, with:

    <page path-info="/xforms-hello/" view="view.xhtml"/>

Maybe this is something that changed since the version you are using?
But I am glad you found a solution.

Alex

On Mon, Apr 19, 2010 at 10:11 AM, Baker, Matt <[hidden email]> wrote:

> After playing with the latest nightly build, I am able to get the custom
> theme.xsl to be used by all of my form pages except the first one on my
> page-flow.
> The path-info for the first form page was set to the app directory, and not
> to a specific name:
>     <page id="basic"     path-info="/myapp/"
> view="000-basic.xhtml"  default-submission="initial-instance.xml"/>
>     <page id="subjects"  path-info="/myapp/subjects"
> view="100-subjects.xhtml">
> changing "/myapp/" to "/myapp/basic" fixed the template.
>
> Thanks for the help!
> Matt
>
> On Apr 16, 2010, at 10:08 PM, Alessandro Vernet wrote:
>
> Matt,
>
> I tried this, and it works for me. I copied the theme-examples.xsl to
> apps/xforms-hello/theme.xsl, and if I load the xforms-hello example, I
> can see it uses that theme because I get the error "Cannot read from
> file /apps/apps-list.xml". This is because the XSLT does a
> doc('../apps-list.xml'), which needs to be changed to
> doc('../../apps-list.xml'). After this everything works. Are you doing
> something different?
>
> Alex
>
> On Fri, Apr 16, 2010 at 8:49 AM, Baker, Matt <[hidden email]> wrote:
>
> I'm trying to include a theme.xsl file in my app directory (to override
> theme-examples.xsl). When I force-refresh my app, it still seems to be using
> the theme-examples.xsl file (noticed by making a change in
> theme-examples.xsl). The theme.xsl is just a copy of theme-examples.xsl with
> an extra word added to the title to check to see if it is loading.
>
> I am using a current nightly build (3.8).
>
> Thanks!
>
> Matt Baker
>
> University of Arkansas for Medical Sciences
>
> --
>
> 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
>
>
>
>
>
> --
> Orbeon Forms - Web forms, open-source, for the Enterprise -
> http://www.orbeon.com/
> My Twitter: http://twitter.com/avernet
> <message-footer.txt>
>
>
> --
> 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
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet