Image:Validate-lmnl.xsl

From LMNLWiki

Validate-lmnl.xsl (44KB, MIME type: application/xml)

Warning: This file may contain malicious code, by executing it your system may be compromised.

The validate-lmnl.xsl XSLT 2.0 stylesheet validates a LMNL document against a Creole schema.

You can use this stylesheet to test whether a LMNL document is valid against a Creole schema by running it in several ways:

with a Creole schema as the source document
supply a LMNL document by specifying either the $lmnl-doc parameter (a URI) or the $lmnl parameter (a string)
with a XML document containing a LMNL document as the source document
supply a schema by specifying the $schema-doc parameter (a URI); the string value of the source document is used as the LMNL string, which means any XML elements inside will be ignored
with only parameters 
use a dummy source document, or invoke the validate-lmnl template, and supply either the $lmnl-doc or $lmnl parameters, and the $schema-doc parameter

Currently, it will only tell you whether or not the document is valid against the schema. Warning messages may help you understand where the problem lies, but they're not very helpful at the moment.

To use from your own code, use the pat:validate-lmnl() function; the first argument is a LMNL document as a string and the second the document node of a Creole schema document.

File history

Legend: (cur) = this is the current file, (del) = delete this old version, (rev) = revert to this old version.
Click on date to see the file uploaded on that date.


The following pages link to this file: