DSP2DCDSXML : A transform to map a DSP into a Schematron schema for DC-DS XML
Note: This is experimental, work in progress.
Introduction
The attached XSLT transform takes as input an instance of the XML format specified by the Description Set Profile Working Draft (
version of 2008-03-31) and creates as output a a Schematron schema containing a corresponding set of patterns expressing constraints on an instance of the XML format described in the Proposed Recommendation for the XML format known as DC-DS XML (
version of 2008-09-01).
Transform: dsp2sch-dcds.xsl
Examples
An example DSP in the DSP-XML format: bookdsp.xml
The Schematron schema generated by applying that transform to that profile: dsp-dcds.xml
Examples of DC-DS XML instances validated against that Schematron schema:
-
Instance: book0.xml Single description of book. Matches all constraints.
-
SVRL Output: valbook0.xml
-
Instance: book1.xml Description of book, description of person. Matches all constraints.
-
SVRL Output: valbook1.xml
-
Instance: book2.xml Description of book, two descriptions of persons. Matches all constraints.
-
SVRL Output: valbook2.xml
-
Instance: book3.xml Description of person. Fails to match some constraints (minOccurs for description (5.3), standlone (5.2)).
-
SVRL Output: valbook3.xml
-
Instance: book4.xml Description of book, three descriptions of persons. Fails to match some constraints (maxOccurs for description (5.4), maxOccurs for statement (6.2)).
-
SVRL Output: valbook4.xml
-
Instance: book5.xml Description of book, two descriptions of persons, one description of frog. Fails to match some constraints (no matching DT based on resource class (5.5)).
-
SVRL Output: valbook5.xml
-
Instance: book6.xml Description of book, description of person. Fails to match some constraints (description template ref (6.6.1)).
-
SVRL Output: valbook6.xml
-
Instance: book7.xml Description of book, description of person, description of collection. Fails to match some constraints (description template ref (6.6.1)).
-
SVRL Output: valbook7.xml
-
Instance: book8.xml Description of book, description of person, description of collection. Fails to match some constraints (literal language (6.5.2, 6.5.3), literal SES URI (6.5.4, 6.5.5), non-literal value URI (6.6.3.1), non-literal maxOccurs for value string (6.6.5.2), non-literal value string literal list (6.5.1)).
-
SVRL Output: valbook8.xml