A Schematron schema for songs

<?xml version="1.0"?>
<schema xmlns="http://www.ascc.net/xml/schematron">
  <title>A Schematron Schema for Songs</title>
  <pattern>
    <rule context="SONG">
      <assert test="TITLE">
        A SONG must contain an initial TITLE element.
      </assert>
      <assert test="TITLE[position()=1]">
        The TITLE element must be the initial element of the SONG element.
      </assert>
      <assert test="COMPOSER">
        A SONG must contain at least one COMPOSER element.
      </assert>
      <assert test="ARTIST">
        A SONG must contain at least one ARTIST element.
      </assert>
    </rule>
  </pattern>
</schema>
 

Previous | Next | Top | Cafe con Leche

Copyright 2000-2002 Elliotte Rusty Harold
elharo@metalab.unc.edu
Last Modified September 6, 2002