[relaxng-user] WG: choice of equal attributes

Michael.Weber at dlr.de Michael.Weber at dlr.de
Tue Jan 13 12:43:04 ICT 2004

Hi all,

I wonder if there is a solution of the following problem.

Suppose a RELAX NG schema containing a definition for references:

<define name="reference">
  <attribute name="ref">
    <data type="IDREF"/>

Now, I want to change this definition in a derived schema, such
that a reference now refers either to an element within in the
XML document or to an element within an other XML document.  Thus,
I enhance the definition with a further attribute transitivly
referring to the other XML document.  I would like to have the
same attribute name for the reference to the element because
the element is of the same kind as the original one.

<define name="reference">
      <attribute name="instance">
	  <data type="IDREF"/>
      <attribute name="ref">
	  <data type="NCName"/>
    <attribute name="ref">
      <data type="IDREF"/>

But, jing returns an error message:
	error: conflicting ID-types for attribute "ref" of element ...

Is it not possible to define context-sensitive ID-types? 
How can I solve this problem?

Thanks in advance

Kind regards


PS. Sorry that I did not presented code in compact syntax. I am not
    so familiar with this approach. 
Dr. Michael Weber
German Aerospace Center
Rutherfordstr. 2
D-12489 Berlin

Tel.: +49 (0)30 67055-750
Fax:  +49 (0)30 67055-8750
mailto:Michael.Weber at dlr.de

More information about the relaxng-user mailing list