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

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


2008/9/20 Rick Jelliffe <rjelliffe at allette.com.au>

> Dave Pawson wrote:
> > So it would make sense to reduce the number of calls from one per
> > character
> > at the top of this heap? Processing a 'string' (however obtained) would
> > reduce that overhead by len(string) calls?
> >
> All I am implementing at the moment is a string-level check.


I don't see how you can do a string level check in general. If the example
is just a union of char (as are all the examples in the spec) then you could
make a single regexp just |-ing them all together, but even in this case
the crepdl spec warns that the number of cases if made into a single regex
would likely be too large for some regex engines.

In general where you have differencing and hulls etc, I think it would be
rather hard to construct a regexp that checked the whole string. Certainly
the xpath in the code that I posted only works one character at a time.

David

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


More information about the Schematron mailing list