Running Schematron

  1. Use skeleton-1.5.xsl to generate an XSLT stylesheet:

    $ xsltproc skeleton1-5.xsl plist.sct
    <?xml version="1.0" standalone="yes"?>
    <axsl:stylesheet xmlns:axsl="http://www.w3.org/1999/XSL/Transform" xmlns:sch="http://www.ascc.net/xml/schematron" version="1.0">
      <axsl:template match="*|@*" mode="schematron-get-full-path">
        <axsl:apply-templates select="parent::*" mode="schematron-get-full-path"/>
        <axsl:text>/</axsl:text>
        <axsl:if test="count(. | ../@*) = count(../@*)">@</axsl:if>
        <axsl:value-of select="name()"/>
        ...

  2. Apply the stylesheet to the input documents:

    $ xsltproc plist.xsl thunderbirdplist.xml
    $
  3. Or after deliberately invalidating the input:

    $ xsltproc plist.xsl thunderbirdplist.xml
    <?xml version="1.0"?>
    The CFBundleSignature is four letters
    $

  4. You can customize the skeleton to produce different output.


Previous | Next | Top | Cafe con Leche

Copyright 2005-2007 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified August 17, 2005