Git Product home page Git Product logo

schema's Introduction

This repository was archived and made read-only on 1 October 2020.

At that time, new applications of Schematron were advised to use the SchXslt Schematron implementation at https://github.com/schxslt/schxslt. The list of currently known Schematron implementations is maintained in the 'Awesome Schematron' repository at https://github.com/Schematron/awesome-schematron#software.

schematron Release

This is the most recent version of the "skeleton" XSLT implementation of ISO Schematron by Rick Jelliffe and many others. Notable early contributions were made by Oliver Becker and his students.

It is a library of XSLT scripts suitable for embedding in applications or servers, or running from command shells. There is a version for XSLT1 and one for XSLT2. There is an XSLT API to allow easy integration, but most popular is to use the generated output XML documents which use the flat SVRL (Schematron Validation Reporting Language) defined as part of ISO Schematron.

This Open Source software was first released in 2000, and has had various homes since them: xml.ascc.net (Academia Sinica, Taiwan), Schematron.com (Rick Jelliffe's information site, courtesy Allette Systems), GoogleCode and now GitHub. There are several other minor forks of Schematron on the web: as at January 2017, this site is Rick's "official" distribution site for the code.

Status: The code has tracked the various versions of Schematron from version 1.1 to ISO Schematron 2006 and draft ISO Schematron 2nd edition (now ISO Schematron 2016). The scripts are currently being checked against the released ISO Schematron 2016 International Standard to confirm conformance, and to merge various bug fixes and enhancements that have been requested over the last decade.

Bugs and Limitations

As of October 2020 this implementation is not conformant to the ISO specification with regards to the following requirements:

  • The language tag of a diagnostic is not copied to the SVRL output.
  • Property references are not copied to the SVRL output.
  • The xsl:copy-of instruction is not executed inside a sch:property element.
  • The sch:name element with a @path attribute does not expand into the value of evaluating the expression in @path.
  • An xsl:key element cannot contain a sequence constructor.
  • A variable defined for a phase is not scoped to this phase, but has global scope.
  • A variable defined for a patter is not scoped to this pattern, but has global scope.
  • The rule context cannot be a comment node.
  • The rule context cannot be a processing instruction node.
  • A subordinate document expressions cannot contain a variable.
  • A rule can extend an abstract rule that is defined in a different pattern.

schema's People

Contributors

andrewsales avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

schema's Issues

Consider to add documentation hints inside RNC

Problem

The current RNC schema of Schematron does not contain any documentation related strings. It is not clear from looking at the schema what these elements and attributes really mean. You have to read the specification.

Suggested solution

It is quite easy to document elements and attribute. For example, this is an original snippet:

attribute id { xsd:ID }?,

to add documentation, use this:

## Identifies the unique ID value of the element
attribute id { xsd:ID }?,

To make this fly, I'd recommend:

  • Make the documentation string short and sweet. There is no need to add lengthy paragraphs.
  • Provide links to the Schematron specification for further details.
  • Create patterns when attributes are needed for more elements. That simplifies and improves reuse. There is no need to repeat yourself.

Benefits

IMHO, adding documentation inside the Schematron schema has these benefits:

  • Gives guiding aids. Some XML editors can show this as a popup when trying to add a new element or attribute.
  • Help beginners to get accustomed to Schematron schema. This works quite good in combination with the first item.
  • Reduces time spent to find out about the meaning of an element/attribute. Sometimes it's enough to let your XML editor show the help without looking for the specification.
  • Allows to link it to the Schematron specification, if wanted.

Wrong default namespace in schematron.rnc

Problem

Probably a copy-and-paste error:

default namespace sch = "http://purl.oclc.org/dsdl/schematronhttp://purl.oclc.org/dsdl/schematron"

This looks not right. ๐Ÿ˜‰

It's actually quite a severe bug as it prevents users from validating Schematron rules. ๐Ÿ˜ข

Solution

default namespace sch = "http://purl.oclc.org/dsdl/schematron"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.