Layout, xForm instance, and xslt params !

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

Layout, xForm instance, and xslt params !

Phil Jean

I have found OPS very interesting.  But i have stumbled on fiew problems.

 

1) Does OPS initialize the form with the model attribute of the page flow.  I

read that the xForm attribute triggers the legacy built in xForm engine.  Still,

ifI ia move the xform model definition into the head of the XHTML file, does the

model attribute is used to initialize the xForm ?

 

2) I dont semm to get working the PageLayout even tought i use elements to define the layout of the View ?  How do i config. OPS and where i can find use examples ?

 

3) I seem to have difficulties to use the #instance into XPL.  I get nil tag ?

Here is the code sample

 

into the xpl i define :

...

<p:param name="instance" type="input"/>

...

<p:processor name="oxf:xslt-2.0">

<!-- Tranformation/Internalization : recherche-view.xml -->

<p:input name="data" href="oxf:/WEB-INF/resources/plateforme/data-access/recherche/faire-recherche.xml"/>

<p:input name="config">

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<!-- The Main View -->

<xsl:import href="oxf:/WEB-INF/resources/plateforme/data-access/recherche/faire-recherche.xsl"/>

<!-- view to insert into recherche-view.xsl -->

<!--

<xsl:param name="st" select="doc('input:seek-type')"/>

<xsl:param name="i" select="doc('input:identificateur')"/> -->

<xsl:param name="c" select="'pepe-le-piew'"/>

</xsl:stylesheet>

</p:input>

<p:input name="seek-type" href="#request#xpointer(/request/parameters/parameter[name='seek-type']/value)"/>

<p:input name="identificateur" href="#request#xpointer(/request/parameters/parameter[name='identificateur']/value)"/>

<p:input name="critere" href="#request#xpointer(/request/parameters/parameter[name='identificateur']/value)"/>

<p:input name="user-data" href="#instance"/>

<p:output name="data" id="stylesheet-output"/>

</p:processor>

...

 

I sill get nill tags into me xsl view for all params and the instance too ?

 

Also, i would like to know how to pass parameters to an XPL. from an XPL.

 

And finally, instead of hard coding the xQuery into the XPL, i seem to have difficulties to input an xQuery from a file !

 

<p:processor name="oxf:xmldb-query">

<p:input name="datasource" href="oxf:/WEB-INF/resources/plateforme/data-access/datasource.xml"/>

<p:input name="query" href="oxf:/WEB-INF/resources/plateforme/data-access/getDbInfo.xp"  />

<p:output name="data" id="xmlResults"/>

</p:processor>

 

I'm working on a very interesting development project and i would like to use OPS wich is a very promessing tool.  We are thus pioners in this XML federaton.  I'm looking forward to see more xForm implementation into OPS.

 

--------

Philippe Jean


Find your next car at Yahoo! Canada Autos

--
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
Reply | Threaded
Open this post in threaded view
|

Re: Layout, xForm instance, and xslt params !

Erik Bruchez
Administrator
Phil Jean wrote:

 > I have found OPS very interesting.  But i have stumbled on fiew
 > problems.

This is what this mailing-list is for ;-)

 > 1) Does OPS initialize the form with the model attribute of the page
 > flow.  I read that the xForm attribute triggers the legacy built in
 > xForm engine.  Still, if I ia move the xform model definition into
 > the head of the XHTML file, does the model attribute is used to
 > initialize the xForm ?

No: either you use the Classic XForms engine and use the "xforms"
attribute on <page> elements, or you don't, and then you automatically
use the new XForms engine. It is strongly recommended NOT to use the
"xforms" attribute, unless you are clearly aware of the limitations of
the Classic XForms engine.

 > 2) I dont semm to get working the PageLayout even tought i use
 > elements to define the layout of the View ?  How do i config. OPS
 > and where i can find use examples ?

Please me more precise. What is "PageLayout", how do you do it, what
is the problem you are encountering, and what kind of example are you
looking for?

 > 3) I seem to have difficulties to use the #instance into XPL.  I get
 > nil tag ?
 >
 > Here is the code sample

 > <p:input name="data"
 >
href="oxf:/WEB-INF/resources/plateforme/data-access/recherche/faire-recherche.xml"/>

First, you shouldn't have to include WEB-INF/resources into your path,
unless you modified your resource home in your web.xml. If you are
using a defaul setup, you should probably just use:

<p:input name="data"
href="oxf:/plateforme/data-access/recherche/faire-recherche.xml"/>

Same for all the URIs you are using below.

The the rest of the issues, try putting "debug" attributes on your
pipeline inputs and outputs. XML documents going through those inputs
and outputs will be logged. For example:

<p:param name="instance" type="input" debug="my-instance-input"/>

<p:input name="data" debug="my-stylesheet-data"/>

etc.

 > <p:input name="seek-type"
 >
href="#request#xpointer(/request/parameters/parameter[name='seek-type']/value)"/>


Not that instead of the Request generator, you can also use the Page
Flow Controller to extract data from the URL sand store it nicely for
you into an XML document. See:

   http://www.orbeon.com/ops/doc/reference-page-flow#d1115167e854

 > Also, i would like to know how to pass parameters to an XPL. from an
 > XPL.

Something like this:

     <p:processor name="oxf:pipeline">
         <p:input name="config" href="my-pipeline.xpl"/>
         <p:input name="my-pipeline-input-1" href="#something-1"/>
         <p:input name="my-pipeline-input-2" href="#something-2"/>
         <p:output name="my-pipeline-output-1" id="something-3"/>
     </p:processor>

Then your called pipeline, my-pipeline.xpl, should expose inputs and
outputs with the same name:

<p:config>
   <p:param name="my-pipeline-input-1" type="input"/>
   <p:param name="my-pipeline-input-2" type="input"/>
   <p:param name="my-pipeline-output-1" type="output"/>
   ...

If you were talking about XSLT params, then check out this FAQ entry:

   http://www.orbeon.com/ops/doc/home-faq#xslt-params

 > And finally, instead of hard coding the xQuery into the XPL, i seem to
 > have difficulties to input an xQuery from a file !

Maybe this will help:

   http://localhost:8888/ops/doc/home-changes-30#xquery

Otherwise, please describe the problem.

 > I'm working on a very interesting development project and i would
 > like to use OPS wich is a very promessing tool.  We are thus pioners
 > in this XML federaton.  I'm looking forward to see more xForm
 > implementation into OPS.

Sounds good!

-Erik



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