<?xml version="1.0" encoding="utf-8"?>
<t:test xmlns:t="http://xproc.org/ns/testsuite/3.0"
        xml:base="/nw-static-option-002.xml"
        name="nw-static-option-002.xml"
        expected="pass">
   <t:info>
      <t:title>Static option 002 (NW)</t:title>
      <t:revision-history>
         <t:revision>
            <t:date>2026-04-25</t:date>
            <t:author>
               <t:name>Norm Tovey-Walsh</t:name>
            </t:author>
            <t:description xmlns="http://www.w3.org/1999/xhtml">
               <p>Initial test</p>
            </t:description>
         </t:revision>
      </t:revision-history>
   </t:info>
   <t:description xmlns="http://www.w3.org/1999/xhtml">
      <p>This test demonstrates that a static option declared in an
     imported pipeline is an in-scope option in the importing pipeline.</p>
   </t:description>
   <t:pipeline>
      <p:declare-step xmlns:p="http://www.w3.org/ns/xproc"
                      xmlns:xs="http://www.w3.org/2001/XMLSchema"
                      name="main"
                      version="3.1"
                      exclude-inline-prefixes="#all">
         <p:import href="../documents/option-library.xpl"/>
         <p:output port="result"/>
         <p:identity>
            <p:with-input>
               <p:document href="{$source-document}"/>
            </p:with-input>
         </p:identity>
      </p:declare-step>
   </t:pipeline>
   <t:schematron>
      <s:schema xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://purl.oclc.org/dsdl/schematron"
                queryBinding="xslt2">
         <s:pattern>
            <s:rule context="/">
               <s:assert test="doc">The document element is incorrect.</s:assert>
            </s:rule>
         </s:pattern>
      </s:schema>
   </t:schematron>
   <t:result name="nw-static-option-002.xml">
      <doc/>
   </t:result>
</t:test>
