Code Monkey home page Code Monkey logo

Comments (23)

AndrewSales avatar AndrewSales commented on July 17, 2024 3

I can see that this approach works where a significant break with previous versions needs to be signalled. It has been used in the move from pre-ISO Schematron to ISO Schematron or DocBook 4.5 to 5.0, but I do not see a strong use case this time for Schematron.

Changing the namespace in the next edition of the standard would invalidate all extant Schematron schemas. The task of updating the namespace may become non-trivial for users whose schemas are built from many (often re-used) components, for example.

I would not rule it out in future, but I think for now the XSLT-style approach (one namespace across versions) is preferable.

from schematron-enhancement-proposals.

kosek avatar kosek commented on July 17, 2024 1

I think that namespace should be changed only if semantics of an existing element changes in the new version. Namespace change in such case will prevent misinterpretation of schema by an older implementation. But changing namespace only because of a new version that adds few new minor functions would only confuse users.

from schematron-enhancement-proposals.

AndrewSales avatar AndrewSales commented on July 17, 2024 1

I think the change to the definition of simple conformance in 2020 shifts the onus onto the user to provide a valid schema in the first place. It adds a bullet referring to Annex B, the Schematron schema for Schematron schemas, as if to emphasize this.

what will existing Schematron implementions do for Schematron schemas containing new features in the upcoming version?

I think this hinges on backward compatibility. The new features so far have I think only been additive, so a schema valid to the current standard should also be valid to the next edition. It smooths the upgrade path if schema maintainers want to make use of the new features to leave the namespace unchanged.

Strictly speaking, there is only one edition of an ISO standard, the latest one, which supersedes all previous editions. So an implementation claiming conformance is either up to date or not.

But we could at least say that conformant implementations should (i.e. advised, not required) report nodes in the Schematron namespace that they do not recognize. (By the way, I find the wording "shall be able to report[...]" a little unsatisfactory: mandating the ability to do something is at one remove from the actual doing.)

from schematron-enhancement-proposals.

murata2makoto avatar murata2makoto commented on July 17, 2024 1

I would be uneasy about a mixture of namespaces to represent Schematron structures, if that's what is being suggested

I mentioned that possibility just as a theoretical possibility. Here is yet another possibility. Had we allowed validators conforming to the previous version to skip unknown elements in the existing schematron namespace, we could have achieved D3.

I am reluctant to introduce a new namespace for the next version of Schematron, and prefer the version attribute.

from schematron-enhancement-proposals.

rkottmann avatar rkottmann commented on July 17, 2024

Would be great if Schematron moves in this direction of using namespaces.

from schematron-enhancement-proposals.

AndrewSales avatar AndrewSales commented on July 17, 2024

I'm not convinced, but I will consult the Working Group.

from schematron-enhancement-proposals.

davidcarlisle avatar davidcarlisle commented on July 17, 2024

As a general rule I don't think namespaces work well for versioning. If you change the namespace you have changed the name of every construct in the language so it's essentially a new language not an incremental version. No existing elements remain and any existing xpath or xslt acting on schematron documents will just see the files as not schematron.

Note xslt, mathml, svg, xhtml etc all have had multiple versions all using the same namespace for essentially this reason.

from schematron-enhancement-proposals.

xatapult avatar xatapult commented on July 17, 2024

I concur with David

from schematron-enhancement-proposals.

rjelliffe avatar rjelliffe commented on July 17, 2024

from schematron-enhancement-proposals.

davidcarlisle avatar davidcarlisle commented on July 17, 2024

In what way would you have to change "every construct"?

The name of an element is the namespace-localname pair, so by definition, if you change the namespace it is a new element name.
This means that the new version is not an incremental addition with existing elements plus some new ones and perhaps a few removals. Every construct has a new name, there are no elements in common.

I hate default namespaces,

default namespace or prefix, the same issue applies.

A query such as

xmlns:sch ="http://purl.oclc.org/dsdl/schematron "
...
if(sch:*) then 'it's schematron' else ''t's not schematron'

will report new files as not schematron, of if you edit it to change the namespace it will report old ones are not schematron.

You could of course test for either namespace just as you could test for a file being schematron or svg, the two vocabularies would be distinct languages with nothing in common.

from schematron-enhancement-proposals.

murata2makoto avatar murata2makoto commented on July 17, 2024

