You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Shah Asrani <sh...@gmail.com> on 2008/12/08 16:15:22 UTC

reading xml schema

Hi there,
Is there any way that xerces can be used to read xml schema (the xsd
file) and represent the xsd in some sort of tree in memory?

Best Regrads,

Shah Asrani

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: reading xml schema

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
HiShah,

Xerces' API is read-only. There are no methods provided for construction
(aside from loading from schema documents), mutation or serialization.
Perhaps Eclipse XSD [1] is better suited for your needs.

Thanks.

[1] http://www.eclipse.org/modeling/mdt/?project=xsd#xsd

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

"Shah Asrani" <sh...@gmail.com> wrote on 12/08/2008 12:44:02 PM:

> Hi Michael,
> Thanks for quick response.  I can now use the API to load the schema.
> I have not digged deeper, but is it possible to generate a sub-set of
> schema from the loaded schema.
> For example, I might load a schema that has 10 elements defined, but I
> may only be interested in 2 elements.  The idea is that different user
> may need to get different schema with less elements defined, but
> document generated by them still may be validated against bigger
> schema.  Is there any API call that can be used such that given
> specific element form existing schema, another schema may be generated
> such that generated schema only shows stuff required for specific
> element.
>
> Best Regards,
>
> Shah Asrani.
>
> On Mon, Dec 8, 2008 at 10:25 AM, Michael Glavassevich
> <mr...@ca.ibm.com> wrote:
> > "Shah Asrani" <sh...@gmail.com> wrote on 12/08/2008 10:15:22 AM:
> > Yes. Take a look at the XML Schema API [1].
> >
> >> Best Regrads,
> >>
> >> Shah Asrani
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> >> For additional commands, e-mail: j-users-help@xerces.apache.org
> >
> > [1] http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/
> >
> > Michael Glavassevich
> > XML Parser Development
> > IBM Toronto Lab
> > E-mail: mrglavas@ca.ibm.com
> > E-mail: mrglavas@apache.org
> >
> >
> >> Hi there,
> >> Is there any way that xerces can be used to read xml schema (the xsd
> >> file) and represent the xsd in some sort of tree in memory?
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org

Re: reading xml schema

Posted by Shah Asrani <sh...@gmail.com>.
Hi Michael,
Thanks for quick response.  I can now use the API to load the schema.
I have not digged deeper, but is it possible to generate a sub-set of
schema from the loaded schema.
For example, I might load a schema that has 10 elements defined, but I
may only be interested in 2 elements.  The idea is that different user
may need to get different schema with less elements defined, but
document generated by them still may be validated against bigger
schema.  Is there any API call that can be used such that given
specific element form existing schema, another schema may be generated
such that generated schema only shows stuff required for specific
element.

Best Regards,

Shah Asrani.

On Mon, Dec 8, 2008 at 10:25 AM, Michael Glavassevich
<mr...@ca.ibm.com> wrote:
> "Shah Asrani" <sh...@gmail.com> wrote on 12/08/2008 10:15:22 AM:
> Yes. Take a look at the XML Schema API [1].
>
>> Best Regrads,
>>
>> Shah Asrani
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
>> For additional commands, e-mail: j-users-help@xerces.apache.org
>
> [1] http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/
>
> Michael Glavassevich
> XML Parser Development
> IBM Toronto Lab
> E-mail: mrglavas@ca.ibm.com
> E-mail: mrglavas@apache.org
>
>
>> Hi there,
>> Is there any way that xerces can be used to read xml schema (the xsd
>> file) and represent the xsd in some sort of tree in memory?
>

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: reading xml schema

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
"Shah Asrani" <sh...@gmail.com> wrote on 12/08/2008 10:15:22 AM:

> Hi there,
> Is there any way that xerces can be used to read xml schema (the xsd
> file) and represent the xsd in some sort of tree in memory?

Yes. Take a look at the XML Schema API [1].

> Best Regrads,
>
> Shah Asrani
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org

[1] http://www.w3.org/Submission/2004/SUBM-xmlschema-api-20040309/

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org