oxf.epilogue.embeddable=true leads to non-XML pipeline output

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

oxf.epilogue.embeddable=true leads to non-XML pipeline output

Jeroen Hoffman
Hi,

We use Orbeon with the property oxf.epilogue.embeddable set to true.
This makes the content render with just two div elements around it, so
without html/head/body elements. We want this for views, however the
two div elements appear also around the output of pipelines, which
should not happen IMO.

For clarity, the output of my XPL pipeline is this:

<div class="orbeon-portlet-div">
    <div class="orbeon-portlet-content">
        <f:xml-source>
            <my-result-xml-from-xpl/>
        </f:xml-source>
    </div>
</div>

So, when submitting to a pipeline, instance replacement cannot take
place because this structure is not regarded as xml, exception is
"Body received with non-XML media type for replace="instance":
text/html" (from XFormsModelSubmission.java:922).


Is this a bug?
Can I work around this, for instance by creating my own epilogue?


Thanks in advance,
Jeroen Hoffman


PS We have Orbeon version 3.7.1.200905272119


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

Re: oxf.epilogue.embeddable=true leads to non-XML pipeline output

Alessandro Vernet
Administrator
Hi Jeroen,

Jeroen Hoffman wrote
We use Orbeon with the property oxf.epilogue.embeddable set to true.
This makes the content render with just two div elements around it, so
without html/head/body elements. We want this for views, however the
two div elements appear also around the output of pipelines, which
should not happen IMO.
I am looking at the code, and epilogue.xpl runs epilogue-portlet.xpl when embeddable is set to true. And epilogue-portlet.xpl, as you have noticed, doesn't properly handle XML generated by a "service". To create embeddable content, I think we only want to just do two things:

* Use the oxf:/config/theme-portlet-examples.xsl theme.
* Not have a doctype declaration generated at the top of the file.

So I think that when embeddable is set to true, we should:

* Run epilogue-servlet.xpl (remove the code in epilogue.xpl that runs epilogue-portlet.xpl).
* In epilogue-servlet.xpl, in the code that picks the theme, if embeddable is true, use theme-portlet-examples.xsl (not explicitly but through the oxf.epilogue.theme.portlet property).
* In epilogue-servlet.xpl, where the oxf:html-converter is called, if embeddable is true, don't provide a public-doctype and system-doctype in the config to the oxf:html-converter.

Do you want to try those changes? If you get to something that works well for you, could you send us the files you updated (may it will just be epilogue-servlet.xpl and epilogue.xpl), and we'll put this in the codebase.

Alex
Reply | Threaded
Open this post in threaded view
|

Re: Re: oxf.epilogue.embeddable=true leads to non-XML pipeline output

Jeroen Hoffman
HI Alex,
Your suggestions worked out pretty well!
Attached are my patched files as requested, you're welcome to
integrated them if you find them Orbeon-worthy ;-).

Thanks
Jeroen

On Sat, Jun 27, 2009 at 4:18 AM, Alessandro  Vernet<[hidden email]> wrote:

>
> Hi Jeroen,
>
>
> Jeroen Hoffman wrote:
>>
>> We use Orbeon with the property oxf.epilogue.embeddable set to true.
>> This makes the content render with just two div elements around it, so
>> without html/head/body elements. We want this for views, however the
>> two div elements appear also around the output of pipelines, which
>> should not happen IMO.
>>
>
> I am looking at the code, and epilogue.xpl runs epilogue-portlet.xpl when
> embeddable is set to true. And epilogue-portlet.xpl, as you have noticed,
> doesn't properly handle XML generated by a "service". To create embeddable
> content, I think we only want to just do two things:
>
> * Use the oxf:/config/theme-portlet-examples.xsl theme.
> * Not have a doctype declaration generated at the top of the file.
>
> So I think that when embeddable is set to true, we should:
>
> * Run epilogue-servlet.xpl (remove the code in epilogue.xpl that runs
> epilogue-portlet.xpl).
> * In epilogue-servlet.xpl, in the code that picks the theme, if embeddable
> is true, use theme-portlet-examples.xsl (not explicitly but through the
> oxf.epilogue.theme.portlet property).
> * In epilogue-servlet.xpl, where the oxf:html-converter is called, if
> embeddable is true, don't provide a public-doctype and system-doctype in the
> config to the oxf:html-converter.
>
> Do you want to try those changes? If you get to something that works well
> for you, could you send us the files you updated (may it will just be
> epilogue-servlet.xpl and epilogue.xpl), and we'll put this in the codebase.
>
> Alex
>
> -----
> Orbeon Forms - Web 2.0 Forms, open-source, for the Enterprise
> Orbeon's Blog: http://www.orbeon.com/blog/
> Personal Blog: http://avernet.blogspot.com/
> Twitter - http://twitter.com/avernet
> --
> View this message in context: http://www.nabble.com/oxf.epilogue.embeddable%3Dtrue-leads-to-non-XML-pipeline-output-tp24219871p24229754.html
> Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.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
>
>


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

