Menu

xmlschema validation

Help
2007-01-08
2012-12-07
  • Nobody/Anonymous

    I'm trying to validate my xsd document.  Am I correct in assuming that the [Ctrl-8] validation is a go/no-go test?  I find that if there are any errors in the document, I get an error on the first line after the <schema> element similar to the following:

    "Error at line 3: Element schema has extra content: annotation"

    This message occurs even when the actual validation error is contained, say, in a complex type definition many lines further down in the document.  I'm using version 1.0.8.7 for Windows.

     
    • gnschmidt

      gnschmidt - 2007-01-08

      Yes, the validator seems to return a line number pointing to the root element definition.

      I wasn't aware of this limitation, which is a problem of the RELAX NG grammar for XML Schemas invoked by the Ctrl+8 shortcut. The best solution will be to associate schemas with the W3C schema for schemas instead.

      I will try the one at

      http://www.w3.org/TR/2001/REC-xmlschema-1-20010502/#normative-schemaSchema

      and adjust the template if it works well. Thanks for alerting me to this!

       
    • Nobody/Anonymous

      Thanks for looking into it!  Here's a link to the Schema schema file by itself:

      http://www.w3.org/2001/XMLSchema.xsd

       

Log in to post a comment.