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

  • SEARCH
  • Home
  • 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 8296575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:04:50+00:00 2026-06-08T15:04:50+00:00

I have been tasked to replace the xsd for a particular solution. However, I

  • 0

I have been tasked to replace the xsd for a particular solution. However, I keep getting an “element is not supported in this context.”

Here is the original xsd:

    public const string Xsd = @"
<xs:schema attributeFormDefault='unqualified' elementFormDefault='qualified'     xmlns:xs='http://www.w3.org/2001/XMLSchema'>
  <xs:element name='DataRow'>
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs='unbounded' name='Data'>              
          <xs:complexType>
            <xs:attribute name='Site' type='xs:string' use='required' />
            <xs:attribute name='Month_Num' type='xs:unsignedShort' use='required' />
            <xs:attribute name='Numerator' type='xs:unsignedByte' use='required' />
            <xs:attribute name='Data_Indicator' type='xs:string' use='required' />
            <xs:attribute name='Budgeted' type='xs:unsignedByte' use='required' />
            <xs:attribute name='Executive_Comments' type='xs:string' use='required' />
            <xs:attribute name='Fleet_Executive_Comments' type='xs:string' use='required' />
         </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>";

Here is what I am supposed to be replacing it with:

<xs:schema attributeFormDefault='unqualified' elementFormDefault='qualified' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
  <MonthlyValues>
    <MonthlyValue IndicatorName='name' LocationName='name' GroupingName='name' Year='MonthNum.Value.Year' Month='MonthNum.Value.Month' Numerator='Numerator' Budget='Budget'>
    </MonthlyValue>
 </MonthlyValues>
</xs:schema>

The schema was made by someone else and I was supposed to just be able to replace it. Unfortunately its not working out that way and I know very little about it.

should I change

 <MonthlyValues> 

to

<xs:element name='MonthlyValues> and keep the 
<xs:sequence>
   <xs:element maxOccurs='unbounded' name='MonthlyValues'>
      <xs:complexType>

and add the

<MonthlyValue IndicatorName='name' LocationName='name' GroupingName='name' Year='MonthNum.Value.Year' Month='MonthNum.Value.Month' Numerator='Numerator' Budget='Budget'>
</MonthlyValue>

afterward? Actually, I tried that and it didn’t work, but is there something similar I have to do?

  • 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-08T15:04:51+00:00Added an answer on June 8, 2026 at 3:04 pm

    XSD is something else… you do seem to be new to XSD so maybe the quickest way to get you started is to generate an XSD from your sample XML. Tweak the generated to match the XMLs. Use the XSD below as a starting point.

    <?xml version="1.0" encoding="utf-8"?>
    <!--XML Schema generated by QTAssistant/XML Schema Refactoring (XSR) Module (http://www.paschidev.com)-->
    <xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:element name="MonthlyValues">
        <xsd:complexType>
          <xsd:sequence>
            <xsd:element name="MonthlyValue">
              <xsd:complexType>
                <xsd:simpleContent>
                  <xsd:extension base="xsd:string">
                    <xsd:attribute name="IndicatorName" type="xsd:string" use="required" />
                    <xsd:attribute name="LocationName" type="xsd:string" use="required" />
                    <xsd:attribute name="GroupingName" type="xsd:string" use="required" />
                    <xsd:attribute name="Year" type="xsd:string" use="required" />
                    <xsd:attribute name="Month" type="xsd:string" use="required" />
                    <xsd:attribute name="Numerator" type="xsd:string" use="required" />
                    <xsd:attribute name="Budget" type="xsd:string" use="required" />
                  </xsd:extension>
                </xsd:simpleContent>
              </xsd:complexType>
            </xsd:element>
          </xsd:sequence>
        </xsd:complexType>
      </xsd:element>
    </xsd:schema>
    

    You should rely on an editor to help you through the learning… Eclipse, Netbeans, etc. come with decent editors, and free.

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

Sidebar

Related Questions

I have been tasked with coming up with a solution where I am not
I have been tasked to replace the hardware an existing Apache/Tomcat/MySQL application is running.
I have been tasked with maintaining a legacy unmanaged c++ system. I do not
I have been tasked with developing a solution that tracks changes to a database.
So I have this Access Database Project file that I have been tasked to
I have been tasked with converting some scripts referencing an Informix database to be
I have been tasked with porting a large Java codebase to the Android platform.
I have been tasked with refactoring some components that used xmlbeans to now make
I have been tasked to develop an interactive website using java & mysql: using
I have been tasked to create a form designer application in Windows Forms. The

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.