RE: Xsl ignored when using dynamic xforms model and v iew

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

RE: Xsl ignored when using dynamic xforms model and v iew

Alan Skorkin
RE: [ops-users] Xsl ignored when using dynamic xforms model and view

When I say I supply page-flow, view and x-forms model dynamically I mean
Something like:

<page id="page1" path-info="/template" matcher="oxf:perl5-matcher"
xforms="oxf:/pipelines/xforms-pipeline.xpl" view="oxf:/pipelines/view-pipeline.xpl">

As you can see here to get the xforms model and view I call an xpl pipeline, this has
custom processors which generate my xforms model and view and return them. So I dynamically
Create xforms models and views and use xpl to access them.

What I mean when I say that my xsl is ignored is the follwing.

It seems that as a consequence of generating my views dynamically, any xsl that I have in those views is never executed so if I have something like

<xsl:value-of ref="/myform/blah">

In my view this just ends up as is in my final html page that orbeon renders, as opposed to getting the value of the /myforms/blah node from my xforms model.

Once again any info or help on this is appreciated.

-----Original Message-----
From: [hidden email] [[hidden email]]
Sent: Friday, September 09, 2005 5:55 PM
To: [hidden email]
Subject: Re: [ops-users] Xsl ignored when using dynamic xforms model and view


On Fri, 9 Sep 2005 10:58:43 +1000 , "Alan Skorkin"
<[hidden email]> said:
> Hi,
>
> I have a slight problem which is baffling me and was wondering if
> anyone can help.
>
> I  am using orbeon and supplying all the resources dynamically (i.e.
> dynamic page-flow, view and x-forms model).

dynamic?  Could you elaborate?

>
> This has an unfortunate side effect since I can no longer use any xsl
> in my views as it just gets ignored, which is very inconvenient.

Do you mean if you have
  <page .... view='foo.xsl' >
foo.xsl is ignored?

>
> Everything else works well without any problems.
>
> Has anyone run into this kind of thing before? If clarification of my
> problem is needed I can supply more info about how my system works.

Yep, definitely need more info.

-- Dan S

--
http://www.fastmail.fm - The way an email service should be




--
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: Xsl ignored when using dynamic xforms model and v iew

dsmall-2

On Fri, 9 Sep 2005 18:23:25 +1000 , "Alan Skorkin"
<[hidden email]> said:

> When I say I supply page-flow, view and x-forms model dynamically I
> mean Something like:
>
> <page id="page1" path-info="/template" matcher="oxf:perl5-matcher"
> xforms="oxf:/pipelines/xforms-
> pipeline.xpl" view="oxf:/pipelines/view-pipeline.xpl">
>
> As you can see here to get the xforms model and view I call an xpl
> pipeline, this has custom processors which generate my xforms model
> and view and return them. So I dynamically Create xforms models and
> views and use xpl to access them.
Ok, got it.


> What I mean when I say that my xsl is ignored is the follwing.
>
> It seems that as a consequence of generating my views dynamically, any
> xsl that I have in those views is never executed so if I have
> something like
>
> <xsl:value-of ref="/myform/blah">
>
> In my view this just ends up as is in my final html page that orbeon
> renders, as opposed to getting the value of the /myforms/blah node
> from my xforms model.
>
> Once again any info or help on this is appreciated.
Alright, so I think I understand what you're saying here.  
view-pipeline.xpl is producing a style sheet and you're expecting
that to be executed but it is not.

And assuming this I've got it, then following info should be
of use ...

The PageFlowController turns your page-flow.xml into a big
pipeline.  For each page with a view there is a an xpl
choose statement that checks the content of the resource referenced
by the view attribute.  If it looks like xpl then a pipeline
processor is invoked.  If it looks like xslt then an xslt
processor is invoked.  The output of this processor is consumed
by the epilogue, if there is one, or by the http serializer if
there is not.

So you see the problem is that you need some recursive processing
that the PFC isn't providing.

-- Regards, Dan Small

--
http://www.fastmail.fm - The professional email service




--
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: Xsl ignored when using dynamic xforms model and v iew

Alan Skorkin
In reply to this post by Alan Skorkin
RE: [ops-users] Xsl ignored when using dynamic xforms model and v iew

Thanks for the reply, it pointed me in the right direction.

I was able to solve the problem by attaching an xslt processor at the end of my view pipeline.

Thanks again

-----Original Message-----
From: [hidden email] [[hidden email]]
Sent: Friday, September 09, 2005 7:05 PM
To: [hidden email]
Subject: RE: [ops-users] Xsl ignored when using dynamic xforms model and v iew


