[Schematron] Help sought: implementation of Character Repertoire in XSLT2 for embedding in schematron

David Carlisle d.p.carlisle at googlemail.com
Sat Sep 20 09:32:27 EDT 2008


a) I might get time to do a bit more to it (I noticed last night I'd missed
off intersection for example) and also to fill in the hull/unknown code.
b) the replace is replacing ' by '' as I'm putting the regexp into a
'-delimited xpath string, so (in xpath2) you can include ' by doubling it.
so <char>'</char> comes out as matches(.,''')
c) The XSLT posted to the schematron list by David Carlisle  to convert
crepdl schemas to XPath was written by David Carlisle and may be used by any
person for any purpose and may be incorporated into other software
and distributed under any licence that is appropriate.

(If I do do some more, I'll post the code with a notice of that form
appended as a comment, but the above
gives you rights to the existing sketch)

dsdl-discuss is a closed list so I have 1001 bounces (and I assume Eric has
a pile of blocked mail in his mderator's queue I don't suppose we could use
dsdl-comment instead?

> There needs to be a leading and trailing ^ and $ to get the match for
> the whole string.   But it would be better to go through
> character-by-character to identify the particular unexpected character.

The logic in the conversion that I used is only sound if it is checking one
character at a time, so yes you do need to do apply this to something like
string-to-codepoints(.)/codepoints-to-string(.) which is a sequence of
characters
rather than directly to string(.).

David



-- 
http://dpcarlisle.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.eccnet.com/pipermail/schematron/attachments/20080920/7eef051a/attachment.html 


More information about the Schematron mailing list