xxforms:property in src attribute of instance

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

xxforms:property in src attribute of instance

Nicolas Modrzyk-3
Hello hello,

I am trying to do something like:
<xforms:instance id="my" src="xxforms:property('my.property')"/>

where the url (src attribute) of that xforms instance is defined in
orbeon properties.xml file.

But it doesn't seem I can not get it working this way.
Would you have any recommendation on how to achieve this ?

Thank you in advance,

Niko,


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

Sorting XML by date

NJ No1

Hi all,

 

Lets say I have a instance like this:

 

                  <!--<xf:instance id="main">

                        <entities xmlns="">

                              <entity>

                                    <person-name>

                                          <dob>01-02-2007</dob>

                                    </person-name>

                              </entity>

                              <entity>

                                    <person-name>

                                          <dob>1-12-2018</dob>

                                    </person-name>

                              </entity>

                              <entity>

                                    <person-name>

                                          <dob>3-10-2009</dob>

                                    </person-name>

                              </entity>

                        </entities>

                  </xf:instance> -->

 

 

And I want display a list of all the dob in order, like:

 

                  <xf:repeat nodeset="exf:sort(instance('main')/entity, '*:person-name/*:', 'number')" id="testRepeat">

                 

                        <tr>

                                    <td>

                                          <xf:output value="." />

                                    </td>

 

                        </tr>

                        <tr />

                  </xf:repeat></table>

 

Obviously this does not work as there is a ‘-‘ character in the date field. But I need to keep it in this format as I have a <xf:bind nodeset instance('main')/entity/person-name/dob" type="xs:date"/>, and I believe I need to keep it in this format, or do i??

 

So I was wondering if anyone has any ideas of how I would do this. Is there any other way without using exf:sort?

 

Thanks,

NJ

 

NOTICE

This e-mail and any attachments are confidential and may contain copyright material of Macquarie Group Limited or third parties. If you are not the intended recipient of this email you should not read, print, re-transmit, store or act in reliance on this e-mail or any attachments, and should destroy all copies of them. Macquarie Group Limited does not guarantee the integrity of any emails or any attached files. The views or opinions expressed are the author's own and may not reflect the views or opinions of Macquarie Group Limited.

 



--
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: xxforms:property in src attribute of instance

Alessandro Vernet
Administrator
In reply to this post by Nicolas Modrzyk-3
Nicolas,

On Wed, Apr 2, 2008 at 7:20 PM, Nicolas Modrzyk <[hidden email]> wrote:
>  <xforms:instance id="my" src="xxforms:property('my.property')"/>

Are you using a recent nightly build? I am asking, as
xxforms:property() is a recent addition. If you are, what is the error
you are getting? Could you quote the exception (say the top 50 lines)?

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.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: Sorting XML by date

Alessandro Vernet
Administrator
In reply to this post by NJ No1
On Wed, Apr 2, 2008 at 9:49 PM, Naman Joshi <[hidden email]> wrote:
> Obviously this does not work as there is a '-' character in the date field.
> But I need to keep it in this format as I have a <xf:bind nodeset
> instance('main')/entity/person-name/dob" type="xs:date"/>, and I believe I
> need to keep it in this format, or do i??

If you want <dob> to be an xs:date, then instead of 1-12-2018 you want
to have 2018-12-01. Once you have resolved that, if this is possible,
then you can sort just by lexical order, i.e. using "text" as the
third argument to exf:sort(), or just skipping that argument as "text"
is the default.

Alex
--
Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
Orbeon's Blog: http://www.orbeon.com/blog/
Personal Blog: http://avernet.blogspot.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: xxforms:property in src attribute of instance

Nicolas Modrzyk-3
In reply to this post by Alessandro Vernet
Alex,

Thank you for the fast answer.

No I'm using the final release from last december.
Would there be a stable release I could use that supports it ?
Or another way to achieve it ?

Niko,

