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):
  <A src="http://foo/index.html"/>

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

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.



GMX - Die Kommunikationsplattform im Internet.
Received on Tuesday, 15 January 2002 11:03:49 UTC

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