[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Schematron: Is @documents of an abstract patternsubject to

  • From: David Maus <lists@dmaus.name>
  • To: David Maus <lists@dmaus.name>
  • Date: Fri, 02 Nov 2018 08:56:12 +0100

Re:  Schematron: Is @documents of an abstract patternsubject to
On Mon, 29 Oct 2018 15:29:41 +0100,
David Maus wrote:
> 
> Hi Rick,
> 
> On Mon, 29 Oct 2018 15:16:40 +0100,
> Rick Jelliffe wrote:
> > 
> > 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']?
> 
> I cannot answer this question. I am looking at Schematron from the
> perspective of an implementer.
> 
> @documents is allowed on sch:pattern[@abstract = 'true'] and thus I
> need to handle this case.

On closer inspection I am certain that @documents ought to be subject
to parameter replacement.

Per 6.2 (Minimal syntax) abstract patterns are resolved by replacing
parameter references "in all enclosed attributes that contain
queries". The @documents in turn is to be interpreted according to the
same production rule as an assertion test.

Best,
  -- David

> 
> Best,
>   -- David
> 
> > 
> > Regards
> > Rick
> > 
> > On Mon, Oct 29, 2018 at 6:11 PM David Maus <lists@dmaus.name> 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: xml-dev-unsubscribe@lists.xml.org
> >  subscribe: xml-dev-subscribe@lists.xml.org
> >  List archive: http://lists.xml.org/archives/xml-dev/
> >  List Guidelines: http://www.oasis-open.org/maillists/guidelines.php
> 
> -- 
> David Maus M.A.
> 
> Mobile: +49-151-61506713
> Www: http://dmaus.name

-- 
David Maus M.A.

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


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


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.