XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: Schematron: Base URI of included external definitions

Hi Henry,

On Fri, 26 Oct 2018 16:07:50 +0200,
Henry S. Thompson wrote:
> 
> David Maus <lists@dmaus.name> 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


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS