Frans Englich wrote:
On Wednesday 03 November 2004 09:48, you wrote:
Frans Englich wrote:
But how do I make xmllint validate/locate the Schema when it is specified
in the XML document with

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.

Ok, that was /dev/random for me. I will gladly test code that is available, 
and report bugs. I will use xmllint; I should run CVS HEAD, grep for 
xmlSchemaNewValidCtxt and blank the schema argument(field in struct)? That's 
it? With parameter --valid? (that sure must sound amusing if I'm wrong :)

"--valid" seems to be reserved for DTD validation.
A sketched modification of xmllint.c - if you just need a quick local

1. New functionallity, new variable:
    static int wxsivalid = 0;
2. Process a new command line argument:
    } else if ((!strcmp(argv[i], "-wxsivalid")) ||
        (!strcmp(argv[i], "--wxsivalid"))) {
3. Modify the schema validation handler to validate even
    if no schema was created:
    } else if ((wxschemas != NULL) || (wxsivalid)) {



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