<?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 xsl-t005</t:title>

<t:description xmlns="http://www.w3.org/1999/xhtml">
  <p>Tests the p:xslt initial-mode option with existing mode.</p>  
</t:description>

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


<t:pipeline>
	 <p:pipeline version='1.0' name="pipeline"
	            xmlns:p="http://www.w3.org/ns/xproc">

	<p:xslt initial-mode="first">
	     <p:input port="stylesheet">
             <p:inline>
	                  <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	                       version="1.0">
	    <xsl:template match="/" mode="first">
	            <xsl:copy-of select="."/>            
	    </xsl:template>
	  </xsl:stylesheet>
            </p:inline>    
	     </p:input>
	</p:xslt>

	</p:pipeline>
</t:pipeline>

<t:output port='result'><document>
<para>Some paragraph.</para>
</document>
</t:output>

</t:test>

