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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T20:17:12+00:00 2026-06-17T20:17:12+00:00

I get doubt that are there some schemas which have a valid schema but

  • 0

I get doubt that are there some schemas which have a valid schema but don’t have some XML documents?
If there are, could you please give me some examples?

  • 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-17T20:17:13+00:00Added an answer on June 17, 2026 at 8:17 pm

    Yes, it’s possible to define schemas for which the set of valid documents is the empty set — at least, in every schema language I know, and given a reasonable definition of “valid document”.

    In XSD, RNG, and DTDs, perhaps the simplest such schema is one which declares no elements. In XSD, this could be expressed this way:

    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"/> 
    

    A simple non-vacuous schema can be unsatisfiable by declaring elements with unsatisfiable types:

    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:element name="unsatisfiable">
        <xs:complexType>
          <xs:choice/>
        </xs:complexType>
      </xs:element>
    </xs:schema> 
    

    Since xs:choice requires that at least one child of the choice be matched by the input, a choice with no children is unsatisfiable. And if the choice is required, as it is here, then the type as a whole is unsatisfiable.

    Empty choices can also be used in Relax NG, though not in DTDs.

    In Relax NG, it’s also possible to declare satisfiable elements in a schema with no valid instances, as long as the root element or at least one required descendant of the root element is unsatisfiable. In XSD, by contrast, once you have any satisfiable element declarations or type definitions you no longer have an empty language: XSD provides no way to say, in the schema, what the outermost element must be at validation time.

    In XSD, RNG, and DTDs it is also possible to make an element unsatisfiable by requiring that it contain undeclared elements. In DTD notation:

    <!ELEMENT unsatisfiable (undeclared) >
    

    Also, in any of these languages, it’s possible to define schemas which are satisfiable only by infinite documents:

    <!ELEMENT e (e) >
    

    In XSD (and in Relax NG using XSD datatypes) it’s possible to define empty simple types, too:

    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:element name="unsatisfiable">
        <xs:simpleType>
          <xs:restriction base="xs:integer">
            <xs:minExclusive value="0"/>
            <xs:maxExclusive value="1"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:schema> 
    

    Some methods of defining empty types are forbidden by XSD: setting the minimum and maximum exclusive values to the same value, for example, will raise an XSD error. (The rationale here is that the majority in the WG thought that an empty type made no sense and also suffered from the illusion that they could effectively prevent the definition of empty types, at least in cases not involving regular-expression patterns. As the example shows, they were wrong.) In XSD 1.1, perhaps the cleanest and most obvious way to define a non-satisfiable simple type is to define an empty union type, but an even simpler way is to use the predefined xs:error type (which itself is defined as an empty union). This is not possible in XSD 1.0, which requires that unions have at least two member types.

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

Sidebar

Related Questions

I have some piece of code. In that there are chances to get many
I have some piece of code. In that there are chances to get many
I have no doubt that for client applications, AsParallel() will bring some out-of-the-box performance
It may be a noob question but I have some doubt. I googled a
I have a doubt regarding how to get the pkcs11 driver for interacting with
I have a little doubt. I need to get a list of the files
Real noob question no doubt, but I can't get my head around this behaviour.
I have been trying for some time to create a class/series of classes that,
I am just starting learning about Linq. I wrote some examples but there is
Hello I am not able to get the correct validation.I think there is some

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.