W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2003

Same Element with different attributes?

From: <kim.weit@swipnet.se>
Date: Wed, 12 Feb 2003 15:12:17 +0100
To: xmlschema-dev@w3.org
Message-Id: <20030212141217.LGCQ29569.fep03-svc.swip.net@mta-int.swip.net>

I am thinking about using XML Schema instead of a
DTD.  I have a simple elementary question about
the structure of a XML Schema. 

Is it possible to attach different required attributes
to the same element depending on where this
element is cituated in the structure?

For example, could the element title have different required attributes if it is a child to the element book or to chapter like in this example: 

<book>
<title language="eng">Robinson Crusoe</title>
<chapter>
<title number="1">The Life And Adventures Of Robinson Crusoe </title>
</chapter
</book>

I really hope someone could help me with this question. Thanks in advance!

Mr Kim Weit
Swipnet.se
Sweden

-------------------------------------------------
WebMail från Tele2 http://www.tele2.se
-------------------------------------------------
Received on Wednesday, 12 February 2003 09:12:58 GMT

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