1

I am confused about how to design an xml schema, where attributes of an element must have names from those listed in an attribute of another element.

A valid example:

<A allowedAttributeNames="attrA,attrB">

<B attrA="1" attrB="34">

An invalid example:

<A allowedAttributeNames="attrA,attrB">

<B attrC="72">

In general, is it true that think separator-separated-lists have poor support in xsd?

Thanks in advance!

Mathew Thompson
  • 55,877
  • 15
  • 127
  • 148
Curious
  • 11
  • 1

1 Answers1

0

You can't do this in XSD 1.0.

You can do it in XSD 1.1 using assertions. XSD 1.1 is currently supported in recent releases of Xerces and Saxon.

Michael Kay
  • 156,231
  • 11
  • 92
  • 164