epilogue-patched.xpl (5K) Download Attachment
epilogue-servlet-patched.xpl (26K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Re: oxf.epilogue.embeddable=true leads to non-XML pipeline output

Alessandro Vernet
Administrator
Jeroen,

Jeroen Hoffman wrote
HI Alex,
Your suggestions worked out pretty well!
Attached are my patched files as requested, you're welcome to
integrated them if you find them Orbeon-worthy ;-).
Great, thank you. Just one detail is missing: epilogue-servlet.xpl doesn't pick the theme defined in the oxf.epilogue.theme.portlet property when embeddable is enabled, so you get the full theme. I think this should be changed as well. I'll wait for you to do and test this change before I check this in.

Alex
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: oxf.epilogue.embeddable=true leads to non-XML pipeline output

Jeroen Hoffman
On Thu, Jul 2, 2009 at 2:41 AM, Alessandro  Vernet<[hidden email]> wrote:

>
> Jeroen,
>
>
> Jeroen Hoffman wrote:
>>
>> HI Alex,
>> Your suggestions worked out pretty well!
>> Attached are my patched files as requested, you're welcome to
>> integrated them if you find them Orbeon-worthy ;-).
>>
>
> Great, thank you. Just one detail is missing: epilogue-servlet.xpl doesn't
> pick the theme defined in the oxf.epilogue.theme.portlet property when
> embeddable is enabled, so you get the full theme. I think this should be
> changed as well. I'll wait for you to do and test this change before I check
> this in.
>
> Alex
>
I added this suggestion too and have attached the new
epilogue-servlet-patched.xpl.
I hope to see it committed!

Thanks
Jeroen


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

epilogue-servlet-patched.xpl (27K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: oxf.epilogue.embeddable=true leads to non-XML pipeline output

Alessandro Vernet
Administrator
Jeroen,

Jeroen Hoffman wrote
> Great, thank you. Just one detail is missing: epilogue-servlet.xpl doesn't
> pick the theme defined in the oxf.epilogue.theme.portlet property when
> embeddable is enabled, so you get the full theme. I think this should be
> changed as well. I'll wait for you to do and test this change before I check
> this in.
Excellent; thank you for the work! Those changes are now in. Note that coincidentally, we also did quite a few other changes to those files:

* The property oxf.epilogue.theme.portlet has been renamed oxf.epilogue.theme.embeddable. You use it like before to define the theme you want to use when your content is embeddable (either because you are in a portlet, or because you set oxf.epilogue.embeddable to true, or because you have the orbeon-embeddable=true request parameter).
* You can override the theme defined in those properties on a per-app basis by have a theme.xsl (when not in embeddable mode) or theme-embeddable.xsl (when in embeddable mode) in the directory for that app. That removes all the app-specific tests that we had in the epilogues-servlet.xpl. It also makes it easier for you to develop multiple apps that have a different theme and deploy them in the same Orbeon Forms.

Alex

Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: oxf.epilogue.embeddable=true leads to non-XML pipeline output

Siarhei-2
Alessandro,

Any chance for a new release with this fix anytime soon?

Regards,
Siarhei

Alessandro Vernet wrote
Jeroen,

Jeroen Hoffman wrote
> Great, thank you. Just one detail is missing: epilogue-servlet.xpl doesn't
> pick the theme defined in the oxf.epilogue.theme.portlet property when
> embeddable is enabled, so you get the full theme. I think this should be
> changed as well. I'll wait for you to do and test this change before I check
> this in.
Excellent; thank you for the work! Those changes are now in. Note that coincidentally, we also did quite a few other changes to those files:

* The property oxf.epilogue.theme.portlet has been renamed oxf.epilogue.theme.embeddable. You use it like before to define the theme you want to use when your content is embeddable (either because you are in a portlet, or because you set oxf.epilogue.embeddable to true, or because you have the orbeon-embeddable=true request parameter).
* You can override the theme defined in those properties on a per-app basis by have a theme.xsl (when not in embeddable mode) or theme-embeddable.xsl (when in embeddable mode) in the directory for that app. That removes all the app-specific tests that we had in the epilogues-servlet.xpl. It also makes it easier for you to develop multiple apps that have a different theme and deploy them in the same Orbeon Forms.

Alex
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: oxf.epilogue.embeddable=true leads to non-XML pipeline output

Alessandro Vernet
Administrator
Siarhei,

Siarhei wrote
Any chance for a new release with this fix anytime soon?
You can get this in the nightly builds (http://www.orbeon.com/forms/download), which are quite stable. We don't have a precise plan as to when we will be pushing out a new dev release.

Alex