Re: [xml-dev] Re: Schematron: Base URI of included external definitions

From
Rick Jelliffe <>
To
Date
2018-10-29T14:03:48Z
ID
<CADUdYQW56z42XjW159mrHsczmQ0g=furjs=>
Thread
Re: [xml-dev] Re: Schematron: Base URI of included external definitions
Sch:include is not xml:include.  

sch:include has no equivalent to xml:base.

Regards
Rick

On Mon, Oct 29, 2018 at 6:02 PM David Maus <[email protected]> wrote:
Hi Henry,

On Fri, 26 Oct 2018 16:07:50 +0200,
Henry S. Thompson wrote:
>
> David Maus <[email protected]> writes:
>
> > Schematron allows for the inclusion of external definitions via
> > sch:include (5.4.4) and sch:expand (5.4.3).
> >
> > From my understanding the current spec does not discuss how this
> > inclusion relates/interacts with @xml:base and relative URI references
> > in the included definitions.
> >
> > Is a conformant implementation supposed to perform base URI fixup?
>
> Yes.  See https://www.w3.org/TR/xinclude-11/#base

Okay, thought so.

Then what about this case:

#+BEGIN_SRC xml
  <schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
    <include href="subdir/abstract-pattern.xml"/>
    <pattern is-a="abstract-pattern" id="instance">
      <param name="foo" value="bar"/>
    </pattern>
  </schema>
#+END_SRC

With abstract-pattern.xml beeing:

#+BEGIN_SRC xml
  <pattern abstract="true" id="abstract-pattern">
    <rule context="$foo">
      <assert test="doc-available('abstract-pattern.xml')"/>
    </rule>
  </pattern>
#+END_SRC

After performing the inclusion we get:

#+BEGIN_SRC xml
  <schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
    <pattern abstract="true" id="abstract-pattern" xml:base="/path/to/subdir">
      <rule context="$foo">
        <assert test="doc-available('abstract-pattern.xml')"/>
      </rule>
    </pattern>
    <pattern is-a="abstract-pattern" id="instance">
      <param name="foo" value="bar"/>
    </pattern>
  </schema>
#+END_SRC

Does the pattern 'instance' inherit @xml:base of the abstract pattern
after inclusion?

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