swirl
Guide to OmniMark 9   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
Functions     Related topics
 

RELAX NG (OMRELAXNG)

 
 

RELAX NG is a schema language for XML, an alternative to using DTDs. It is designed to be simple and easy to learn, and has both an XML syntax and a non-XML syntax. It supports datatyping and XML namespaces, and it integrates attributes into content models.

RELAX NG is specified by ISO/IEC 19757-2:2003.

Use the OMRELAXNG library when you want to validate input against a RELAX NG schema.

This program validates input against a RELAX NG schema, reports validation errors and keeps going:

     import "omrelaxng.xmd" prefixed by relaxng.
  
  
     define markup sink function
        report-errors (value string sink s)
     as
        using output as s
        do markup-parse #current-input
           output "%c"
        done
  
  
     process
        local relaxng.relaxng-schema-type example-schema
  
        set example-schema to relaxng.compile-schema file "example-schema.rng"
  
        do xml-parse scan file "example-input.xml"
           using output as relaxng.validator against example-schema report-errors-to report-errors (#error)
              output #content
        done 
          

Functions
  Related topics
 

Top [ INDEX ] [ CONCEPTS ] [ TASKS ] [ SYNTAX ] [ LIBRARIES ] [ LEGACY LIBRARIES ] [ ERRORS ]

OmniMark 9.1.0 Documentation Generated: September 2, 2010 at 1:54:44 pm
If you have any comments about this section of the documentation, please use this form.

Copyright © Stilo International plc, 1988-2010.