Here is another problem I have - hopefully it will also be found to
be an user problem :-) <xforms:instance id="test"> <places> <place> <collector/> <types> <type id="1"> <type id="2"> <type id="3"> </types> </place> <labels> <label id="1" name="apples"/> <label id="2" name="oranges"/> <label id="3" name="pears"/> </labels> </places> </xforms:instance> <xforms:select1 ref="//place/collector"> <xforms:itemset nodeset="//place/types/type"> <xforms:label ref="//labels/label[@id = select-current(@id)]/ @name"/> <xforms:copy ref="@id"/> </xforms:itemset> </xforms:select1> Is there an equivalent to my "magic" function select-current() that would return the value of the 'current" node? A. -- 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 |
Alex,
You can use a *magic* xpath expression :-) For $i in @id return //labels/label[@id $i]/@name This should work Ryan Puddephatt Software Engineer Teleflex Group - IT UK 1 Michaelson Square Livingston West Lothian Scotland EH54 7DP e> [hidden email] t> +44(0)1506 407 110 f> +44(0)1506 407 108 >-----Original Message----- >From: Alexander Zatko [mailto:[hidden email]] >Sent: 28 October 2006 15:36 >To: [hidden email] >Subject: [ops-users] constructing path to access out-of >context node from within itemset > >Here is another problem I have - hopefully it will also be >found to be an user problem :-) > > ><xforms:instance id="test"> > <places> > <place> > <collector/> > <types> > <type id="1"> > <type id="2"> > <type id="3"> > </types> > </place> > <labels> > <label id="1" name="apples"/> > <label id="2" name="oranges"/> > <label id="3" name="pears"/> > </labels> > </places> ></xforms:instance> > > ><xforms:select1 ref="//place/collector"> > <xforms:itemset nodeset="//place/types/type"> > <xforms:label ref="//labels/label[@id = >select-current(@id)]/ @name"/> > <xforms:copy ref="@id"/> > </xforms:itemset> ></xforms:select1> > >Is there an equivalent to my "magic" function select-current() >that would return the value of the 'current" node? > > >A. > > -- 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 |
Thanks Ryan.
A. On Oct 29, 2006, at 1:54 AM, Ryan Puddephatt wrote: > Alex, > You can use a *magic* xpath expression :-) > > For $i in @id return //labels/label[@id $i]/@name > > This should work > > Ryan Puddephatt > Software Engineer > > Teleflex Group - IT UK > 1 Michaelson Square > Livingston > West Lothian > Scotland > EH54 7DP > > e> [hidden email] > t> +44(0)1506 407 110 > f> +44(0)1506 407 108 > > > >> -----Original Message----- >> From: Alexander Zatko [mailto:[hidden email]] >> Sent: 28 October 2006 15:36 >> To: [hidden email] >> Subject: [ops-users] constructing path to access out-of >> context node from within itemset >> >> Here is another problem I have - hopefully it will also be >> found to be an user problem :-) >> >> >> <xforms:instance id="test"> >> <places> >> <place> >> <collector/> >> <types> >> <type id="1"> >> <type id="2"> >> <type id="3"> >> </types> >> </place> >> <labels> >> <label id="1" name="apples"/> >> <label id="2" name="oranges"/> >> <label id="3" name="pears"/> >> </labels> >> </places> >> </xforms:instance> >> >> >> <xforms:select1 ref="//place/collector"> >> <xforms:itemset nodeset="//place/types/type"> >> <xforms:label ref="//labels/label[@id = >> select-current(@id)]/ @name"/> >> <xforms:copy ref="@id"/> >> </xforms:itemset> >> </xforms:select1> >> >> Is there an equivalent to my "magic" function select-current() >> that would return the value of the 'current" node? >> >> >> A. >> >> > > > > -- > You receive this message as a subscriber of the ops- > [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 -- 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 |
Administrator
|
In reply to this post by Alexander Žaťko
Alex,
There is, but unfortunately it's not standard. You can define a group like this: <xforms:group ref="//place/collector" id="collector-group"> <xforms:select1 ref="."> <xforms:itemset nodeset="//place/types/type"> <xforms:label ref="//labels/label[@id = xxforms:context('collector-group')/@id]/@name"/> <xforms:copy ref="@id"/> </xforms:itemset> </xforms:select1> </xforms:group> In the future, we hope to have something like: <xforms:variable name="collector" select="//place/collector"/> <xforms:select1 ref="$collector"> <xforms:itemset nodeset="//place/types/type"> <xforms:label ref="//labels/label[@id = $collector/@id]/@name"/> <xforms:copy ref="@id"/> </xforms:itemset> </xforms:select1> -Erik Alexander Zatko wrote: > Here is another problem I have - hopefully it will also be found to be > an user problem :-) > > > <xforms:instance id="test"> > <places> > <place> > <collector/> > <types> > <type id="1"> > <type id="2"> > <type id="3"> > </types> > </place> > <labels> > <label id="1" name="apples"/> > <label id="2" name="oranges"/> > <label id="3" name="pears"/> > </labels> > </places> > </xforms:instance> > > > <xforms:select1 ref="//place/collector"> > <xforms:itemset nodeset="//place/types/type"> > <xforms:label ref="//labels/label[@id = > select-current(@id)]/@name"/> > <xforms:copy ref="@id"/> > </xforms:itemset> > </xforms:select1> > > Is there an equivalent to my "magic" function select-current() that > would return the value of the 'current" node? -- 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 |
aahhh.... xforms:variable, I can't wait!
Henrik On 10/30/06, Erik Bruchez <[hidden email]> wrote: > Alex, > > There is, but unfortunately it's not standard. You can define a group > like this: > > <xforms:group ref="//place/collector" id="collector-group"> > <xforms:select1 ref="."> > <xforms:itemset nodeset="//place/types/type"> > <xforms:label ref="//labels/label[@id = > xxforms:context('collector-group')/@id]/@name"/> > <xforms:copy ref="@id"/> > </xforms:itemset> > </xforms:select1> > </xforms:group> > > In the future, we hope to have something like: > > <xforms:variable name="collector" select="//place/collector"/> > <xforms:select1 ref="$collector"> > <xforms:itemset nodeset="//place/types/type"> > <xforms:label ref="//labels/label[@id = $collector/@id]/@name"/> > <xforms:copy ref="@id"/> > </xforms:itemset> > </xforms:select1> > > -Erik > > Alexander Zatko wrote: > > Here is another problem I have - hopefully it will also be found to be > > an user problem :-) > > > > > > <xforms:instance id="test"> > > <places> > > <place> > > <collector/> > > <types> > > <type id="1"> > > <type id="2"> > > <type id="3"> > > </types> > > </place> > > <labels> > > <label id="1" name="apples"/> > > <label id="2" name="oranges"/> > > <label id="3" name="pears"/> > > </labels> > > </places> > > </xforms:instance> > > > > > > <xforms:select1 ref="//place/collector"> > > <xforms:itemset nodeset="//place/types/type"> > > <xforms:label ref="//labels/label[@id = > > select-current(@id)]/@name"/> > > <xforms:copy ref="@id"/> > > </xforms:itemset> > > </xforms:select1> > > > > Is there an equivalent to my "magic" function select-current() that > > would return the value of the 'current" node? > > -- > 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 > > > -- 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 |
Administrator
|
I guess it will be xxforms:variable or exforms:variable first ;-)
-Erik Henrik Pettersen wrote: > aahhh.... xforms:variable, I can't wait! > > Henrik > > On 10/30/06, Erik Bruchez <[hidden email]> wrote: >> Alex, >> >> There is, but unfortunately it's not standard. You can define a group >> like this: >> >> <xforms:group ref="//place/collector" id="collector-group"> >> <xforms:select1 ref="."> >> <xforms:itemset nodeset="//place/types/type"> >> <xforms:label ref="//labels/label[@id = >> xxforms:context('collector-group')/@id]/@name"/> >> <xforms:copy ref="@id"/> >> </xforms:itemset> >> </xforms:select1> >> </xforms:group> >> >> In the future, we hope to have something like: >> >> <xforms:variable name="collector" select="//place/collector"/> >> <xforms:select1 ref="$collector"> >> <xforms:itemset nodeset="//place/types/type"> >> <xforms:label ref="//labels/label[@id = $collector/@id]/@name"/> >> <xforms:copy ref="@id"/> >> </xforms:itemset> >> </xforms:select1> >> >> -Erik >> >> Alexander Zatko wrote: >> > Here is another problem I have - hopefully it will also be found to be >> > an user problem :-) >> > >> > >> > <xforms:instance id="test"> >> > <places> >> > <place> >> > <collector/> >> > <types> >> > <type id="1"> >> > <type id="2"> >> > <type id="3"> >> > </types> >> > </place> >> > <labels> >> > <label id="1" name="apples"/> >> > <label id="2" name="oranges"/> >> > <label id="3" name="pears"/> >> > </labels> >> > </places> >> > </xforms:instance> >> > >> > >> > <xforms:select1 ref="//place/collector"> >> > <xforms:itemset nodeset="//place/types/type"> >> > <xforms:label ref="//labels/label[@id = >> > select-current(@id)]/@name"/> >> > <xforms:copy ref="@id"/> >> > </xforms:itemset> >> > </xforms:select1> >> > >> > Is there an equivalent to my "magic" function select-current() that >> > would return the value of the 'current" node? >> >> -- >> 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 >> >> >> > > > ------------------------------------------------------------------------ > > > -- > 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 -- 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 |
Free forum by Nabble | Edit this page |