Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > circular definition

Reply
Thread Tools

circular definition

 
 
CHAOS
Guest
Posts: n/a
 
      12-24-2004
I am trying to set up a schema that will define a structure to hold
simple lines of code, where lines consist of function calls with
parameters that may or may not be function calls themselves. For
instance, I might encode the line:

Move ( Hero, DirectionObjectFaces ( Hero ) );

something like:

<Command type="Move">
<Param> Hero </Param>
<Param>
<Command type="DirectionObjectFaces">
<Param> Hero </Param>
</Command>
</Param>
</Command>

My attempted xml schema is:

<?xml version="1.0" encoding="UTF-16"?>
<xsd:schema xmlnssd="http://www.w3.org/2001/XMLSchema">


<xsd:complexType name="CommandType">
<xsd:complexContent>
<xsd:restriction base="ParamType"/>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="ParamType">
<xsd:complexContent>
<xsd:extension base="CommandType"/>
</xsd:complexContent>
</xsd:complexType>
</xsd:schema>

However, I get an error when validating the document:
"No circular definitions are allowed"
How can I structure this to avoid circular definitions? And why are
circular definitions illegal in the first place? Thanks in advance.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run-time template list definition / Run-time variable type definition Pierre Yves C++ 2 01-10-2008 02:52 PM
Automagic determination of definition based on definition location. Jon Slaughter C++ 4 10-26-2005 05:00 PM
can a class definition inside another class's definition Jianli Shen C++ 1 03-13-2005 06:02 PM
Semi-circular definitions (plus circular references) Kiuhnm C++ 16 01-03-2005 03:49 AM
help?: incomplete definition with complete definition in scope Ark C Programming 1 08-07-2004 04:21 PM



Advertisments