Schematron / schematron

Schematron "skeleton" - XSLT implementation
MIT License
93 stars 45 forks source link

Default value for the "visit-text" parameter #46

Open octavianN opened 7 years ago

octavianN commented 7 years ago

In the iso_schematron_skeleton_for_saxon.xsl stylesset the default value for the visit-text parameter is set to false. Therefore, by default you cannot create rules that match text nodes. The parameter is NON CONFORMANT as the comment from the stylesheet explains:

THIS IS NON CONFORMANT BEHAVIOUR JUST FOR DISCUSSION OF A POSSIBLE CHANGE TO THE SPECIFICATION. THIS PARAM SHOULD GO IF THE FINAL DECISION IS THAT THE SPEC DOES NOT CHANGE.

I think the default parameter value should be true, to allow matching text nodes.

AndrewSales commented 7 years ago

The standard says in regard to the query language bindings for XSLT (both 1 & 2) in Annexes C & H (both normative): "An implementation may allow the rule context to be text nodes at user option however implementations may reject or fail to implement schemas which specify text nodes."

Wouldn't that suggest that this implementation is conformant? But I'd agree it's of more use to have a default value of true.

octavianN commented 7 years ago

Yes, the implementation is conformant with the specification. I just think that the default value of the parameter should be true.