On 4/3/08, Alessandro Vernet <[hidden email]> wrote:

> Nicolas,
>
>
>  On Wed, Apr 2, 2008 at 7:20 PM, Nicolas Modrzyk <[hidden email]> wrote:
>  >  <xforms:instance id="my" src="xxforms:property('my.property')"/>
>
>
> Are you using a recent nightly build? I am asking, as
>  xxforms:property() is a recent addition. If you are, what is the error
>  you are getting? Could you quote the exception (say the top 50 lines)?
>
>  Alex
>
> --
>  Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
>  Orbeon's Blog: http://www.orbeon.com/blog/
>  Personal Blog: http://avernet.blogspot.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
>
>


--
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: xxforms:property in src attribute of instance

Erik Bruchez
Administrator
In reply to this post by Nicolas Modrzyk-3
What you can do is instead run a submission upon receiving xforms-
ready or xforms-model-construct-done:

   http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-initialization

-Erik

On Apr 2, 2008, at 7:20 PM, Nicolas Modrzyk wrote:

> Hello hello,
>
> I am trying to do something like:
> <xforms:instance id="my" src="xxforms:property('my.property')"/>
>
> where the url (src attribute) of that xforms instance is defined in
> orbeon properties.xml file.
>
> But it doesn't seem I can not get it working this way.
> Would you have any recommendation on how to achieve this ?
>
> Thank you in advance,
>
> Niko,
--
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: xxforms:property in src attribute of instance

Nicolas Modrzyk-3
Hi Erik,

Thank you for your email. But ...

I'm afraid I did not understand your answer.

What I am trying to do, is to internationalize muttiple pipeline processors.
I would like to be able to change in only one place which language I
would like to get my server running and then all the xforms instance
would load the proper i18n file.

Niko,


On 4/4/08, Erik Bruchez <[hidden email]> wrote:

> What you can do is instead run a submission upon receiving xforms-ready or
> xforms-model-construct-done:
>
>
> http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-initialization
>
>  -Erik
>
>
>  On Apr 2, 2008, at 7:20 PM, Nicolas Modrzyk wrote:
>
> > Hello hello,
> >
> > I am trying to do something like:
> > <xforms:instance id="my"
> src="xxforms:property('my.property')"/>
> >
> > where the url (src attribute) of that xforms instance is defined in
> > orbeon properties.xml file.
> >
> > But it doesn't seem I can not get it working this way.
> > Would you have any recommendation on how to achieve this ?
> >
> > Thank you in advance,
> >
> > Niko,
> >
>
>  --
>  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
>
>


--
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: xxforms:property in src attribute of instance

Erik Bruchez
Administrator
Not sure what you mean by "internationalize muttiple pipeline  
processors"?

But if you are talking about internationalizing forms, then you need  
the following:

1. A notion of current language
2. Resources in multiple languages, whether stored in a single XML  
document or multiple XML documents
3. Switching the resources in an XForms page based on #1 and #2

So far does this look like what you are trying to achieve?

-Erik

On Apr 4, 2008, at 12:45 AM, Nicolas Modrzyk wrote:

> Hi Erik,
>
> Thank you for your email. But ...
>
> I'm afraid I did not understand your answer.
>
> What I am trying to do, is to internationalize muttiple pipeline  
> processors.
> I would like to be able to change in only one place which language I
> would like to get my server running and then all the xforms instance
> would load the proper i18n file.
>
> Niko,
>
>
> On 4/4/08, Erik Bruchez <[hidden email]> wrote:
>> What you can do is instead run a submission upon receiving xforms-
>> ready or
>> xforms-model-construct-done:
>>
>>
>> http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-initialization
>>
>> -Erik
>>
>>
>> On Apr 2, 2008, at 7:20 PM, Nicolas Modrzyk wrote:
>>
>>> Hello hello,
>>>
>>> I am trying to do something like:
>>> <xforms:instance id="my"
>> src="xxforms:property('my.property')"/>
>>>
>>> where the url (src attribute) of that xforms instance is defined in
>>> orbeon properties.xml file.
>>>
>>> But it doesn't seem I can not get it working this way.
>>> Would you have any recommendation on how to achieve this ?
>>>
>>> Thank you in advance,
>>>
>>> Niko,
>>>
>>
>> --
>> 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
>>
>>
>
> --
> 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 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: Re: Re: xxforms:property in src attribute of instance

