W3C home > Mailing lists > Public > xmlschema-dev@w3.org > June 2001

multiple type definitions for elements with the same name

From: Noel Bush <noel@alicebot.org>
Date: Sun, 3 Jun 2001 01:02:20 +0400
To: <xmlschema-dev@w3.org>
Message-ID: <CKEPKBGFJFIAKKEDPPILIECFCGAA.noel@alicebot.org>
Hello; I am trying to create a schema for AIML, a language used by the
Alicebot engine (see http://alicebot.org).  The engine currently supports
the following multiple forms of a "condition" tag:

FORM: multi condition tags:

<category>
<pattern>I AM BLOND</pattern>
<template>You sound very
<condition name="gender" value="female">attractive.</condition>
<condition name="gender" value="male">handsome.</condition>
</template>
</category>

FORM: list-condition tag:

<category>
<pattern>I AM BLOND</pattern>
<template>You sound very
<condition>
<li name="gender" value="female">attractive.</li>
<li name="gender" value="male">handsome.</li>
</condition>
</template>
</category>

FORM: single name list-condition tags

<category>
<pattern>I AM BLOND</pattern>
<template>You sound very
<condition name="gender">
<li value="female">attractive.</li>
<li value="male">handsome.</li>
</condition>
</template>
</category>

FORM: single name list-condition tags with default list-condition

<category>
<pattern>I AM BLOND</pattern>
<template>You sound very
<condition>
<li name="gender" value="female">attractive.</li>
<li>handsome.</li>
</condition>
</template>
</category>

It seems to me, especially after looking at
http://www.w3.org/TR/xmlschema-1/#cos-element-consistent, that this is just
impossible.  No amount of wriggling lets me describe this in XML schema
language.  At some point I have to declare an <xs:element name="li"> in
multiple places, with multiple definitions.


Is there any way to do this?

Thanks in advance for any assistance.

Noel Bush
ALICE AI Foundation
http://alicebot.org
Received on Saturday, 2 June 2001 16:59:44 GMT

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