Subject: Re: [xsl] Using 'validation' in xsl:result-document From: a kusa <akusa8@xxxxxxxxx> Date: Tue, 10 Nov 2009 16:33:11 -0600 |
Thank you. So it is a correct understanding that it the result-document goes after the schema in <xsl:import-schema schema-location="test.xsd"/> to validate the document? On Tue, Nov 10, 2009 at 4:13 PM, Michael Kay <mike@xxxxxxxxxxxx> wrote: >> >> Can anyone tell me what exactly the options (strict, lax, strip, >> preserve) for attribute validation under element >> <xsl:result-document> mean? > > The spec says *exactly* what they mean, but I expect you really want to know > in plain language what they mean. > > strict means the system must find an element declaration in a schema for the > named element at the root of your result document, and must validate the > result document against that declaration, throwing an error if it's found to > be invalid. > > lax means the system should try to find an element declaration matching the > root element name; if it finds one, it must perform validation against this > element and throw an error if it's invalid; if it doesn't find one, then it > doesn't perform validation (except that it keeps looking for schema > declarations that match elements further down the tree). > > preserve means output the result tree with type annotations as they are > (some branches of the tree might have been validated while they were being > constructed, other branches might be untyped). > > strip means remove all type annotations from the result tree. > >> >> When I use validation=strict, I get XTTE1550 error in XML Spy. > > That is most likely to mean that your result tree is invalid against the > schema. It could also mean that the schema is invalid, or that it does not > contain an element declaration for the outermost element of your result > document. > > To debug this, if the error messages aren't helpful, you might find it > useful to output the result document with validation="strip", and then > validate it against the schema "by hand". > > Michael Kay > Saxonica
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Using 'validation' in xsl, Michael Kay | Thread | RE: [xsl] Using 'validation' in xsl, Michael Kay |
RE: [xsl] Using 'validation' in xsl, Michael Kay | Date | RE: [xsl] Using 'validation' in xsl, Michael Kay |
Month |