You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Peter A. Volchek" <Pe...@ti.com.od.ua> on 2002/06/26 19:52:53 UTC

Some questions

I have a couple of questions the answer on which i need to know ASAP. (not enough time to research myself)
That is why I'm posting them to forum, hoping that someone already know the answers.

1. Will the resolveEntity() method be called for the following document:
<A>
...
    <myNs:B xmlns:myNs="http://www.myurl.com/sample">
...
    </myNs:B>

</A>

InputSource* KrrXmlParser::resolveEntity (
        const XMLCh* const publicId,
        const XMLCh* const systemId )
{
    // Expect systemId == "http://www.myurl.com/sample" here
}


2. How to validate different instance documents agains a single schema ?
In other words I do not want the parser each time to parse the schema to build the grammar info rather keep it and feed the parser with it, each time I need to.
Just some pseudo code will be enough to catch the idea.

Thank you in advance,
Peter

Re: Some questions

Posted by Khaled Noaman <kn...@ca.ibm.com>.
1. No

2. Set the reuse flag to true on subsequent parses
    parser->parse(xmlFile1);
    parser->parse(xmlFile2, true);

Khaled

"Peter A. Volchek" wrote:

> I have a couple of questions the answer on which i need to know ASAP.
> (not enough time to research myself)That is why I'm posting them to
> forum, hoping that someone already know the answers. 1. Will the
> resolveEntity() method be called for the following document:<A>...
> <myNs:B xmlns:myNs="http://www.myurl.com/sample">...
> </myNs:B> </A> InputSource* KrrXmlParser::resolveEntity (
>         const XMLCh* const publicId,
>         const XMLCh* const systemId )
> {    // Expect systemId == "http://www.myurl.com/sample" here
> }  2. How to validate different instance documents agains a single
> schema ?In other words I do not want the parser each time to parse the
> schema to build the grammar info rather keep it and feed the parser
> with it, each time I need to.Just some pseudo code will be enough to
> catch the idea. Thank you in advance,Peter