<?xml version="1.0"?>

<?cocoon-process type="xsp"?>

<?cocoon-process type="xslt"?>
<?xml-stylesheet href="sample.xsl" type="text/xsl"?>

<xsp:page
  language="java"
  xmlns:util="http://www.apache.org/1999/XSP/Util"
  xmlns:xsp="http://www.apache.org/1999/XSP/Core"
>
  <page>
    <title>An XML File Inclusion Example</title>

    <p>
      The following paragraph has been included
      from file <code>included.xml</code>:
    </p>

    <blockquote>
      <font color="red">
        <util:include-file name="./included.xml"/>
      </font>
    </blockquote>

    <p>
      The following paragraph has been included
      from uri <code>file:/included.xml</code>:
    </p>

    <blockquote>
      <font color="magenta">
        <util:include-uri>
         <util:href><xsp:expr>
           "file:" +
           XSPUtil.relativeFilename(
             "./included.xml",
             request,
	     (ServletContext) context
           )
         </xsp:expr></util:href>
        </util:include-uri>
      </font>
    </blockquote>

    <p>
      The following paragraph has been included
      from uri <code>http://www.plenix.com/xsp/samples/test.xml</code>:
    </p>

    <blockquote>
      <center>
        <table border="1">
          <tr>
            <td>
              <font color="navy">
                <util:include-uri href="http://www.plenix.com/xsp/samples/test.xml"/>
              </font>
            </td>
          </tr>
        </table>
      </center>
    </blockquote>

    <p>
      Click
      <a href="view-source.xml?filename=test.xml">here</a>
      to view the included XML document.
    </p>

    <p>
      <a href="view-source.xml?filename=include.xml">Source Code</a>
    </p>

    <p>
      <a href="index.html">Return to Main Page</a>
    </p>


  </page>
</xsp:page>
