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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:06:16+00:00 2026-06-08T14:06:16+00:00

I am working on a XSD validation code and I am trying to figure

  • 0

I am working on a XSD validation code and I am trying to figure out how to validate a XML file that has

<root>
    <elementA attribute1=ID>
    ...
    </elementA>
    <elementA attribute2=ID>
    ...
    </elementA>
</root>

and I want to make the XSD where it validates the same element based off the attribute name and makes some of the child element optional for attribute1 while required for attribute2.

Note that “…” is the same elements with some fields being optional for attribute1.

  • 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-08T14:06:18+00:00Added an answer on June 8, 2026 at 2:06 pm

    In XSD 1.0 the type of an element can depend only on the element name, and not on its attributes. XSD 1.1 removes this restriction with a facility called “conditional type assignment”. XSD 1.1 is currently implemented only in Xerces and Saxon.

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

Sidebar

Related Questions

I'm currently working with an XML Schema that has <xsd:annotation> / <xsd:documentation> on most
I've been trying to figure out how to use an XML Schema to validate
I am working on getting an xml file to validate against an XSD schema
I am working with this XSD file. The portion of the XML that is
I am working on Jboss 4.05 , I have an xsd file that was
I'm currently building an XSD to validate some XML I'm working on, I'm guessing
I'm new to working with xml and xsd stuff. I'm trying to create a
I am working with Jaxb 2.x and was trying to validate XML document with
I am using xsd to generate classes from an xml file. It is working
I am working on a code that is trying to read in a bunch

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.