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

David Carlisle d.p.carlisle at googlemail.com
Fri Sep 19 04:54:18 EDT 2008


---------- Forwarded message ----------
From: David Carlisle <d.p.carlisle at googlemail.com>
Date: 2008/9/19
Subject: Re: [Schematron] Help sought: implementation of Character
Repertoire in XSLT2 for embedding in schematron
To: Dave Pawson <dave.pawson at gmail.com>




2008/9/18 Dave Pawson <dave.pawson at gmail.com>

>
>
> If you could make a start I'll do the donkey work?
>

I think the following stylesheet does what's required to gerenerate an xpath
to check if a single character is "in" a repertoire.

what's needed in addition would be one to check that it is "not in".

(if it's neither in nor not in, then it is "unknown")

then you need to split up the input string into single characters to test
each one using string-to-code-points(.)/code-points-to-string() and merge
the whole thing back into a schematon setting.

Rick's initial templates appeared to be doing extra work that's not needed
here specificially quoting regexp characters like [ and *. The content of
<char> is a regexp, so if you quote it, it won;t work (will it, Rick?)
also, as discussed last night it is using || and && which are not xpath
regexp syntax,

I translated all the examples at the back of the spec, and attach the
stylesheet and the resulting xpath expressions.

David




-- 
http://dpcarlisle.blogspot.com/



-- 
http://dpcarlisle.blogspot.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.eccnet.com/pipermail/schematron/attachments/20080919/3ab85a55/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: crdl.xsl
Type: text/xml
Size: 1692 bytes
Desc: not available
Url : http://www.eccnet.com/pipermail/schematron/attachments/20080919/3ab85a55/attachment.xsl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: crdl.txt
Url: http://www.eccnet.com/pipermail/schematron/attachments/20080919/3ab85a55/attachment.txt 


More information about the Schematron mailing list