Schematron Pretty

SMIL

     Pattern           

Top-Level Structures

     Rule   
/smil
     Assert   
self::*A <name path=""/> element must appear at the top level.
     Assert   
count(head) < 2A <name path=""/> element should not have more than one head element.
     Assert   
count(body) < 2A <name path=""/> element should not have more than one body element.
     Rule   
smil
     Assert   
ancestor::*A <name path=""/> element must only appear at the top level.



     Pattern           

The Document Head

     Rule   
head
     Assert   
parent::smilA <name path=""/> element should be a child of the smil element.
     Assert   
(count(layout) + count(switch) + count(meta)) = count(*)A <name path=""/> element should only contain the elements layout, switch or meta.
     Rule   
meta
     Assert   
@nameA <name path=""/> element should have a name attribute.
     Assert   
@contentA <name path=""/> element should have a content attribute.
     Assert   
parent::headA <name path=""/> element can only appear in a head element.
     Report   
*A <name path=""/> element should not have any content.
     Rule   
layout
     Assert   
parent::head or parent::switchA <name path=""/> element can only appear in a head or switch element.
     Rule   
head/switch
     Assert   
layoutA <name path=""/> element in the head can only contain layout elements.
     Rule   
region | root-layout
     Assert   
ancestor::layoutA <name path=""/> must be in a layout element.
     Report   
*A <name path=""/> should be empty. It should not have any subelements.



     Pattern           

The Document Body

     Rule   
body
     Assert   
parent::smilA <name path=""/> element should be a child of the smil element.
     Assert container content  
count(audio) + count(video) + count(text) + count(img) + count(animation) + count(textstream) + count(ref) + count(par) + count(seq) + count(switch) + count(a) = count(*) A <name path=""/> element can only have container content.
     Rule   
par | seq | body/switch
     Assert container content  
count(audio) + count(video) + count(text) + count(img) + count(animation) + count(textstream) + count(ref) + count(par) + count(seq) + count(switch) + count(a) = count(*) A <name path=""/> element can only have container content.
     Rule mo-elements  
audio |video |text |img |animation |textstream |ref
     Report mo-content  
count(anchor) < count(*)Only anchor elements are allowed as subelements of media object elements.
     Assert   
parent::par or parent::switch or parent::seqA <name path=""/> element may only be inside the elements par, switch or seq.
     Rule   
anchor
     Assert   
@hrefA <name path=""/> element should have an href element.
     Rule   
a
     Assert   
@hrefA <name path=""/> element should have an href element.



     Pattern           

Media Object Attributes

     Rule   
*[@region] | *[@alt] | *[@longdesc] | *[@src] | *[@type] | *[@dur] | *[@repeat]
     Assert   
self::audio or self::video or self::text or self::img or self::animation or self::textstream or self::refA Media Object attribute should only be on a Media Object Element.



     Pattern           

Id Attributes

     Rule   
*[@id]
     Assert   
self::smil or self::head or self::layout or self::region or self::root or self::body or self::par or self::seq or self::switch or self::audio or self::video or self::text or self::img or self::animation or self::textstream or self::refA <name path=""/> element cannot have an ID attribute.



     Pattern           

Link Attributes

     Rule   
a[@show] | anchor[@show]
     Assert   
(@show='replace') or (@show='new') or (@show='pause')The show attribute on a <name path=""/> element should have one of the values replace, new or pause.



     Pattern           

Skip Attributes

     Rule   
meta[@skip-content] | anchor[@skip-content] | root-layout[@skip-content] | region[@skip-content]
     Assert   
(@skip-content ='true' ) or ( @skip-content = 'false')A skip-content attribute on a <name path=""/> element can only have a value of true or false.



     Pattern           

Region Attributes

     Rule   
region[@fit]
     Assert   
(@fit='hidden' ) or (@fit='fill') or (@fit='meet') or (@fit='scroll') or (@fit='slice')In the element <name path=""/> the attribute fit can only have values hidden, fill, meet, scroll or slice.




Schematron Pretty by Rick Jelliffe. The Schematron by Rick Jelliffe, Academia Sinica Computing Centre.