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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:35:43+00:00 2026-06-06T23:35:43+00:00

How can I remove the below warning in the xsd. mymain.xsd refers to mysecond.xsd

  • 0

How can I remove the below warning in the xsd. mymain.xsd refers to mysecond.xsd

my main.xsd

<?xml version="1.0" encoding="UTF-8"?><xsd:schema elementFormDefault="qualified" targetNamespace="http://abc.com" version="2.0" xmlns:tyu="http://abc.com" xmlns:my="def.com"  xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:import namespace="def.com" schemaLocation="mysecond.xsd"/>
  <xsd:complexType name="myType">
    <xsd:complexContent>
     <xsd:restriction base="my:myType">
      <xsd:sequence>
        <xsd:element minOccurs="0" name="rty" type="tyu:myagainType"/>
      </xsd:sequence>
    </xsd:restriction>
   </xsd:complexContent>
  </xsd:complexType>
  <xsd:complexType name="myagainType">
    <xsd:complexContent>
     <xsd:restriction base="my:myagainType">
      <xsd:sequence>
        <xsd:element minOccurs="1" name="uid">
        <xsd:simpleType>
           <xsd:restriction base="xsd:string">
          <xsd:maxLength value="1"/>
           </xsd:restriction>
        </xsd:simpleType>
        </xsd:element>
      </xsd:sequence>
    </xsd:restriction>
   </xsd:complexContent>
  </xsd:complexType>  
</xsd:schema>

mysecond.xsd

<?xml version="1.0" encoding="UTF-8"?><xsd:schema elementFormDefault="qualified" targetNamespace="def.com" version="2.0" xmlns:my="def.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <xsd:complexType name="myagainType">
    <xsd:sequence>
      <xsd:element minOccurs="0" name="klo" type="xsd:string"/>
    </xsd:sequence>
  </xsd:complexType>
  <xsd:complexType name="myType">
    <xsd:sequence>
      <xsd:element minOccurs="0" name="rty" type="my:myagainType"/>
    </xsd:sequence>
  </xsd:complexType>
</xsd:schema>

warning

Warning 1   Invalid particle derivation by restriction - 'Derived element 'http://abc.com:rty' is not a valid restriction of base element 'def.com:rty' according to Elt:Elt -- NameAndTypeOK.'.    D:\files\mymain.xsd 3   4
  • 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-06-06T23:35:44+00:00Added an answer on June 6, 2026 at 11:35 pm

    Short answer, you cannot. To begin with, your rty in mySecond.xsd is locally defined and qualified and in a different namespace than the “equivalent” rty in the main.xsd, the latter also locally defined and qualified in a different namespace.

    If you go through the XML Schema spec, part 2, you’ll get an explanation for each rule that applies to a valid restriction. In your case, you either use the same named element (start by “unqualifying” the rty element), or a member of a substitution group.

    You obviously don’t want the same element, since it’ll give you the same content model – you have one element only. One reason people use restriction is to reduce the content model (remove elements from the list) and/or fiddle with min/maxOccurs for particles.

    You can’t do things using substitution groups since you defined rty locally; the head of a substitution group must be defined globally.

    To allow for what you want, you have to completely rewrite your XSD. A better description around what exactly you’re trying to achieve along with any constraints you place on XSD authoring (e.g. use of substitution groups, or redefine, or the context in which your XSDs will be used) may help others provide you with better answers.

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

Sidebar

Related Questions

By remove the below intent-filter in AndroidManifest.xml, it can remove the icon after install.
i have a string like below $string = ' florida' how can i remove
According to the post here , the code below can remove the HTML tag,
Summary Attempting to read and serialize XML documents that have a UTF-16 encoding and
I have a very sample web.xml written below: The problem is...If I remove org.springframework.web.servlet.DispatcherServlet
Is there a regex pattern that can remove .zip.ytu from the string below? werfds_tyer.abc.zip.ytu_20111223170226_20111222.20111222
I am implementing sdcard related application. How can I remove emulator sdcard below folder
I have a table like below and its rows can be added and removed
we can remove formula from one cell by cell.setCellFormula(null) . but if i want
One can remove all calls to printf() using #define printf . What if I

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.