Re: [xml] XSchema and libxml



On Tue, May 23, 2006 at 10:07:54PM +0200, Buchcik, Kasimier wrote:
Right, with xmllint the XSI information is not processed
automatically; you need to specify explicitely both, the
schema and the instance. Actually this is a long-standing
enhancement request, and I currently could also use such a
mechanism in order to plug in Libxml2's XML Schema facility
into my favourite XML editor.

Daniel, would it be OK to add such an option to xmllint?

Relevant bugzilla-entries:
http://bugzilla.gnome.org/show_bug.cgi?id=157205
http://bugzilla.gnome.org/show_bug.cgi?id=157973

  no problem. The only real question is should this be added as a new
option or override --valid. The problem is that an instance may have both a DTD 
and an XSI schemas information, so maybe keeping both separate may be better.

In addition to that, is there a way to validate a XML
against the corresponding schema(specified in the XML)
automatcially regardless the type of the schema(e.g.
DTD, XSD, RelaxNG or whatever)?

I don't think so. But you can try to write one.

  The question is ambiguous. You can't (but this may be added) specify the
RelaxNG schemas for an instance. There is also schematron, and of course
the big problem that all these may be used simultaneously, for example to
validates different namespaces, for example an XHTML document embedding 
an extra set of informations, you may want to use the XSD for the XHTML
namespace and something else for the extra foreign islands.
  The people behind RelaxNG are working on such a framework, but this is
a work in progress, and I'm not sure this can be driven by informations 
present in the document. After all the whole validation point is about
checking a document for conformance to *something* if you start by trusting
the document information itself, well you don't really gain much in term
of trust, or garantee of purpose for the next processing steps.

Daniel

-- 
Daniel Veillard      | Red Hat http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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