On Fri, 9 Sep 2005 18:23:25 +1000 , "Alan Skorkin"
<[hidden email]> said:
> When I say I supply page-flow, view and x-forms model dynamically I
> mean Something like:
>
> <page id="page1" path-info="/template" matcher="oxf:perl5-matcher"
> xforms="oxf:/pipelines/xforms-
> pipeline.xpl" view="oxf:/pipelines/view-pipeline.xpl">
>
> As you can see here to get the xforms model and view I call an xpl
> pipeline, this has custom processors which generate my xforms model
> and view and return them. So I dynamically Create xforms models and
> views and use xpl to access them.

Ok, got it.


> What I mean when I say that my xsl is ignored is the follwing.
>
> It seems that as a consequence of generating my views dynamically, any
> xsl that I have in those views is never executed so if I have
> something like
>
> <xsl:value-of ref="/myform/blah">
>
> In my view this just ends up as is in my final html page that orbeon
> renders, as opposed to getting the value of the /myforms/blah node
> from my xforms model.
>
> Once again any info or help on this is appreciated.

Alright, so I think I understand what you're saying here. 
view-pipeline.xpl is producing a style sheet and you're expecting that to be executed but it is not.

And assuming this I've got it, then following info should be of use ...

The PageFlowController turns your page-flow.xml into a big pipeline.  For each page with a view there is a an xpl choose statement that checks the content of the resource referenced by the view attribute.  If it looks like xpl then a pipeline processor is invoked.  If it looks like xslt then an xslt processor is invoked.  The output of this processor is consumed by the epilogue, if there is one, or by the http serializer if there is not.

So you see the problem is that you need some recursive processing that the PFC isn't providing.

-- Regards, Dan Small

--
http://www.fastmail.fm - The professional email service




--
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: Xsl ignored when using dynamic xforms model and v iew

Erik Bruchez
Administrator
In reply to this post by dsmall-2
[hidden email] wrote:

 >>What I mean when I say that my xsl is ignored is the follwing.
 >>
 >>It seems that as a consequence of generating my views dynamically, any
 >>xsl that I have in those views is never executed so if I have
 >>something like
 >>
 >><xsl:value-of ref="/myform/blah">
 >>
 >>In my view this just ends up as is in my final html page that orbeon
 >>renders, as opposed to getting the value of the /myforms/blah node
 >>from my xforms model.
 >>
 >>Once again any info or help on this is appreciated.
 >
 >
 > Alright, so I think I understand what you're saying here.
 > view-pipeline.xpl is producing a style sheet and you're expecting
 > that to be executed but it is not.
 >
 > And assuming this I've got it, then following info should be
 > of use ...
 >
 > The PageFlowController turns your page-flow.xml into a big
 > pipeline.  For each page with a view there is a an xpl
 > choose statement that checks the content of the resource referenced
 > by the view attribute.  If it looks like xpl then a pipeline
 > processor is invoked.  If it looks like xslt then an xslt
 > processor is invoked.  The output of this processor is consumed
 > by the epilogue, if there is one, or by the http serializer if
 > there is not.
 >
 > So you see the problem is that you need some recursive processing
 > that the PFC isn't providing.

Alan,

To summarize what kind of page view implementations the PFC supports:

1. Static XML view - the simplest solution for static page views

2. XSLT view - the most convenient solution in most cases, as XSLT
    provides you with handy tools to dynamically construct a page view

3. XPL view - the most versatile solution, which allows you to use all
    the tools OPS provides

In all three cases, the goal is to provide, as a result, an XML
document which is going to be processed by the page flow epilogue
before being sent to the web browser. The details are documented here:

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

If your page view is an XPL pipeline (#3) which dynamically generates
an XSLT stylesheet, and you just send that stylesheet to the "data"
output of the pipeline, what you are going to achieve is sending an
XSLT stylesheet to the browser. This is obviously not what you are
trying to achieve.

Instead, in that case, you want to connect in your XPL pipeline your
dynamically-generated XSLT stylesheet to the "config" input of an
oxf:xslt processor, so that the stylesheet is actually run. The result
of the XSLT transformation is then the resulting XML document you want
to send to the epilogue.

I should also note that dynamically generating an XSLT stylesheet may
end up being costly (not the generation itself, but the interpretation
/ compilation of the stylesheet by the XSLT transformer). If you are
lucky, caching mechanisms will take care of this, but if you always
provide a different dynamic stylesheet, performance will likely be
poor.

-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