Hi Ori,
At 16.13 16/08/2006 +0200, Ori Doolman wrote:
Alberto,
Thank you for your answer.
Still, I have some questions regarding your suggestion:
1. How do you suggest to parse the grammar given in the xsd:schema
element within the wsdl document?
You don't have many options; you will have to serialize the DOM node
to a string and parse it with the special DOMBuilder (the one created
with your XMLGrammarPool object)
2. Should I still use the loadGrammar API of DOMBuilder?
Yes
3. In your 1st solution, how do I get the grammar instance for calling
grammar->getElemDecl(...
You can still use DOMBuilder::getGrammar
Alberto
-----Original Message-----
From: Alberto Massari [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 16, 2006 10:16 AM
To: [email protected]
Subject: Re: Parsing Schema Grammar - waiting for an answer
Hi Ori,
At 09.40 16/08/2006 +0200, Ori Doolman wrote:
>Hello,
>
>Since the grammar section is not documented and I couldn't find my
>answer elsewhere, I asked a question a few days ago (see my previous
>email to this list), but still didn't get any answer.
>
>I'll appreciate your help.
Your approach may work; you could avoid the enumeration of the
elements in the grammar by:
- creating an instance of XMLGrammarPoolImpl
- instanciating the DOMBuilder using
createDOMBuilder(MODE_SYNCHRONOUS, NULL,
XMLPlatformUtils::fgMemoryManager, grammarPool)
- using
grammar->getElemDecl(grammarPool->getURIStringPool()->getId("parlayx_cal
l_notification_local_xsd"),
"handleBusy", NULL, Grammar::TOP_LEVEL_SCOPE)
Another option is building an XSModel using grammarPool->getXSModel().
Then, use XSModel::getElementDeclaration("handleBusy",
"parlayx_call_notification_local_xsd") and examine the element
definition.
This because the informations stored in the SchemaGrammar object are
optimized to validate the data, while the XSModel data structure
tries to keep all the informations in the schema (including
annotations).
Hope this helps,
Alberto