nw-base-uri-015

Test that the result of p:invisible-xml has no base URI.

Test nw-base-uri-015.xml is expected to pass.

The pipeline

<p:declare-step xmlns:c="http://www.w3.org/ns/xproc-step" xmlns:p="http://www.w3.org/ns/xproc" version="3.0">
   <p:output port="result"/>
   <p:invisible-xml>
      <p:with-input port="grammar">
         <p:inline content-type="text/plain">
             date: s?, day, s, month, (s, year)? .
             -s: -" "+ .
             day: digit, digit? .
             -digit: "0"; "1"; "2"; "3"; "4"; "5"; "6"; "7"; "8"; "9".
             month: "January"; "February"; "March"; "April";
             "May"; "June"; "July"; "August";
             "September"; "October"; "November"; "December".
             year: (digit, digit)?, digit, digit .
           </p:inline>
      </p:with-input>
      <p:with-input port="source">
         <p:inline content-type="text/plain">31 December 2021</p:inline>
      </p:with-input>
   </p:invisible-xml>
   <p:cast-content-type content-type="application/xml">
      <p:with-input select="p:document-properties(.)"/>
   </p:cast-content-type>
</p:declare-step>

Schematron validation

<s:schema xmlns="http://www.w3.org/1999/xhtml" xmlns:s="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
   <s:ns prefix="fn" uri="http://www.w3.org/2005/xpath-functions"/>
   <s:pattern>
      <s:rule context="/">
         <s:assert test="fn:map">Document element is wrong</s:assert>
      </s:rule>
   </s:pattern>
   <s:pattern>
      <s:rule context="/fn:map">
         <s:assert test="not(exists(*[@key='base-uri']))">There should be no base-uri property</s:assert>
      </s:rule>
   </s:pattern>
</s:schema>

Revision history

29 Jun 2026, Norm Tovey-Walsh

Created test