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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T23:23:11+00:00 2026-05-12T23:23:11+00:00

I’m generating C# classes from an OTA (Open Travel Alliance) XSD file. You can

  • 0

I’m generating C# classes from an OTA (Open Travel Alliance) XSD file. You can download the XSD file from here.

I create the C# class with the following command in a Visual Studio Command Prompt:

xsd FS_OTA_VehLocDetailsNotifRQ.xsd /classes /nologo

Within OTA_VehLocDetailsNotifRQ.POS[0].RequestorID I would expect to find an ID property. Yet the property generated by the XSD.exe tool is named ID_Context.

Can you explain why it does this, and whether I am able to force it to generate the correct (ID) property name?

Please don’t suggest I edit the generated file as that is not a maintainable approach.

Further edit after accepting the answer:

Looking at the XSD more closely and replacing the references with their attribute group definitions, the ID attribute can be seen in its attribute group:

<xs:attributeGroup name="UniqueID_Group">
  <xs:attribute name="URL" type="xs:anyURI" />
  <xs:attribute name="Type" type="OTA_CodeType" use="required" />
  <xs:attribute name="Instance" type="StringLength1to32" />
  <xs:attributeGroup name="ID_Group">
    <xs:attribute name="ID" type="StringLength1to32" use="required" />
  </xs:attributeGroup>
  <xs:attribute name="ID_Context" type="StringLength1to32" use="optional" />
</xs:attributeGroup>

I believe this to be a bug in the XSD tool.

  • 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-12T23:23:11+00:00Added an answer on May 12, 2026 at 11:23 pm

    Let’s see….

    • the RequestorID contains complex content of type UniqueID_Type
    • UniqueID_Type contains a reference to a group of attributes called UniqueID_Group
    • UniqueID_Group is an attribute group and contains the following attributes:
      • URL
      • Type
      • Instance
      • a reference to an ID_Group
      • ID_Context

    I guess the C# code “ID_Context” is generated because of the “ID_COntext” attribute in that attribute group… I don’t see anything wrong with that.

    But I do agree – that ID_Group should include an “ID” property, but it seems xsd.exe has dropped that nested reference to the ID_Group – for whatever reason… it does appear to be a problem others have stumbled across in other scenarios, as well. Looks like xsd.exe cannot handle this task 🙁

    Maybe also check out this discussion:

    http://groups.google.com/group/OTA-Impl-Forum/browse_thread/thread/fa476cfb6e1fa7f7

    Update: I also tried the svcutil.exe from WCF (.NET 3.0 and up) – no luck either 🙁

    Error: Type ‘DateOrTimeOrDateTimeType’
    in namespace
    ‘http://www.opentravel.org/OTA/2003/05‘
    cannot be imported. Simple types with **
    <union> content are not supported.

    Either change the schema so that the
    types can map to data contract types
    or use ImportXmlTyp e or use a
    different serializer.

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

Sidebar

Related Questions

Does anyone know how can I replace this 2 symbol below from the string
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I want use html5's new tag to play a wav file (currently only supported
In my XML file chapters tag has more chapter tag.i need to display chapters

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.