W3C home > Mailing lists > Public > xmlschema-dev@w3.org > November 2000

element declaration

From: Steffen Stundzig <steffen@smb-tec.com>
Date: Fri, 3 Nov 2000 18:11:07 +0100
To: xmlschema-dev@w3.org
Message-Id: <20001103181107.1a94bc47.steffen@smb-tec.com>

I have the following XMLInstance:

<myelement myattr1="value1">2000/11/03</myelement>

How must look a Schemadefinition for this? 
I must ensure that the attribute exists and the contained textnode 
is a SimpleType of type date. 

The problem is, that attribute definitions only occurs in complexType definitions.
But in complexType definitions I can't restrict the type of the text node.

My XMLSchema try:

<schema ....>
  <element name="myelement">
        <any processContents="lax"/>
      <attribute name="myattr1" use="required" type="string"/>

How can I restrict the content of the text node?

Steffen Stundzig                            mailto:steffen@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com
Received on Friday, 3 November 2000 12:11:19 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:49 UTC