WG: choice of equal attributes

<[email protected]>
Newsgroups gmane.text.xml.relaxng.general
Message-ID <[email protected]>
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"/>
  </attribute>
</define>

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">
  <choice>
    <group>
      <attribute name="instance">
	  <data type="IDREF"/>
      </attribute>
      <attribute name="ref">
	  <data type="NCName"/>
      </attribute>
    </group>
    <attribute name="ref">
      <data type="IDREF"/>
    </attribute>
  </choice>
</define>

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

Micha

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:[email protected]
http://www.dlr.de/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.