I have a basic set up where the pageflow uses a model to pass information to a view to be used in the form.
My model extracts information from the database and places the information in an XML document to pass to the view. The model xml is received by the view, however, when trying to access it via xsl, I get an error that it is unable to load the document: input:instance. <page id="theform" path-info="/myform" model="form-data.xpl" view="standard.xhtml"/> ..... <xsl:template name="build"> <xsl:param name="position" select="doc('input:instance')/params/level"/> ...... According to http://www.orbeon.com/ops/doc/reference-page-flow#d6e2527, my view should have access to the data that is passed in via the model via input:instance. So why can't my xsl access it? One possibly important note to make is that my view (standard.xhtml) contains the use of XBL components and it is within an XBL component that the 'build' template is being called. If anyone sees what is wrong, or can tell me a different way to achieve this, I am all ears. Thanks in advance. |
Administrator
|
Stacy,
On Tue, Nov 3, 2009 at 1:12 PM, stacyladnier <[hidden email]> wrote: > My model extracts information from the database and places the information > in an XML document to pass to the view. The model xml is received by the > view, however, when trying to access it via xsl, I get an error that it is > unable to load the document: input:instance. Almost. The "data" output of form-data.xpl will be accessible to your XSLT view (I am assuming that standards.xhtml is an XSLT file) as the input document of that transformation. So you you can just use "/params/level" there, and there is no need to use the doc() function. Alex -- Orbeon Forms - Web forms, open-source, for the Enterprise Orbeon's Blog: http://www.orbeon.com/blog/ 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 |
In reply to this post by stacyladnier
Alex,
Standards.xhtml is not exactly an XSLT file. It is an XHTML file that uses multiple XBL components. Inside one of the XBL components, I use transforms within the <xbl:template xxbl:transform="oxf:xslt"> statement. In the XBL I have <xbl:template xxbl:transform="oxf:xslt"> .... <xsl:call-template name="buildtree"> <xsl:with-param name="position" select="/params/level"/> </xsl:call-template> ... </xbl:template> Just using /params/level gets me past the error. However, the value of position is nil. Do I still have the XML from the model as input to this XSL? Or is it only the content of the XBL itself that is the input to the XSL? I have to have the 'level' information, but am really stuck with how to access it. The level information is stored within a file in eXist, but at a location that would need parameters interpreted from the URL (via page-flow) in order to locate the proper file. I have failed at attempts to access the parameters interpreted from the URL within the XSL too. ----- Original Message ----- From: Alessandro Vernet <[hidden email]> Date: Wednesday, November 4, 2009 2:03 am Subject: [ops-users] Re: Unable to access model input within view > Stacy, > > On Tue, Nov 3, 2009 at 1:12 PM, stacyladnier > <[hidden email]> wrote: > > My model extracts information from the database and places the > information> in an XML document to pass to the view. The model xml > is received by the > > view, however, when trying to access it via xsl, I get an error > that it is > > unable to load the document: input:instance. > > Almost. The "data" output of form-data.xpl will be accessible to your > XSLT view (I am assuming that standards.xhtml is an XSLT file) as the > input document of that transformation. So you you can just use > "/params/level" there, and there is no need to use the doc() function. > > Alex > -- > Orbeon Forms - Web forms, open-source, for the Enterprise > Orbeon's Blog: http://www.orbeon.com/blog/ > 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 |
Free forum by Nabble | Edit this page |