My context is Orbeon Forms dev-3.7.1.200905272119 with glassfish 2
I am using fr:repeat with nodeset and origin and getting insertions fine. Can I control where the insertions are made. A simplification of my structure is. <a> <b>...</b> <c>...</c> <d type="x">...</d> </a> My repeat is over the nodeset a/d[type="y"] that is, I need to add new d elements with a different attribute value. They must not appear before the <b> and <c> elements (sorry - I did not write the schema) and that is where they do appear by default. If I change my repeat nodeset to just "a/d" all if ok and they are naturally at the end of the <a> element. I feel I need the "context" (and perhaps "at") facility of the basic xform:insert. Can I access that via fr:repeat? I tried just adding a context attribute to it: no luck :-) Nigel -- 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 nwh.vcf (294 bytes) Download Attachment |
Nigel,
There is a matrix of the 1.1 Spec. support in Orbeon Forms: and there is support for "context" and "at" Does your code say a/d[@type="y"] i.e., the attribute short cut? Cheers, Hank supports the XForms 1.1 spec On Jul 6, 2009, at 5:38 AM, Nigel Hardy wrote:
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 |
Administrator
|
In reply to this post by Nigel Hardy
The answer is yes, you can control where the insertions are made. You
don't provide code so I can't provide a quick answer, but it lies with xforms:repeat and its attributes. -Erik On Jul 6, 2009, at 5:38 AM, Nigel Hardy wrote: > My context is Orbeon Forms dev-3.7.1.200905272119 with glassfish 2 > > I am using fr:repeat with nodeset and origin and getting insertions > fine. Can I control where the insertions are made. A simplification > of my structure is. > > <a> > <b>...</b> > <c>...</c> > <d type="x">...</d> > </a> > > My repeat is over the nodeset > > a/d[type="y"] > > that is, I need to add new d elements with a different attribute > value. They must not appear before the <b> and <c> elements (sorry - > I did not write the schema) and that is where they do appear by > default. If I change my repeat nodeset to just "a/d" all if ok and > they are naturally at the end of the <a> element. > > I feel I need the "context" (and perhaps "at") facility of the basic > xform:insert. Can I access that via fr:repeat? I tried just adding a > context attribute to it: no luck :-) > > Nigel > > > <nwh.vcf> > -- > 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 |
Thank you Eric,
here is the repeat section (I could send the whole document but that seems unreasonable on the list - advise). <xhtml:td> <fr:repeat nodeset="ContactRole[_role/@OntologyTerm_ref='OBI_0000357']" id="author-repeat" origin="instance('author-template')" columns="1" appearance="xxforms:table"> <fr:body> <xhtml:tr> <xhtml:td> <xforms:select1 id="control-16-control" ref="@Contact_ref"> <xforms:label ref="$form-resources/control-authors/label"/> <xforms:hint ref="$form-resources/control-authors/hint"/> <xforms:help ref="$form-resources/control-authors/help"/> <xforms:alert ref="$fr-resources/detail/labels/alert"/> <xforms:item> <xforms:label>[Known personnel...]</xforms:label> <xforms:value/> </xforms:item> <xforms:itemset nodeset="instance('mps_person')/Person"> <xforms:label ref="@description"/> <xforms:value ref="@identifier"/> </xforms:itemset> <xforms:item> <xforms:label>[Added personnel...]</xforms:label> <xforms:value/> </xforms:item> <xforms:itemset nodeset="//AuditCollection/Person"> <xforms:label ref="@name"/> <xforms:value ref="@identifier"/> </xforms:itemset> </xforms:select1> </xhtml:td> </xhtml:tr> </fr:body> </fr:repeat> </xhtml:td> As you see, I am not using xforms:repeat and it is it's attributes which I believe I need. Adding them to fr:repeat seems not to work. Perhaps I got them wrong but perhaps I shouldnot expect them to work there? Nigel Erik Bruchez wrote: > The answer is yes, you can control where the insertions are made. You > don't provide code so I can't provide a quick answer, but it lies with > xforms:repeat and its attributes. > > -Erik > > On Jul 6, 2009, at 5:38 AM, Nigel Hardy wrote: > >> My context is Orbeon Forms dev-3.7.1.200905272119 with glassfish 2 >> >> I am using fr:repeat with nodeset and origin and getting insertions >> fine. Can I control where the insertions are made. A simplification >> of my structure is. >> >> <a> >> <b>...</b> >> <c>...</c> >> <d type="x">...</d> >> </a> >> >> My repeat is over the nodeset >> >> a/d[type="y"] >> >> that is, I need to add new d elements with a different attribute >> value. They must not appear before the <b> and <c> elements (sorry - >> I did not write the schema) and that is where they do appear by >> default. If I change my repeat nodeset to just "a/d" all if ok and >> they are naturally at the end of the <a> element. >> >> I feel I need the "context" (and perhaps "at") facility of the basic >> xform:insert. Can I access that via fr:repeat? I tried just adding a >> context attribute to it: no luck :-) >> >> Nigel >> >> >> <nwh.vcf> >> -- >> 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 nwh.vcf (294 bytes) Download Attachment |
Administrator
|
I hadn't realized that you are using fr:repeat, not xforms:repeat!
fr:repeat does not allow you to control precisely where the insertion takes place. In fact, if you look at RESOURCES/apps/fr/components/ repeat.xsl in the source, you will see a TODO in there. However, it should insert after the last ContactRole[_role/ @OntologyTerm_ref='OBI_0000357']. Are you saying that this is not what you see? -Erik On Jul 8, 2009, at 1:10 AM, Nigel Hardy wrote: > Thank you Eric, > > here is the repeat section (I could send the whole document but that > seems unreasonable on the list - advise). > > <xhtml:td> > <fr:repeat nodeset="ContactRole[_role/ > @OntologyTerm_ref='OBI_0000357']" id="author-repeat" > origin="instance('author-template')" > columns="1" > appearance="xxforms:table"> > <fr:body> > <xhtml:tr> > <xhtml:td> > <xforms:select1 id="control-16-control" ref="@Contact_ref"> > <xforms:label ref="$form-resources/control-authors/ > label"/> > <xforms:hint ref="$form-resources/control-authors/hint"/> > <xforms:help ref="$form-resources/control-authors/help"/> > <xforms:alert ref="$fr-resources/detail/labels/alert"/> > <xforms:item> > <xforms:label>[Known personnel...]</xforms:label> > <xforms:value/> > </xforms:item> > <xforms:itemset nodeset="instance('mps_person')/Person"> > <xforms:label ref="@description"/> > <xforms:value ref="@identifier"/> > </xforms:itemset> > <xforms:item> > <xforms:label>[Added personnel...]</xforms:label> > <xforms:value/> > </xforms:item> > <xforms:itemset nodeset="//AuditCollection/Person"> > <xforms:label ref="@name"/> > <xforms:value ref="@identifier"/> > </xforms:itemset> > </xforms:select1> > </xhtml:td> > </xhtml:tr> > </fr:body> > </fr:repeat> > </xhtml:td> > > As you see, I am not using xforms:repeat and it is it's attributes > which I believe I need. Adding them to fr:repeat seems not to work. > Perhaps I got them wrong but perhaps I shouldnot expect them to work > there? > > Nigel > > Erik Bruchez wrote: >> The answer is yes, you can control where the insertions are made. >> You don't provide code so I can't provide a quick answer, but it >> lies with xforms:repeat and its attributes. >> >> -Erik >> >> On Jul 6, 2009, at 5:38 AM, Nigel Hardy wrote: >> >>> My context is Orbeon Forms dev-3.7.1.200905272119 with glassfish 2 >>> >>> I am using fr:repeat with nodeset and origin and getting >>> insertions fine. Can I control where the insertions are made. A >>> simplification of my structure is. >>> >>> <a> >>> <b>...</b> >>> <c>...</c> >>> <d type="x">...</d> >>> </a> >>> >>> My repeat is over the nodeset >>> >>> a/d[type="y"] >>> >>> that is, I need to add new d elements with a different attribute >>> value. They must not appear before the <b> and <c> elements (sorry >>> - I did not write the schema) and that is where they do appear by >>> default. If I change my repeat nodeset to just "a/d" all if ok and >>> they are naturally at the end of the <a> element. >>> >>> I feel I need the "context" (and perhaps "at") facility of the >>> basic xform:insert. Can I access that via fr:repeat? I tried just >>> adding a context attribute to it: no luck :-) >>> >>> Nigel >>> >>> >>> <nwh.vcf> >>> -- >>> 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/ >> > > <nwh.vcf> > -- > 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 |
Erik,
many thanks. The pointer to the xsl source revealed the implementation of @after which I can use in this instance. Job done. I have no initial 'ContactRole[_role/@OntologyTerm_ref='OBI_0000357']' so my observed behaviour of insertion before the first sibling at that level seems correct. Subsequent insertions do follow this one. No problem there I think. Nigel Erik Bruchez wrote: > I hadn't realized that you are using fr:repeat, not xforms:repeat! > > fr:repeat does not allow you to control precisely where the insertion > takes place. In fact, if you look at > RESOURCES/apps/fr/components/repeat.xsl in the source, you will see a > TODO in there. > > However, it should insert after the last > ContactRole[_role/@OntologyTerm_ref='OBI_0000357']. Are you saying > that this is not what you see? > > -Erik > > On Jul 8, 2009, at 1:10 AM, Nigel Hardy wrote: > >> Thank you Eric, >> >> here is the repeat section (I could send the whole document but that >> seems unreasonable on the list - advise). >> >> <xhtml:td> >> <fr:repeat >> nodeset="ContactRole[_role/@OntologyTerm_ref='OBI_0000357']" >> id="author-repeat" >> origin="instance('author-template')" >> columns="1" >> appearance="xxforms:table"> >> <fr:body> >> <xhtml:tr> >> <xhtml:td> >> <xforms:select1 id="control-16-control" ref="@Contact_ref"> >> <xforms:label ref="$form-resources/control-authors/label"/> >> <xforms:hint ref="$form-resources/control-authors/hint"/> >> <xforms:help ref="$form-resources/control-authors/help"/> >> <xforms:alert ref="$fr-resources/detail/labels/alert"/> >> <xforms:item> >> <xforms:label>[Known personnel...]</xforms:label> >> <xforms:value/> >> </xforms:item> >> <xforms:itemset nodeset="instance('mps_person')/Person"> >> <xforms:label ref="@description"/> >> <xforms:value ref="@identifier"/> >> </xforms:itemset> >> <xforms:item> >> <xforms:label>[Added personnel...]</xforms:label> >> <xforms:value/> >> </xforms:item> >> <xforms:itemset nodeset="//AuditCollection/Person"> >> <xforms:label ref="@name"/> >> <xforms:value ref="@identifier"/> >> </xforms:itemset> >> </xforms:select1> >> </xhtml:td> >> </xhtml:tr> >> </fr:body> >> </fr:repeat> >> </xhtml:td> >> >> As you see, I am not using xforms:repeat and it is it's attributes >> which I believe I need. Adding them to fr:repeat seems not to work. >> Perhaps I got them wrong but perhaps I shouldnot expect them to work >> there? >> >> Nigel >> >> Erik Bruchez wrote: >>> The answer is yes, you can control where the insertions are made. >>> You don't provide code so I can't provide a quick answer, but it >>> lies with xforms:repeat and its attributes. >>> >>> -Erik >>> >>> On Jul 6, 2009, at 5:38 AM, Nigel Hardy wrote: >>> >>>> My context is Orbeon Forms dev-3.7.1.200905272119 with glassfish 2 >>>> >>>> I am using fr:repeat with nodeset and origin and getting insertions >>>> fine. Can I control where the insertions are made. A simplification >>>> of my structure is. >>>> >>>> <a> >>>> <b>...</b> >>>> <c>...</c> >>>> <d type="x">...</d> >>>> </a> >>>> >>>> My repeat is over the nodeset >>>> >>>> a/d[type="y"] >>>> >>>> that is, I need to add new d elements with a different attribute >>>> value. They must not appear before the <b> and <c> elements (sorry >>>> - I did not write the schema) and that is where they do appear by >>>> default. If I change my repeat nodeset to just "a/d" all if ok and >>>> they are naturally at the end of the <a> element. >>>> >>>> I feel I need the "context" (and perhaps "at") facility of the >>>> basic xform:insert. Can I access that via fr:repeat? I tried just >>>> adding a context attribute to it: no luck :-) >>>> >>>> Nigel >>>> >>>> >>>> <nwh.vcf> >>>> -- >>>> 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/ >>> >> >> <nwh.vcf> >> -- >> 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 nwh.vcf (294 bytes) Download Attachment |
Free forum by Nabble | Edit this page |