Git Product home page Git Product logo

schema's Issues

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"

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.

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.