<?xml-stylesheet type="text/xsl" href="/style/testcase.xsl"?>
<t:test xmlns:t="http://xproc.org/ns/testsuite"
        xmlns:p="http://www.w3.org/ns/xproc"
        xmlns:c="http://www.w3.org/ns/xproc-step"
        xmlns:err="http://www.w3.org/ns/xproc-error">

<t:title>Test xslt-001</t:title>

<t:input port='source'>
<document>
<title>Some Title</title>
<para>Some paragraph.</para>
</document>
</t:input>

<t:input port='style'>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
		xmlns="http://www.w3.org/1999/xhtml"
                version="1.0">

<xsl:output method="xml" encoding="utf-8" indent="no"/>

<xsl:template match="document">
  <html>
    <head>
      <title>
	<xsl:value-of select="title"/>
      </title>
    </head>
    <body>
      <h1>
	<xsl:value-of select="title"/>
      </h1>
      <xsl:apply-templates/>
    </body>
  </html>
</xsl:template>

<xsl:template match="title"/>

<xsl:template match="para">
  <p>
    <xsl:apply-templates/>
  </p>
</xsl:template>

</xsl:stylesheet>
</t:input>

<t:pipeline>
<p:declare-step version='1.0' name="pipeline">
<p:input port="source"/>
<p:input port="style"/>
<p:input port="parameters" kind="parameter"/>
<p:output port="result"/>

<p:xslt>
  <p:input port="source">
    <p:pipe step="pipeline" port="source"/>
  </p:input>
  <p:input port="stylesheet">
    <p:pipe step="pipeline" port="style"/>
  </p:input>
</p:xslt>

</p:declare-step>
</t:pipeline>

<t:output port='result'>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Some Title</title></head><body><h1>Some Title</h1>

<p>Some paragraph.</p>
</body></html></t:output>

</t:test>