Nicolas Modrzyk-3
Hi Erik,

Thank you again for you answer.
> Not sure what you mean by "internationalize muttiple pipeline processors"?
Well. Yes. Out of context it made no sense. Lack of precision on my
part. Here's one example:
http://tempo.intalio.org/tempo/trunk/xforms-manager/src/main/webapp/WEB-INF/workflow/formManager/act.xpl

>
>  But if you are talking about internationalizing forms, then you need the
> following:
>
>  1. A notion of current language
More than that, I need to be able to keep the current language
throughout the flow of processors in the xpl file.

>  2. Resources in multiple languages, whether stored in a single XML document
> or multiple XML documents
Yes I have done those. Although not in the above URL.

>  3. Switching the resources in an XForms page based on #1 and #2
I was thinking about changing it simply on the server side in the first place.

>
>  So far does this look like what you are trying to achieve?
Yes. definitely.

>
>  -Erik
>
>
>  On Apr 4, 2008, at 12:45 AM, Nicolas Modrzyk wrote:
>
> > Hi Erik,
> >
> > Thank you for your email. But ...
> >
> > I'm afraid I did not understand your answer.
> >
> > What I am trying to do, is to internationalize muttiple pipeline
> processors.
> > I would like to be able to change in only one place which language I
> > would like to get my server running and then all the xforms instance
> > would load the proper i18n file.
> >
> > Niko,
> >
> >
> > On 4/4/08, Erik Bruchez <[hidden email]> wrote:
> >
> > > What you can do is instead run a submission upon receiving xforms-ready
> or
> > > xforms-model-construct-done:
> > >
> > >
> > >
> http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-initialization
> > >
> > > -Erik
> > >
> > >
> > > On Apr 2, 2008, at 7:20 PM, Nicolas Modrzyk wrote:
> > >
> > >
> > > > Hello hello,
> > > >
> > > > I am trying to do something like:
> > > > <xforms:instance id="my"
> > > >
> > > src="xxforms:property('my.property')"/>
> > >
> > > >
> > > > where the url (src attribute) of that xforms instance is defined in
> > > > orbeon properties.xml file.
> > > >
> > > > But it doesn't seem I can not get it working this way.
> > > > Would you have any recommendation on how to achieve this ?
> > > >
> > > > Thank you in advance,
> > > >
> > > > Niko,
> > > >
> > > >
> > >
> > > --
> > > 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
> > >
> > >
> > >
> >
> > --
> > 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 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
>
>


--
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: xxforms:property in src attribute of instance

Erik Bruchez
Administrator
>> 1. A notion of current language
> More than that, I need to be able to keep the current language
> throughout the flow of processors in the xpl file.

The current language could be stored in the session, or in the  
request, depending on the scenario. If in the request, store it there  
at the beginning of the p

>> 2. Resources in multiple languages, whether stored in a single XML  
>> document
>> or multiple XML documents
> Yes I have done those. Although not in the above URL.
>
>> 3. Switching the resources in an XForms page based on #1 and #2
> I was thinking about changing it simply on the server side in the  
> first place.

So far we have used two different strategies:

1. Use multiple files (or resources accessed through a URL) loaded  
through an XForms submission depending on the current language. In  
this case, it is good practice to use unambiguous URLs, like /
resources/en, /resources/fr, etc.

2. Store all the resources in a single file or XForms instance. In  
this case, you can use xml:lang to discriminate.

-Erik

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