I tried this. But this just gives access to all the grammars but does not
say particularly what grammar needs which other grammar. For instance B's
Grammar (assuming every xsd defines a new namespace), I want to find out
that it needs only D's Grammar.
Also I need more information from the schema for instance,
elementFormDefault and attributeFormDefault. I have to generate a DOM and I
need to find how I should output the elements.
It seems SchemaInfo has all the information but it gets out of scope once
traversing the schema is done.

Reworded,it is possible to take the schema structures and reconstruct back
the xsd file. I am trying to do something on these lines. Aka a schema
writer.
Kiran



-----Original Message-----
From: Peter A. Volchek [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 20, 2002 12:19 PM
To: [EMAIL PROTECTED]
Subject: Re: Schema info


Kiran,

Yes, but you should modify internal\XMLScanner.hpp to open access to the
GrammarResolver

    GrammarResolver*  getGrammarResolver() { return fGrammarResolver; }

Then you may use it like this:

    GrammarResolver*  gr = scanner->getGrammarResolver();

    RefHashTableOfEnumerator<Grammar> grammars =gr->getGrammarEnumerator();
    while( grammars.hasMoreElements() )
    {
        Grammar& currGrammar = grammars.nextElement();
        if( currGrammar.getGrammarType() == Grammar::DTDGrammarType )
        {
            //
        }
       else
       {
             //
        }
 }


Regards
Peter

----- Original Message -----
From: "Bagepalli, Kiran" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 20, 2002 10:13 PM
Subject: RE: Schema info


> To add more detail,
>
> Assume A.xsd includes B.xsd and C.xsd and B.xsd imports D.xsd.
> Given B.xsd, I want to say it includes d.xsd.
>
> Kiran
>
> -----Original Message-----
> From: Bagepalli, Kiran [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 20, 2002 12:12 PM
> To: '[EMAIL PROTECTED]'
> Subject: Schema info
>
>
> Is there anyway to find out given a Grammar what other grammars it uses
> directly.
> In a way I want to find the information in SchemaInfo and it is limited to
> the scope
> of TraverseSchema. I want to list all the xsd files used for validation.
>
> Thanks
> Kiran
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

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

Reply via email to