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

How to describe it with XML Schema ?

From: <oliver.schramm@gmx.de>
Date: Tue, 15 Jan 2002 08:42:22 -0500 (EST)
To: xmlschema-dev@w3.org
Message-ID: <25646.1011102094@www25.gmx.net>
Hey everybody,

I'm quite a newbie in the area of XML Schema, so it might be
that you can help me.

I have the following two document instance:

document instance 1 (di1):
<foo>
  <A src="http://foo/index.html"/>
</foo>

document instance 2 (di2):
<foo>
  <A>
    <html><head></head><body><h1>this is an example</h1></body></html>
  </A>
</foo>

The interesting thing is that the element 'A'
has EITHER an attribute 'src' or 'any' elements as
its children.

The idea behind is that the element 'A' can EITHER have 
a reference to a document fragment OR the document
fragement is part of the document instance (inline).

[For my understanding]
I can do that with the usage of 'derived types'. But
I do not want to introduce the 'xsi:type' attribute.

Currently I'm not sure if that is possible at all with
XML Schema. It might be that someone has an idea.

regards

Oliver

-- 
GMX - Die Kommunikationsplattform im Internet.
http://www.gmx.net
Received on Tuesday, 15 January 2002 11:03:49 GMT

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