W3C home > Mailing lists > Public > xmlschema-dev@w3.org > April 2002

attribute declaration

From: Joe Hallett <jhallett@mail.colgate.edu>
Date: Mon, 15 Apr 2002 23:54:02 -0400
Message-ID: <001a01c1e4fa$5d20c470$6401a8c0@jhallett>
To: <xmlschema-dev@w3.org>
This is a very basic question and I am sorry to bother most of you, but if someone would straighten me out I would greatly appreciate it.

I am having trouble declaring an attribute in my schema.

the element and element's type look as follows:

<element name="Rules" type="rul:RulesType"/>

 <complexType name="RulesType">
  <sequence>
   <element name="Rule" type="rul:RuleType" maxOccurs="unbounded"/>
  </sequence>
  <!-- a variable name that will be returned at the termination of the rules engine -->
  <attribute name="Return" type="string" use="required"/>
 </complexType>

I am running Xerces 1.4.4 as a parser and it is giving me the following error:

[**] org.xml.sax.SAXParseException: Attribute "Return" is required and must be specified for element type "Rules".
at 4:24 of null - file:/C:/Program Files/Apache Tomcat 4.0/webapps/xmlp/xs/RulesInstance.xml

I appreciate the help!!

Joe
Received on Monday, 15 April 2002 23:49:24 GMT

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