'Re: "[xml] xmllint: Validating with schemaLocation instead of passing on cmd line"'



Hi,

Frans Englich wrote:
Hello all,

When one wants to validate an XML document against a specific schema, one can 
do:

xmllint --noout --schema schema.xsd document.xml

But how do I make xmllint validate/locate the Schema when it is specified in 
the XML document with 
http://www.w3.org/2001/XMLSchema-instance:schemaLocation?

AFAIK this is not yet accessible via xmllint. We did an initial 
implementation of xsi:schemaLocation/xsi:noNamespaceSchemaLocation not 
long ago, so I guess it just needs some time and priority to make 
through to xmllint. Please report it in bugzilla, so we can schedule it; 
or, if you feel like it, try an implementation. xmlSchemaNewValidCtxt 
needs to be called with NULL as the @schema argument.
XMLSchema-instance:schemaLocation has not been tested much, so we would 
be glad to hear from your experience here.

Regards,

Kasimier




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]