Subject: Re: [xsl] XSLT 2.0: validate output against a Schematron Schema? RelaxNG schema? Multiple schemas? From: George Cristian Bina <george@xxxxxxxxxxxxx> Date: Tue, 01 Apr 2008 17:02:04 +0300 |
Best Regards, George --------------------------------------------------------------------- George Cristian Bina - http://aboutxml.blogspot.com/ <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com
Hi Folks,
Consider a stylesheet which processes some input, and then outputs this document:
<?xml version="1.0"?> <Document classification="secret"> <Para classification="unclassified"> One if by land, two if by sea; </Para> <Para classification="confidential"> And I on the opposite shore will be, Ready to ride and spread the alarm </Para> <Para classification="unclassified"> Ready to ride and spread the alarm Through every Middlesex, village and farm, </Para> <Para classification="secret"> For the country folk to be up and to arm. </Para> </Document>
I know that XSLT 2.0 has the capability to validate the output, using default-validation="strict" and other means.
I assume the default validation language is W3C XML Schema, correct?
Does the XSLT specification allow for validation using other schema languages, such as Schematron and Relax NG?
For the above output document, I want to do two types of validation:
1. Grammar-based validation - validate that the contents of <Document> is one or more <Para> elements, etc.
2. Co-constraint validation - validate that no Para has a classification higher than the overall Document's classification.
Thus, I would like the output document to be validated by two schemas:
1. W3C XML Schema or Relax NG
2. Schematron
Does the XSLT specification allow for validation against multiple schemas?
If yes, are there any processors that provide this capability?
RECAP
1. Is the W3C XML Schema language the default validation language for XSLT 2.0?
2. Can an XSLT 2.0 stylesheet validate an input or output document using other schema languages, in particular Schematron and Relax NG?
3. Can an XSLT 2.0 stylesheet validate an input or output document against multiple different schema languages?
4. Are there any XSLT 2.0 processors that implement multi-language validation?
/Roger
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] XSLT 2.0: validate output, Michael Kay | Thread | [xsl] xsl:copy- of and namespaces, Garvin Riensche |
RE: [xsl] XSLT 2.0: validate output, Michael Kay | Date | Re: [xsl] Mapping via intermediate , Lech Rzedzicki |
Month |