Schema: anyAttribute for several namespaces

A

amirgon

Hi.

I would like to allow any attribute from two distinct namespaces on a
specific element.
However, it seems that anyAttribute can appear only once in a sequence
or a group.

Is there any way to achive this, besides allowing any attribute from
any namespace?

Thanks!

Amir.
 
M

Martin Honnen

I would like to allow any attribute from two distinct namespaces on a
specific element.
However, it seems that anyAttribute can appear only once in a sequence
or a group.

Is there any way to achive this, besides allowing any attribute from
any namespace?

According to
<http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#element-anyAttribute>
the namespace attribute can be a whitespace separated list of URLs so using
<xs:element name="element-name">
<xs:complexType>
...
<xs:anyAttribute namespace="http://example.com/2007/ns1
http://example.com/2007/ns2"/>
</xs:complexType>
</xs:element>
should do
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top