AntennaHouse / focheck

XSL-FO validation using RELAX NG and Schematron.
Apache License 2.0
31 stars 7 forks source link

Schematron: detecting languages? #9

Closed michael-aka-mmh closed 9 years ago

michael-aka-mmh commented 9 years ago

I receive the following Schematron error for the fo:root attributes xml:lang="en" or language="en", but the description does not tell the attribute.

Description: Enumeration token is: 'en'. Token should be 'none' or 'inherit'.

It seems a list of allowed language codes or at least a formal regular expression should be present.

"A value being a 2-letter code in conformance with [ISO639] is converted to the corresponding 3-letter [ISO639-2] terminology code, a 3-letter code in conformance with [ISO639-2] bibliographic code is converted to the corresponding 3-letter terminology code, a value of 'none' or 'mul' is converted to 'und'."

tgraham-antenna commented 9 years ago

xml:lang wasn't being checked by Schematron, and now language isn't checked either.

Leaving ticket open until there's a rule in fo.sch that checks xml:lang and language against a regular expression: checking against a language list would inevitably be soon out of date.

tgraham-antenna commented 9 years ago

Checking xml:lang in Relax NG using xsd:language datatype added in 19248ae955926c8831fdf59cb46bfb443ccea0f4.