Skip to content

Instantly share code, notes, and snippets.

@avernet
Last active November 21, 2015 01:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avernet/1d3af554fe96f95895e8 to your computer and use it in GitHub Desktop.
Save avernet/1d3af554fe96f95895e8 to your computer and use it in GitHub Desktop.
2-level XInclude
<xh:html
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
xmlns:xh="http://www.w3.org/1999/xhtml"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xh:head>
<xh:title>Nested includes</xh:title>
<xf:model>
<xi:include href="oxf:///apps/model.xhtml" xpointer="xpath(/*/*)"/>
</xf:model>
</xh:head>
<xh:body>
<xh:div class="container">
<xh:h1>Nested includes example</xh:h1>
</xh:div>
<fr:xforms-inspector/>
</xh:body>
</xh:html>
<include
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
xmlns:xh="http://www.w3.org/1999/xhtml"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xf:instance id="some-id">
<data/>
</xf:instance>
<xi:include href="oxf:/apps/model2.xhtml" xpointer="xpath(/*/*)"/>
</include>
<include
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xxi="http://orbeon.org/oxf/xml/xinclude"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:xxf="http://orbeon.org/oxf/xml/xforms"
xmlns:fr="http://orbeon.org/oxf/xml/form-runner"
xmlns:xh="http://www.w3.org/1999/xhtml"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xf:instance id="some-id2">
<data/>
</xf:instance>
</include>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment