<?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"
	ignore-whitespace-differences="true">

<t:title>Test system-property-002</t:title>

<t:description xmlns='http://www.w3.org/1999/xhtml'>
<div>
<p>This test demonstrates that unknown system properties return the
empty string.</p>
</div>
</t:description>

<t:input port='source'>
<doc>
  <unknown value="???"/>
</doc>
</t:input>

<t:pipeline>
<p:declare-step version='1.0' xmlns:p="http://www.w3.org/ns/xproc"
		name="main">
<p:input port="source"/>
<p:output port="result"/>

<p:string-replace match="/doc/unknown/@value">
  <p:with-option name="replace" select="concat('&quot;',p:system-property('p:unknown-value'), '&quot;')"/>
</p:string-replace>

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

<t:output port='result'>
<doc>
  <unknown value=""/>
</doc>
</t:output>

</t:test>



