Re: [xml-dev] Schematron: Is @documents of an abstract pattern subject to parameter replacement?

From
Rick Jelliffe <>
To
Date
2018-10-29T14:16:40Z
ID
<CADUdYQX4UVEx4XHsyZz1e2=wMre8MJ9qMjJpjsyja5LOst=>
Thread
Re: [xml-dev] Schematron: Is @documents of an abstract pattern subject to parameter replacement?
Because you can provide @document on the  sch:pattern[@is-a='XXXX']  is there a need to provide @document on the sch:pattern[@abstract='true']?

Regards
Rick

On Mon, Oct 29, 2018 at 6:11 PM David Maus <[email protected]> wrote:
Hello all,

Schemtron 2016 added an optional @documents attribute to sch:pattern
that provides IRIs of subordinate document the rule contexts are
relative to. The @documents is also allowed on an abstract pattern as
per grammar in Annex A.

Am I right to assume that the @documents is subject to parameter
replacement when creating an instance of an abstract pattern?

I.e. does

#+BEGIN_SRC xml
  <schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
    <pattern abstract="true" id="abstract-pattern" documents="'$filename'">
      <rule context="/">
        <assert test="true()"/>
      </rule>
    </pattern>
    <pattern is-a="abstract-pattern" id="instance">
      <param name="filename" value="foobar.xml"/>
    </pattern>
  </schema>
#+END_SRC

expands into

#+BEGIN_SRC xml
  <schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
    <pattern abstract="true" id="abstract-pattern" documents="'$filename'">
      <rule context="/">
        <assert test="true()"/>
      </rule>
    </pattern>
    <pattern id="instance" documents="'foobar.xml'">
      <rule context="/">
        <assert test="true()"/>
      </rule>
    </pattern>
  </schema>
#+END_SRC

?

Best,
  -- David

--
David Maus M.A.

Mobile: +49-151-61506713
Www: http://dmaus.name

_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: [email protected]
subscribe: [email protected]
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php