Comments (23)
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.
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.
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.
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.
Would be great if Schematron moves in this direction of using namespaces.
from schematron-enhancement-proposals.
I'm not convinced, but I will consult the Working Group.
from schematron-enhancement-proposals.
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.
I concur with David
from schematron-enhancement-proposals.
from schematron-enhancement-proposals.
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.
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.
from schematron-enhancement-proposals.
from schematron-enhancement-proposals.
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.
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.
from schematron-enhancement-proposals.
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.
from schematron-enhancement-proposals.
D3 is not impossible if new elements belong to different namespaces.
from schematron-enhancement-proposals.
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.
The gist of the current draft is:
- introduce a new attribute,
schematronVersion
, on root elementschema
- 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.
from schematron-enhancement-proposals.
I've gone with schematronEdition
in the working draft.
from schematron-enhancement-proposals.
Related Issues (20)
- Update XSLT 1.0 URL HOT 1
- Add attribute named e.g. 'severity' to schematron with well defined semantics for reporting severity levels HOT 8
- pattern/@documents: rules apply only to subordinate documents? HOT 3
- pattern/@documents: pattern variables in scope? HOT 6
- pattern/@documents: definition of behaviour HOT 1
- Defining namespaces HOT 5
- pattern/@document should allow variable that is a document HOT 1
- Ability for role value to be dynamic or different per phase HOT 9
- ISO Schematron iso-schematron.rng license issue HOT 9
- Define the process of importing (include,extending, etc.) definitions from an external ISO Schematron schema HOT 3
- Overrides on sch:include[@href] & sch:extends[@href]
- Clarify ordering of certain elements HOT 1
- SVRL element for compilation and runtime errors HOT 6
- Clarify support for XPath 4.0 or XSLT/XQuery 4.0 HOT 3
- Enhancement for sch:phase - @when HOT 10
- Enhancement for sch:phase - @start-at
- Add postconditions for variables and contexts: @post-condition HOT 13
- sch:pattern/@documents="#SVRL" to allow marking/grading/summarization on patterns in validation results
- Checking for substrings of the node values HOT 12
- Proposal for sch:view element, and Schematron View Vocabulary, for embedded notations, branches, richer iteration (updated @view-as proposal)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from schematron-enhancement-proposals.