Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3987300
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:07:02+00:00 2026-05-20T06:07:02+00:00

I have defined the following two types in my XSD-file: <complexType name=primitive> <attribute name=seq_num

  • 0

I have defined the following two types in my XSD-file:

<complexType name="primitive">
  <attribute name="seq_num" type="int"/>
  <element name="prim_to" type="int"/>
</complexType>


<complexType name="configdata">
  <sequence>
    <element name="enable" type="boolean"/>
    <element name="type" default="int"/>
   </sequence>
</complexType>

Both types are used in a number of definitions, i.e. I would rather not change these them. I would like to define a new element set which extends primitive and contains all sub-elements of configdata. The XML-file for this element would look like this (please note, that enable and type are at the same level as prim_to):

<set seq_num="1234">
  <prim_to>22</prim_to>
  <enable>true<enable>
  <type>42</type>
</set>

I could declare set the following way:

<element name="set">
  <complexType>
    <complexContent>
      <extension base="primitive">
        <sequence>
          <element name="config" type="configdata"/>
        </sequence>
      </extension>
    </complexContent>
  </complexType>
</element>

In this case the XML-file would look like this:

<set seq_num="1234">
  <prim_to>22</prim_to>
  <config>
    <enable>true<enable>
    <type>42</type>
  </config>
</set>

My challenge is to define set in such a way that it extends primitive and contains all sub-elements of configdata – but does not contain an element of the type configdata. Basically for the XML-file above it is a question of not having the two ‘config’-tags. Is this possible in XSD? I would highly appreciate any hints.

Thanks in Advance,
Witek

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T06:07:02+00:00Added an answer on May 20, 2026 at 6:07 am

    A type can only extend a single other one (in other words, there is no multiple inheritance). So, your set element can extend configdata (with xsd:extension) and have additional elements, or it can extend another type and you could copy configdata elements to extend it. You can use groups to avoid redundancy.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two entities, defined as following public class Corporation { public int Id{get;set;}
If I have defined the following types: type category = Noun | Verb |
I have the following two tables defined... CREATE TABLE [LogLevel] ( [Id] int primary
In my .htaccess file I have defined following rule, RewriteRule t/([^.]+)/$ /videos/tag.php?tag=$1 [QSA] The
I have defined the following ApplicationManifest file the problem is that i have created
in header file I have defined the following function #ifndef OS_H #define OS_H #include
In my .htaccess file I have defined the following rule to make my register
Suppose I have a file insert.c in which two functions are defined: 1.insert_after 2.insert_before
I have defined following in a ResourceDictionary: <DockPanel x:Key=errorDisplay LastChildFill=False> <Border Background=Red DockPanel.Dock=Top> <TextBlock
I have defined the following Interface [ServiceContract] public interface IHealthProducts { [OperationContract()] ResponseClass OrderSelfSignedHealthCertificate();

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.