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

Discussion in 'XML' started by mflll@wiu.edu, Jul 27, 2006.

  1. Guest

    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
     
    , Jul 27, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Marius Vollmer
    Replies:
    6
    Views:
    844
    Jim Lewis
    Dec 10, 2003
  2. cppsks
    Replies:
    0
    Views:
    853
    cppsks
    Oct 27, 2004
  3. Doug
    Replies:
    1
    Views:
    398
  4. agc
    Replies:
    6
    Views:
    393
    Stefan Behnel
    Feb 3, 2008
  5. Michael Friendly

    searching a structured text data base

    Michael Friendly, Apr 9, 2004, in forum: Perl Misc
    Replies:
    2
    Views:
    114
Loading...

Share This Page