[Schematron] Help sought: implementation of Character Repertoire in XSLT2 for embedding in schematron
Dave Pawson
dave.pawson at gmail.com
Mon Sep 22 03:18:43 EDT 2008
I may be a mile off. If so please tell me.
2008/9/22 Rick Jelliffe <rjelliffe at allette.com.au>:
> I should generate something like
> <rule context="x//text()">
> <assert test="matches(., $theRegex) )">
crdl talks about (at the top level)
in, not-in, unknown.
So shouldn't the assertion be one of those?
The simplest being
<assert test="in (. , $repertoire-reference)">
Surely that's what the user wants to know?
Everything else should be below the water level, so to speak.
> I guess the best approach for Schematron reporting would be
> 0) test each text() node individually
> 1) generate separate assertions where possible, so for better error
> reporting granularity. In particular, for top-level intersections, and
> for top-level three-level logic.
> 2) convert regexes to use XPath logic as much as possible, to reduce
> the size of each particular compiled regex
> 3) after that, use the closest regex possible, with a
> no-spurious-negatives policy for assertions
>
> I wonder if there is a way to use tokenize() to actually locate problem
> characters? Hmmm...
If (as David keeps asserting - and I believe him) the actual tests are done
one by one, say with a recursive function, then the character will be
available.... just that how do you return multiple values (false, \u1224) from
a function?
regards
--
Dave Pawson
XSLT XSL-FO FAQ.
Docbook FAQ.
http://www.dpawson.co.uk
More information about the Schematron
mailing list