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 6228691
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:25:59+00:00 2026-05-24T09:25:59+00:00

I have the following xml which has xsd schema, but is poor and no

  • 0

I have the following xml which has xsd schema, but is poor and no use for serialization.

<rulestruct>
     <rule>
         <type name="vector" />
         <ruleident ruleidentifier="" />
         <pattern type="" />
     </rule>
     <rule>
          <type name="expression" />
          <ruleident ruleidentifier="" />
          <pattern type="" />
     </rule>
     <rule>
          <type name="vector" />
          <ruleident ruleidentifier="" />
          <pattern type="" />
     </rule>
     <rule>
          <type name="statement" />
          <ruleident ruleidentifier="" />
          <pattern type="" />
     </rule>
     <rule>
          <type name="statement" />
          <ruleident ruleidentifier="" />
          <pattern type="" />
     </rule>
</rulestruct>

Each rulestruct can have 1.N rules. Each rule can be repeated. Order must be preseved. Each rule has 1.N elements, some have 9 elements, others have 10, 13. There are 9 different rule types.

I was thinking of using a elements group to represent each rule type but i’m not quite sure how to map it.

  • 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-24T09:25:59+00:00Added an answer on May 24, 2026 at 9:25 am

    If you want to preserve the same name of element (rule) for various rule types, you defined abstract element (attribute abstract="true") and all of its children will have xs:ComplextContent>xs:extension with base attribute equal to your abstract type name.
    In your XML each rule element must have xsi:type attrite to distinguish element concrete type.
    Explanation and example are here.

    If you want/can use different element names for each rule type, you can use substitution groups. You common ancestor is again defined by attribute abstract. The concrete types are defined as xs:element with attribute substitutionGroup equal to name of common ancestor.
    Explanation and example are here.

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

Sidebar

Related Questions

I have the following mapping in my Castle Windsor xml file which has worked
I have an XML file which has following tags. These are the part of
I have a relation which has an XML column storing data in the following
I have a pom.xml, which has following stuff declared Plugins - maven-surefire-plugin, groovy-maven-plugin and
I have an XML which has the following content: <ruletypes> <ruletype>Local</ruletype> <ruletype>Global</ruletype> ... </ruletypes>
I have a xml file which has the following header: <?xml version=1.1 encoding=UTF-8?> .
I have following xml and I want to fetch the value of node which
I have the following thing to achieve in Android(newbie). I have an xml which
I have an xml document which consists of a number of the following: -
I have an XML document which contains nodes like following:- <a class=custom>test</a> <a class=xyz></a>

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.