Opened 12 years ago

Closed 12 years ago

#11 closed enhancement (worksforme)

Web-based XML Schema validation method needs improvement

Reported by: prjemian Owned by: prjemian
Priority: minor Version:
Keywords: XML Schema validation Cc:

Description

The instructions for validation of XML files against the cansas1d/1.0 XML Schema are sufficient but the validation result is not always in agreement with the tools provided in the Eclipse IDE. While setting up the initial site and instructions, it was found that some files which validated in Eclipse did not pass the WWW tool provided by http://www.xmlvalidation.com/. The diagnostics returned by that site pointed to problems that just did not exist.

We need a better validator.

Possibly one of these technologies?

  • SAXON XSLT
  • JAXB

It needs to be a web-server based technology and should obtain the cansas1d.xsd directly from the SVN repository (not provide a general XSD validation service or it may become too popular). Can it be hosted on smallangles.net? Explore first.

Change History (2)

comment:1 Changed 12 years ago by prjemian

SAXON XSLT

From: http://osdir.com/ml/text.xml.saxon.help/2005-07/msg00039.html

To do schema-aware processing, and to get attributes with any type other
than xdt:untypedAtomic, you need Saxon-SA.

You then invoke the transformation as

java com.saxonica.Transform -val source.xml style.xsl

to invoke validation of the source document; its element and attribute nodes
will then have a schema-derived type and tests like attribute(*, xs:string)
will work.

Michael Kay
http://www.saxonica.com/ 

From: http://saxon.sourceforge.net/

Saxon-SA is a commercial product available from Saxonica Limited (http://www.saxonica.com/).

comment:2 Changed 12 years ago by prjemian

  • Resolution set to worksforme
  • Status changed from new to closed

Chuck this whole web validation rubbish and rely on local system (UNIX/linux/cygwin/other) command line tools based on xmllint. Anyone who knows better tools is free to step in. Here is an example:

xmllint --schema cansas1d.xsd bimodal-test1.xml

Also, schema-aware editors (such as oXygen or Eclipse) can validate files.
It might still be nice to provide a web-based validation service.

Note: See TracTickets for help on using tickets.