I'd very much recommend using Schematron for this:
There is a reference implementation written in XSLT which will generate
XSLT from the Schematron file in which you have defined your rules for
usage (expressed in XPATH). The jing validator will also validate
instances directly (according to an earlier version of Schematron,
I can share examples and provide more info if you'd like.
Thu, 21 Oct 2010, Michael Rush wrote:
> I did this about 6 or 7 years ago for the Massachusetts Historical Society. Before I learned how to write RelaxNG schemas for validating local encoding practices, XSLT was a handy
> way to output errors if certain criteria were not met.
> If someone from the MHS is on the list perhaps they will chime in to say of they are still using that XSL or not. Else, if you are interested, I can get in touch with them off
> list and forward the stylesheet to you.
> Accessioning Archivist / EAD Coordinator
> Beinecke Rare Book and Manuscript Library
> On Thu, Oct 21, 2010 at 2:35 PM, Ethan Gruber <[log in to unmask]> wrote:
> Has anyone on the list ever written or used XSLT stylesheets that can be run against EAD guides to list errors or warnings that the guide fails to meet certain criteria
> (invalid content, usage of elements/attributes fails to meet best practices)?
> I'm attempting to process some EAD guides against dtd2schema.xsl and post the result to eXist, but if a file doesn't validate, eXist will not accept it. I'd like to be
> able to preprocess the file and output human-readable error reports before attempting to post it to eXist.
> Ethan Gruber
Special Collections Analyst/Librarian
Columbia University Libraries Digital Program
[log in to unmask]