Re: XInclude not working in Separate Deployment

Posted by Alessandro Vernet on
URL: https://discuss.orbeon.com/Orbeon-doesn-t-copy-xxforms-rows-xxforms-cols-and-xxforms-size-in-repeated-elements-tp278234p382777.html

Betty,

On Tue, Nov 3, 2009 at 10:23 AM, Betty Harvey <[hidden email]> wrote:
> The XInclude does not resolve correctly in the separate
> deployment.  I am using Orbeon dev-post-3.7.1.200910230248
> distribution.
>
> I have a form that uses several XInclude statements for standard
> section.  Right now all the XML fragments are in the save directory
> as the form (this works when located directly under Orbeon).

So you have:

webapps
    your-app
        your-form
            form.xhtml
            general.xml
        WEB-INF
    orbeon
        WEB-INF

You load the form through
http://localhost:8080/your-app/your-form/form.xhtml and need to
include general.xml in form.xhtml. Is my understanding correct?

The <xi:include> is interpreted by Orbeon Forms (well, Xerces ran by
Orbeon Forms), so it can't just load that general.xml.

1) You could put a full URL there: <xi:include
href="http://localhost:8080/your-app/your-form/general.xml"
xxi:omit-xml-base="true"/>. This would make an HTTP request every
time, and not be very efficient.

2) Or you could setup the Orbeon Forms resource manager to consider
that webapps/your-app is a resource directory (through the
FilesystemResourceManagerFactory in Orbeon's web.xml). Then you will
be able to say <xi:include href="oxf:/your-form/general.xml"
xxi:omit-xml-base="true"/>.

3) Or you could put that file in the Orbeon Forms resources directory
and just use <xi:include href="oxf:/general.xml"
xxi:omit-xml-base="true"/>.

4) With the cross context enable, I am wondering if you can put
general.xml under your-app/WEB-INF/resources/general.xml and load it
with oxf:/general.xml. If this works, that would be my favorite
option. Otherwise #2 comes close.

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