swirl
Guide to OmniMark 9   OmniMark home
docs home 
IndexConceptsTasksSyntaxLibrariesLegacy LibrariesErrors
 
  Related Topics   Other Library Functions  
function  

relaxng.validated

 
 

Library: RELAX NG (OMRELAXNG)
Import: omrelaxng.xmd
Return type: markup source

Returns: The validated input, with validation errors inserted.


Declaration

export markup source function
   validated                  value markup source input-instance
                      against value schema-type   schema-instance
             case-insensitive value switch        is-case-insensitive optional
    


Purpose

Use validated to validate an SGML or XML document instance against a RELAX NG schema. This function reads the instance from its input-instance argument, validates it, inserts any validation markup errors it finds, and reproduces the modified instance. If you prefer to separate the handling of validation errors from the processing of original markup, use relaxng.validator instead.

Example

This program validates SGML input against a RELAX NG schema, reporting the validation errors together with the original markup errors and parsing the rest of the markup at the same time:

  import "omrelaxng.xmd" prefixed by relaxng.
  
  
  process
     local relaxng.relaxng-schema-type example-schema
  
     set example-schema to relaxng.compile-schema file "example-schema.rng"
  
     do sgml-parse scan file "example-input.sgml"
        do markup-parse relaxng.validated #content against example-schema case-insensitive true
           output "%c"
        done
     done 
  
  
  element #implied
     output "%c"
            

    Related Topics
 
Other Library Functions
 
 

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

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

Copyright © Stilo International plc, 1988-2010.