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>
Hi,

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">
    <complexType>
      <sequence>
        <any processContents="lax"/>
      <sequence>
      <attribute name="myattr1" use="required" type="string"/>
    </complexType>
  </element>
</schema>

How can I restrict the content of the text node?

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

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