[Home] [By Thread] [By Date] [Recent Entries]


Fraser Goffin wrote:

> When you say 'extension elements' do you mean use your own custom 
> elements/attributes where the schemaTron schema provides for 
> extensibility, or are you talking about something else entirely ? 

Schematron allows foreign-namespace elements and attributes everywhere IIRC.

So you while you cannot change the rule semantics, you can certainly add 
extra annotating
capabilities. For example, you could add

<sch:rule  context="date"/>
  <sch:assert  test="string-length(.) &gt; 8">A date should be 
dd/mm/yyyy format</sch:assert>
  <my:mailto to="mcguffin@g..." sj="Someone has used the date 
element!" />
  ...
</sch:rule>

ISO Schematron also has a flag facility, where  named flags can be set 
by assertion failures.
These give a standard way to extract and arbitrary number boolean facts 
about a document wthout adding any output-specific information, or 
requring messages to have a particular format that gets reparsed, etc.

Cheers
Rick Jelliffe

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member