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 Stanimir Stamenkov <s7...@netscape.net> on 2007/12/07 07:34:08 UTC

Re: XSAttributeGroupDefinition

Thu, 6 Dec 2007 10:38:59 -0800, /Srdjan Djuricic/:

> My issue is when parsing a 
> XSAttributeGroupDefinition and encountering a XSAttributeUse I don't 
> know how to identify whether that attributeUse is obtained from another 
> attributeGroup or not.

As far as I can tell you can't determine what you want using the 
Xerces XSModel API, but I don't think it is designed to parse an XML 
Schema in such detail.  It implements the abstract model defined in 
the XML Schema Structures specification and is primarily intended 
for use of validation, i.e. it is read-only and light-weight.  I 
think you need another API like the Eclipse XSD model [1] to analyze 
(and possibly modify) the source XML Schema document(s) in greater 
detail.

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

-- 
Stanimir

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


RE: XSAttributeGroupDefinition

Posted by Srdjan Djuricic <sd...@galdosinc.com>.
Thank you Michael. 


 Be there when the Web and GIS unite! Register now for GeoWeb 2007 at
www.geoweb.org 
-----Original Message-----
From: Michael Glavassevich [mailto:mrglavas@ca.ibm.com] 
Sent: Friday, December 07, 2007 8:17 AM
To: j-users@xerces.apache.org
Subject: Re: XSAttributeGroupDefinition

Stanimir Stamenkov <s7...@netscape.net> wrote on 12/07/2007 01:34:08
AM:

> Thu, 6 Dec 2007 10:38:59 -0800, /Srdjan Djuricic/:
>
> > My issue is when parsing a
> > XSAttributeGroupDefinition and encountering a XSAttributeUse I don't

> > know how to identify whether that attributeUse is obtained from 
> > another

> > attributeGroup or not.
>
> As far as I can tell you can't determine what you want using the 
> Xerces XSModel API, but I don't think it is designed to parse an XML 
> Schema in such detail.  It implements the abstract model defined in 
> the XML Schema Structures specification and is primarily intended for 
> use of validation, i.e. it is read-only and light-weight.

Right, there's no representation of a reference to an attribute group
definition in the model. The {attribute uses} contained in them get
absorbed into the complex type definition's {attribute uses}. The spec
describes how that's computed here:
http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#declare-type. See
the definition of {attribute uses) in the sections titled "Complex Type
Definition ... Schema Component".

> I think you need another API like the Eclipse XSD model [1] to analyze

> (and possibly modify) the source XML Schema document(s) in greater 
> detail.
>
> [1] http://www.eclipse.org/modeling/mdt/?project=xsd
>
> --
> Stanimir
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org

Thanks.

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


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


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


RE: XSAttributeGroupDefinition

Posted by Srdjan Djuricic <sd...@galdosinc.com>.
Thank you Stanimir,

I will check out the API that you recommended. 


 Be there when the Web and GIS unite! Register now for GeoWeb 2007 at
www.geoweb.org 
-----Original Message-----
From: Stanimir Stamenkov [mailto:s7an10@netscape.net] 
Sent: Thursday, December 06, 2007 10:34 PM
To: j-users@xerces.apache.org
Subject: Re: XSAttributeGroupDefinition

Thu, 6 Dec 2007 10:38:59 -0800, /Srdjan Djuricic/:

> My issue is when parsing a
> XSAttributeGroupDefinition and encountering a XSAttributeUse I don't 
> know how to identify whether that attributeUse is obtained from 
> another attributeGroup or not.

As far as I can tell you can't determine what you want using the Xerces
XSModel API, but I don't think it is designed to parse an XML Schema in
such detail.  It implements the abstract model defined in the XML Schema
Structures specification and is primarily intended for use of
validation, i.e. it is read-only and light-weight.  I think you need
another API like the Eclipse XSD model [1] to analyze (and possibly
modify) the source XML Schema document(s) in greater detail.

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

--
Stanimir

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


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


Re: XSAttributeGroupDefinition

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Stanimir Stamenkov <s7...@netscape.net> wrote on 12/07/2007 01:34:08 AM:

> Thu, 6 Dec 2007 10:38:59 -0800, /Srdjan Djuricic/:
>
> > My issue is when parsing a
> > XSAttributeGroupDefinition and encountering a XSAttributeUse I don't
> > know how to identify whether that attributeUse is obtained from another

> > attributeGroup or not.
>
> As far as I can tell you can't determine what you want using the
> Xerces XSModel API, but I don't think it is designed to parse an XML
> Schema in such detail.  It implements the abstract model defined in
> the XML Schema Structures specification and is primarily intended
> for use of validation, i.e. it is read-only and light-weight.

Right, there's no representation of a reference to an attribute group
definition in the model. The {attribute uses} contained in them get
absorbed into the complex type definition's {attribute uses}. The spec
describes how that's computed here:
http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/#declare-type. See the
definition of {attribute uses) in the sections titled "Complex Type
Definition ... Schema Component".

> I think you need another API like the Eclipse XSD model [1] to analyze
> (and possibly modify) the source XML Schema document(s) in greater
> detail.
>
> [1] http://www.eclipse.org/modeling/mdt/?project=xsd
>
> --
> Stanimir
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org

Thanks.

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


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