![]() |
|
||||
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|||||
|
|
||||||
| Related Topics | Other Library Functions | |||||
| function |
relaxng.compile-schema |
|
Library: RELAX NG (OMRELAXNG)
Import: omrelaxng.xmd |
Return type: opaque Returns: compiled RELAX NG schema |
export relaxng-schema-type function
compile-schema value string source schema-input
Use compile-schema to compile a RELAX NG schema specified in XML format,
so that you may validate XML input against it. Compiling the schema also serves to validate the schema itself.
If the schema is invalid and cannot be compiled, compile-schema throws the compile-error exception.
In this example we compile the schema "my-schema" and validate XML input against it, reporting any errors
along the way:
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 xml-parse scan file "example-input.xml"
do markup-parse relaxng.validated #content against example-schema
output "%c"
done
done
element #implied
output "%c"
|
Related Topics |
Other Library Functions
|
Copyright © Stilo International plc, 1988-2010.