On Dec 10, 2003, at 6:54 AM, Neil Graham wrote:

Hi Han,

Unlike in Java, Xerces-C's parsers already have a method to preload a
grammar (loadGrammar()). Largely for this reason, we didn't think it was
necessary to come up with a new interface a la Xerces-J's XMLGrammarLoader.

I noticed that as I went about exploring more. At least I'm on the right track :-)


So what you probably want to do is call loadGrammar() on your favourite
Xerces parser object, get the GrammarPool that this parser will reference
(it will create one if you didn't provide one) and then call getXSModel()
on that grammar pool.

Good stuff/hints here. But from looking at the source codes, it seems like there is no public API to get to the GrammarPool.
And XercesDOMParser/SAXParser have a protected fGrammarPool member but I can't get to it without subclassing them.
What am I missing?


Would a sample showing this be helpful? Clearly. So would some
documentation... I'd also like to deprecate the SEnumVal and EnumVal
samples eventually; we certainly shouldn't be going out of our way to show
people how to use Xerces's internal interfaces!

I'll see what I can do. If I do submit an example using PSVI APIs, it will be a Mac OS X project (Xcode).
It should be trivial to port over to other project platforms though.


Thanks again, Han Ming


Hopefully someone some day will get a chance to bring all this about!


Cheers,
Neil
Neil Graham
XML Parser Development
IBM Toronto Lab
Phone:  905-413-3519, T/L 969-3519
E-mail:  [EMAIL PROTECTED]





Han Ming Ong
<[EMAIL PROTECTED]> To: [EMAIL PROTECTED]
cc:
12/09/2003 03:40 Subject: Re: Getting at PSVI
PM
Please respond to
xerces-c-dev






Neil,

             I just started playing with the PSVI support in 2.4.0. It
sounds
really good. Thanks for exposing it as public.

Is there a good example of a Schema loader in the C++ side,
starting
with an XSD file (instead of the example that starts with an XML
instance file in SEnumVal)? I guess I'm looking for an equivalence of
XMLGrammarParser or XSLoader on the Java side.


I looked at the headers in framework/psvi but couldn't seem to
find a
good starting point.


Thanks

Hi Tim,

As of Xerces-C 2.4.0, that's entirely wrong.  If the docs still say
that,
apparently we have a bug to fix there.

Xerces-C now provides an API for inspecting the PSVI that looks much
like
Xerces-J's.  It's not quite as well integrated into the DOM or SAX
landscape as Xerces-J's is, but should provide the functionality an
application needs.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to