Using XInclude for instances

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

Using XInclude for instances

mjgraham
Hi,

I've tried the following:

<xforms:model>
  <xforms:instance id="apps">
    <xi:include href="apps-list.xml"/>
  </xforms:instance>
</xforms:model>

or even just:

<xforms:model>
  <xi:include href="apps-list.xml"/>
</xforms:model>

but neither of these work. Is the use of XInclude restricted to just the
entire model or href="input:data" - these are the two cases covered by
the documentation?

    Cheers,

    Matthew



--
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: Using XInclude for instances

Erik Bruchez
Administrator
Matthew,

 > I've tried the following:
 >
 > <xforms:model>
 >  <xforms:instance id="apps">
 >    <xi:include href="apps-list.xml"/>
 >  </xforms:instance>
 > </xforms:model>
 >
 > or even just:
 >
 > <xforms:model>
 >  <xi:include href="apps-list.xml"/>
 > </xforms:model>
 >
 > but neither of these work. Is the use of XInclude restricted to just the
 > entire model or href="input:data" - these are the two cases covered by
 > the documentation?

No, but you have to be aware against what URI relative paths
resolve. The base URI of an XForms page is set to the external URI,
i.e. usually an HTTP URI. I.e. if your page was requested with:

   http://example.org/ops/mypage

then your XInclude resolves as:

   http://example.org/ops/apps-list.xml

So unless you actually make apps-list.xml available through HTTP, that
won't work. Instead, you can use the "oxf:" scheme an an absolute URI
to access a local resource:

   <xi:include href="oxf:/mypage/apps-list.xml"/>

-Erik

--
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/




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