Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Inheritance Problem from a simple base type to a structured complicated type

Reply
Thread Tools

Inheritance Problem from a simple base type to a structured complicated type

 
 
mflll@wiu.edu
Guest
Posts: n/a
 
      07-27-2006
I want to derive or substitute an Item element containing just
text by another element with regular contents.

The context is that I have a contract which has Block's that represent
clause's.
Each Blcok has one or more
units called Items. Consider these as paragraphs or sentences within
the clause. This works fine. The Item contains simple
text and has no child elements.

I want to define a substitution or extension type that allows an Item
to be replaced by other specified elements, e. g. a specified
Payment clause or DeliverGood's clause. Unlike the Item element,
these do not allow text and they do have child elements.

Whenever I try this, I get an error that one cannot define a
PaymentClause
with complexContent with a base which is a simpleType.

I also have had problems when I tried declaring the Item as mixed
content
and the PaymentClause as fixed.

I also tried defining ItemType as
<xsd:complexContent mixed="true"></xsd:complexContent>

but I get an error message telling me that complexContent must have
elements.

Is there anyway in XML Schema to declare some kind of
inheritance or substitution from a text-only clause in the base to a
structured-type element in a derived schema.

Laurence L. Leff, Ph.D. Associate Professor of Computer Science
Western Illinois University, 1 University Circle, Macomb IL 61455
Fax 309 298 2302 Pager 309 367 0787

 
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
base class public type (non template and template base class) Hicham Mouline C++ 1 04-20-2009 03:28 PM
fast method accessing large, simple structured data agc Python 6 02-03-2008 05:41 PM
Simple example of error handling using base class inheritance? Doug ASP .Net 1 07-03-2006 09:07 PM
mul. inheritance & overloading operator new/delete solved by virtual base inheritance? cppsks C++ 0 10-27-2004 07:49 PM
searching a structured text data base Michael Friendly Perl Misc 2 04-15-2004 09:11 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57