adding XInclude into /xforms-hello/view.xhtml as a test

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

adding XInclude into /xforms-hello/view.xhtml as a test

DL
This post was updated on .
I've been reading about XInclude ..
but I can't get a simple example to work in /xforms-hello/ as a test app.

I've added in this namespace ..

xmlns:xi="http://www.w3.org/2001/XInclude"

and this line in body of view.xhtml  ..

<xforms:instance id="main-model-instance" src="oxf:/main-xforms-instance.xml"/>

with the included xml file in same folder as view.xhtml

but I don't see any rendering of included xml file .. main-xforms-instance.xml

...

I have xforms inspector enabled which shows the namespace .. xmlns:xi="http://www.w3.org/2001/XInclude"

...

Any advice?   I have been reading the wiki tutorials.

...

[EDIT]

Since posting I've been playing with xforms inspector and I see now that I can select "model" and view instances in the inspector .. so I guess I don't have the correct code in view.xhtml which renders the included instance?
Reply | Threaded
Open this post in threaded view
|

Re: adding XInclude into /xforms-hello/view.xhtml as a test

Erik Bruchez
Administrator
I don't see any xi:include element below. Also, you don't say what you
want to do so it's hard to answer.

-Erik

On Sun, May 6, 2012 at 3:13 PM, DL <[hidden email]> wrote:

> I've been reading about XInclude ..
> but I can't get a simple example to work in /xforms-hello/ as a test app.
>
> I've added in this namespace ..
>
> xmlns:xi="http://www.w3.org/2001/XInclude"
>
> and this line in body of view.xhtml  ..
>
> <xforms:instance id="main-model-instance"
> src="oxf:/main-xforms-instance.xml"/>
>
> with the included xml file in same folder as view.xhtml
>
> but I don't see any rendering of included xml file ..
> main-xforms-instance.xml
>
> ...
>
> I have xforms inspector enabled which shows the namespace ..
> xmlns:xi="http://www.w3.org/2001/XInclude"
>
> ...
>
> Any advice?   I have been reading the wiki tutorials.
>
>
>
>
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/adding-XInclude-into-xforms-hello-view-xhtml-as-a-test-tp4613622.html
> Sent from the Orbeon Forms (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
DL
Reply | Threaded
Open this post in threaded view
|

Re: adding XInclude into /xforms-hello/view.xhtml as a test

DL
This post was updated on .
Thanks .. I'll keep reading the XInclude tutorials until it sinks in ..

this old thread comes quite near to what I am trying to do ..

http://orbeon-forms-ops-users.24843.n4.nabble.com/Xinclude-and-absolute-paths-td31881.html#a31884

i.e. to include dynamic xml content using (in my case) *.php to return xml .. but it could also be *.jsp as in the above thread.

My snippets to XInclude in view.html will be in http://localhost:8080/orbeon/xforms-php/include.php 

and the returned content will be XML (with content header set) delivered to the xi:include element (which I agree I didn't add to my post).


[p.s.]  I've dropped my earlier idea to use JSF facelets since XInclude seems the right approach.

[p.p.s] Also I should clarify I'm now running orbeon as a webapp on caucho.com resin server which has integrated PHP Quercus servlet .. but as I've pointed out above the XInclude href could equally be *.jsp instead of *.php