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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:29:09+00:00 2026-05-29T04:29:09+00:00

I got the following schema: <?xml version=1.0 encoding=UTF-8?> <xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema elementFormDefault=qualified> <xs:element name=machine> <xs:complexType>

  • 0

I got the following schema:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
  <xs:element name="machine">
    <xs:complexType>
    <xs:sequence>
      <xs:element name="states" type="tokenList"/>
      <xs:element name="in_alphabet" type="tokenList"/>
      <xs:element name="blank" type="xs:string"/>
      <xs:element name="tape_alphabet" type="tokenList"/>
      <xs:element name="first_state" type="xs:string"/>
      <xs:element name="final_states" type="tokenList"/>

      <xs:element name="delta" type="delta_func" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:simpleType name="tokenList">
    <xs:list itemType="xs:normalizedString"/>
  </xs:simpleType>

  <xs:complexType name="delta_func">
    <xs:sequence>
      <xs:element name="state" type="xs:string"/>
      <xs:element name="read" type="xs:string"/>
      <xs:element name="target_states" type="tokenList"/>
      <xs:element name="write" type="xs:string"/>
      <xs:element name="move">
        <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="R|L|r|l"/>
        </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>

</xs:schema>

Which works, but I would like to not restrict the order of the elements. I tried xs:all but it doesn’t allow maxOccurs=unbounded for delta, which is a must. All other elements occur only once, so xs:all wouldn’t be problem here. Is there a way to define random order on the element while allowing an unlimited numbers of deltas?

  • 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-29T04:29:12+00:00Added an answer on May 29, 2026 at 4:29 am

    Instead of <sequence>, you could use <choice maxOccurrs="unbounded">, but it would imply that all elements can occur more than once.

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

Sidebar

Related Questions

I've got the following selector defined in button_selector.xml <?xml version=1.0 encoding=utf-8?> <selector xmlns:android=http://schemas.android.com/apk/res/android> <item
I've got the following xml file: <?xml version=1.0 encoding=utf-8?> <Project ToolsVersion=4.0 DefaultTargets=DeployPrototype xmlns=http://schemas.microsoft.com/developer/msbuild/2003> <PropertyGroup>
I've got the following xml file: <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:id=@+id/linearLayout1 android:background=@android:color/transparent android:layout_marginTop=0px
I've got the following layout file: <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=match_parent android:layout_height=match_parent >
I've got the following layout: <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent android:layout_height=wrap_content android:orientation=vertical> <WebView
I've got the following main.xml: <?xml version=1.0 encoding=utf-8?> <AbsoluteLayout android:id=@+id/widget0 android:layout_width=fill_parent android:layout_height=fill_parent xmlns:android=http://schemas.android.com/apk/res/android >
I've got an activity with the following layout: <?xml version=1.0 encoding=utf-8?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width=fill_parent
I've got following drawable set as LinearLayout background: <?xml version=1.0 encoding=utf-8?> <layer-list xmlns:android=http://schemas.android.com/apk/res/android> <item>
I've got the following simple XSD document ( foo.xsd ): <?xml version=1.0 encoding=UTF-8?> <xsd:schema
I've got a preferences.xml: <?xml version=1.0 encoding=utf-8?> <PreferenceScreen xmlns:android=http://schemas.android.com/apk/res/android> <PreferenceCategory android:title=Category> <CheckBoxPreference android:key =

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.