Changing namespaces is useful for preventing old applications from providing incorrect results for data conforming to newer versions. RELAX NG and CREPDL did change their namespaces for this reason.

from schematron-enhancement-proposals.

rjelliffe avatar rjelliffe commented on July 17, 2024

from schematron-enhancement-proposals.

rjelliffe avatar rjelliffe commented on July 17, 2024

from schematron-enhancement-proposals.

murata2makoto avatar murata2makoto commented on July 17, 2024

Suppose that we do not change the namespace. Then, what will existing Schematron implementions do for Schematron schemas containing new features in the upcoming version? Will they crash? Will they report incorrect results? Without knowing what will happen, I don't think that we can make a reasonable decision.

from schematron-enhancement-proposals.

dmj avatar dmj commented on July 17, 2024

Suppose that we do not change the namespace. Then, what will existing Schematron implementions do for Schematron schemas containing new features in the upcoming version? Will they crash? Will they report incorrect results? Without knowing what will happen, I don't think that we can make a reasonable decision.

Per 7.2 "[a] full-conformance implementation shall be able to determine for any XML document whether it is a correct schema." As an implementer I read this as: Processor should terminate with an error if the document contains unknown element from the ISO Schematron namespace.

The requirements of a simple-conformance implementation in 7.1 has changed in the 3rd edition.

It now reads: "A simple-conformance implementation shall be able to report for any XML document that it does not conform to the constraints expressed by a given Schematron schema."

While in the previous version it read: "A simple-conformance implementation shall be able to report for any XML document that its structure does not conform to that of a valid Schematron schema."

I don't know why the definition of a simple-conformance implementation was changed in such a drastic way. If we go with the 2nd edition, then I would also read it as: Terminate with an error if the document contains unknown element from the ISO Schematron namespace.

from schematron-enhancement-proposals.

rjelliffe avatar rjelliffe commented on July 17, 2024

from schematron-enhancement-proposals.

murata2makoto avatar murata2makoto commented on July 17, 2024

A schema conforming to the next version may have syntactical constructs not explicitly allowed in the present version. Such constructs are typically unavoidable. I believe that everybody agrees.

Suppose that a document is not valid against a schema conforming to the next version. Existing validators conforming to the previous version are not always able to report that the given document is invalid against the schema. This is because existing implementations cannot handle new constructs appropriately. Again, I believe that everybody agrees.

However, we should prevent existing validators from incorrectly reporting validity without any warnings or errors. This is a must.

Meanwhile, there are some desiderata. They would be very nice.

D1: A schema conforming to the present version of ISO Schematron conforms to the next version.

D2: A document valid against a schema conforming to the present version is reported as valid even if validation is done by a validator conforming to the next version.

D3: A document valid against a schema conforming to the next version is reported as valid even if validation is done by a validator conforming to the previous version.

Changing the Schematron namespace destroys D1, D2, and D3, and is thus acceptable only when it is needed for preventing incorrect validity reports.

from schematron-enhancement-proposals.

rjelliffe avatar rjelliffe commented on July 17, 2024

from schematron-enhancement-proposals.

murata2makoto avatar murata2makoto commented on July 17, 2024

D3 is not impossible if new elements belong to different namespaces.

from schematron-enhancement-proposals.

AndrewSales avatar AndrewSales commented on July 17, 2024

I would be uneasy about a mixture of namespaces to represent Schematron structures, if that's what is being suggested - it would likely prove fiddly for users and poses the question what would happen in a putative edition after next, if that added more new things.

we should prevent existing validators from incorrectly reporting validity without any warnings or errors

Could we effectively invert this, by requiring implementations conformant to the next version to report as much, at user option?

Existing validators could not do so, so would not risk being accidentally conformant.

The less invasive versioning technique would be a new attribute on element schema, which could also be included in SVRL output or otherwise reported.

from schematron-enhancement-proposals.

AndrewSales avatar AndrewSales commented on July 17, 2024

The gist of the current draft is:

  • introduce a new attribute, schematronVersion, on root element schema
  • it is optional and has a single allowed value, 2025
  • implementations must report this attribute and its value or its absence, at user option.

from schematron-enhancement-proposals.

rjelliffe avatar rjelliffe commented on July 17, 2024

from schematron-enhancement-proposals.

AndrewSales avatar AndrewSales commented on July 17, 2024

I've gone with schematronEdition in the working draft.

from schematron-enhancement-proposals.

Related Issues (20)

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.