On Thu, Mar 13, 2014 at 11:18 AM, Michele R Combs <[log in to unmask]> wrote:
> Ah, I see. So this would be a separate step we'd have to run our EAD through, then? We already have the EAD Report Card built into our workflow; maybe we'll just add code to that. It never occurred to me to do that, but since we're already using it and it sounds like it would be essentially the same approach ("an XSLT stylesheet, which is applied to the documents being validated to generate the test results") that might be the easiest thing.
Sure, absolutely. Schematron only makes it easier to formulate, deploy
and maintain the rules; you need XPath to implement the tests, but no
XSLT as such. (That is, until you start writing custom function
libraries for yourself. :-) This makes more of a difference if and as
your requirements change rapidly, or grow more complex. Plus, since
Schematron is an ISO standard (part of ISO/IEC 19757 - Document Schema
Definition Languages, which is also the umbrella for RNG), its
interfaces are stable, which makes it worthwhile for a tool like
oXygen to integrate.
But if you already have an XSLT-based quality checking step in place,
by all means, amending it is also an approach to this problem, since
XSLT can do everything Schematron can. You just don't get the syntax
sugar, is all.
One thing that does concern me a bit, however, is that organizations
(and communities such as EAD :-) not get too stuck on ten-year-old
technology (which is the opposite of the idea of going with XML). In
this context, for example, XSLT 2.0 and the related specs (XPath 2.0,
XQuery, Schematron+XSLT 2.0) are so enormously powerful, it scares me
to see people still working so hard in XSLT 1.0. Like having to crank
your engine by hand to start the car ... it was a huge advance, back
For example, testing whether the value of an element ends in punctuation:
<xsl:if test="translate(substring(.,string-length(.)),$punct,'')" ... </xsl:if>
As written, $punct includes only a period, a colon, and two kinds of dashes.
This catches values ending with any character defined as part of the
'punctuation' block in Unicode. (Of course, if that's not what you
want, this is a regular expression.)
Apologies if I'm preaching to the choir! :-)
Wendell Piez | http://www.wendellpiez.com
XML | XSLT | electronic publishing
Eat Your Vegetables