Hi All, By defalut xsl:for-each taking data from main-instance in my xforms.I want to take data from template-instance.
If i write for-each loop like below, it thorws a exception.
<xsl:for-each select="instance('template-instance')//records/record">
<xsl:for-each>
How to write for-each which gets data from template-instance?
Pl help me.
-- 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 |
Hi Laxmi,
> By defalut *xsl:for-each* taking data from *main-instance* in my > xforms.I want to take data from *template-instance*. > > If i write for-each loop like below, it thorws a exception. > > <xsl:for-each select="*instance('template-instance')//*records/record"> > <xsl:for-each> > > How to write for-each which gets data from template-instance? > Pl help me. processed before the xforms engine takes over the document. If this is correct, you still have different options: - preprocess your template-instance as needed; - aggregate your instances to a single instance so xslt can access it; - keep your template-instance and use xforms and repeat to iterate over the nodeset. HTH florian -- 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 |
On Feb 8, 2010, at 8:12 AM, Florian Schmitt wrote: > Hi Laxmi, > >> By defalut *xsl:for-each* taking data from *main-instance* in my >> xforms.I want to take data from *template-instance*. >> >> If i write for-each loop like below, it thorws a exception. >> >> <xsl:for-each select="*instance('template-instance')//*records/record"> >> <xsl:for-each> >> >> How to write for-each which gets data from template-instance? >> Pl help me. > > i think you can't access the model using instance() because xslt is > processed before the xforms engine takes over the document. If this is > correct, you still have different options: > > - preprocess your template-instance as needed; > - aggregate your instances to a single instance so xslt can access it; > - keep your template-instance and use xforms and repeat to iterate over > the nodeset. can define multiple inputs, which are accessed as separated variables -- an alternative to aggregating the instances: http://www.orbeon.com/orbeon/doc/processors-xslt#user-defined Cheers, Hank > > HTH > florian > > > -- > 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 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 |
In reply to this post by Laxmi Narayana-3
Laxmi,
From XForms, you should instead use xforms:repeat. -Erik On Mon, Feb 8, 2010 at 6:44 AM, Laxmi Narayana <[hidden email]> wrote: > > Hi All, > > By defalut xsl:for-each taking data from main-instance in my xforms.I want > to take data from template-instance. > > If i write for-each loop like below, it thorws a exception. > > <xsl:for-each select="instance('template-instance')//records/record"> > <xsl:for-each> > > How to write for-each which gets data from template-instance? > Pl help me. > > > > -- > 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 |
Free forum by Nabble | Edit this page |