W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2001

redefinition errors

From: <MarkH@i2.co.uk>
Date: Mon, 8 Jan 2001 17:43:10 -0000
Message-ID: <1E73B637CFC3D411A12F00B0D0795DDD09148C@uknts40exh01.i2.co.uk>
To: xmlschema-dev@w3.org
I have an element <representation> with attribute "format" and want to force
inclusion of <representaion format='VLVF'> followed by zero or more further
<represenation> elements. To do this I defined a general
"anyRepresenationType" and use it to define a restricted
"vlvfRepresentationType" which has "format" with use='fixed' and
value='VLVF'.

Problem: XML Spy says its fine, but XSV warns about the redef when
validating the schema, and errors about it when validating the instance. (At
the second element def it complains "Error: illegal redeclaration of
{None}:representation").

The errors appear at this point...
 <complexType>
  <sequence>
   <element name='vlvfRepresentationType'/>
   <element name='anyRepresentationType' minOccurs='0'/>
  </sequence>
 <complexType>

Question:
1) Is XSV correct and XML Spy in error?
2) Assuming XSV is right, what is the best way to achieve this?...
    - Using an anonymous type for the first element? 
    - Is there a way to use elements of the same name but with different
types? 
    - Any other options?

Thanks

Mark
--
Mark Hughes
  Agile HTML Editor
    http://www.agilic.com

p.s. Henry - thanks for the earlier pointer/help re import/include
Received on Monday, 8 January 2001 12:50:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:19 GMT