Chris,

The non-schema attributes would be attached to an XSAnnotation component.
Though you would normally need to have an <xs:annotation> in your schema
(underneath the <xs:attribute>, <xs:element>, etc...) you should be able to
coerce Xerces to synthesize annotation components by turning on this [1]
feature.

Thanks.

[1]
http://xerces.apache.org/xerces-c/program-sax2-3.html#GenerateSyntheticAnnotations

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [email protected]
E-mail: [email protected]

Chris Hillery <[email protected]> wrote on 08/27/2010 06:35:17 PM:

> I've spent some time going through the documented APIs and could not find
an
> answer to this question.
>
> The XML Schema Part 1 spec, specifically section 3.2.2, says that an
> <xs:attribute> declaration in an .xsd file may contain "{any attributes
with
> non-schema namespace . . }". Thus, the following is valid:
>
>   <xs:attribute name="attr" type="xs:integer" foo:bar="1"/>
>
> assuming that the <xs:schema> element had xmlns:foo="something". The same
is
> true for <xs:element> declarations.
>
> Xerces does happily load an .xsd file with such a declaration in it.
> However, I cannot find any way to retrieve the information from these
> non-schema attributes from the XSModel. It seems as though they would
have
> to be associated with XSAttributeDeclaration / XSElementDeclaration, but
> there are no APIs for it there or on XSObject.
>
> Is this a hole in the Xerces schema APIs, or am I missing something?
>
> Thanks for any help,
> Ceej
> aka Chris Hillery

Reply via email to