Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > circular definition

Thread Tools

circular definition

Posts: n/a
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>
<Command type="DirectionObjectFaces">
<Param> Hero </Param>

My attempted xml schema is:

<?xml version="1.0" encoding="UTF-16"?>
<xsd:schema xmlnssd="">

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

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

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