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 Tallak Tveide <TT...@oslo.westerngeco.slb.com> on 2004/12/08 10:07:37 UTC
Storing the Schema in the executable
I have been looking for ways to store the schema definition in the
executable. My way of doing this would be to store the schema file as a
string compiled into the executable, create a schema validator from
memory and then use the SAX2XMLReader.setValidator() method to use that
validator.
Unfortunately, I was unable to instanciate the Schema validator. Is this
possible in Xerces-C? Is there another way of achieving this?
Tallak
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
Re: Storing the Schema in the executable
Posted by Gareth Reakes <ga...@parthenoncomputing.com>.
Hi,
Look at LoadGrammar in DOMBuilder. It can take a DOMInputSource,
a subclass of which can load from memory. That way you could load in
into the cache and use that during parse.
Gareth
Tallak Tveide wrote:
> I have been looking for ways to store the schema definition in the
> executable. My way of doing this would be to store the schema file as
> a string compiled into the executable, create a schema validator from
> memory and then use the SAX2XMLReader.setValidator() method to use
> that validator.
>
> Unfortunately, I was unable to instanciate the Schema validator. Is
> this possible in Xerces-C? Is there another way of achieving this?
>
> Tallak
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>
--
Gareth Reakes, Managing Director Parthenon Computing
+44-1865-811184 http://www.parthcomp.com
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org