Data Coverage

Data coverage is another important quality indicator. We have to be sure that our code covers all data cases. As XSLT is a data-driven process, there are some mechanisms in XSLT to ensure that all data cases are processed, like no-match attributes in xsl:mode. But it is sometime not enough, as we can decide to process only parts of input content, with xsl:apply-templates/@select for examples.

A common way to ensure that all data cases are covered is to use grammars on input content. XML Schema[XML Schema], RelaxNG[RelaxNG] and Schematron[Schematron] are commons grammars used with XML content, and at least XML Schema and Schematron can easily be embeded in an XSLT transformation. But in our case, input is pure text, with no markup, and these grammars are not made to validate text.

Today, we are only 6 people to use this tool, and we decided to ignore data coverage problems. If a writer use an unsupported syntax, it is simply processed as simple text, and sent to output without any transform. It is neither satisfying nor robust, but, at this point of usability, we will not invest more in this part.