"Michael Kay" <mike@saxonica.com> wrote on 09/17/2008 05:06:06 AM:
> > I was able to run Xerces from ValidatorBuddy but I'd like to
> > be able run it on its own. I tried
> >
> > stdinparse -v=always -s < file.xml
> >
> > but it didn't recognize the schema, even though I specified
> > it using xsi:noNamespaceSchemaLocation.
>
> If you read a document from the standard input, then the processor won't
> know its base URI, which means it won't be able to resolve any relative URI
> contained in the document, for example one found in an
> xsi:noNamespaceSchemaLocation attribute.
>
> But I don't know the spec of stdinparse.
It's one of the Xerces-C samples, documented here [1]. And you're right, Xerces won't know what the base URI of the document is.
Most of the other Xerces-C samples take a URI as input, such as SAXCount [2].
Thanks.
[1] http://xerces.apache.org/xerces-c/stdinparse.html
[2] http://xerces.apache.org/xerces-c/saxcount.html
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org