Error using XSD.exe creating a .NET classes

Posted on 2006-04-26
Last Modified: 2008-02-01
Hi guys, I trying to use Xsd.exe (.NET 2005) for create a VB class starting from XML Schema. This schema is really complex and really important for me because it is a schema of JDF standard. JDF is an international organization ( for develop communication standard protocol using XML format of course.

I developing an open source libraries using .Net 2005 in way that other peoples can use it for integrate JDF in .NET appications (today are available only for Java and C++).

I have to create a class from xsd files in way that I can manage easy all data in my new library.

The problem is that when I try to use XSD.exe for create VB class after several warning error XSD tell me:

Error: Error generating classes for schema 'e:\jdf\jdf'.
- The datatype '' is missing.
If you would like more help, please type "xsd /?".

I'm not expert about XML or XSD, someone can help me and tell me what happened?

Thanks a lot for any type of help.

P.S.: you can download an example of schema files here :
Question by:ErikIce
    1 Comment
    LVL 12

    Accepted Solution

    As I posted at CodeGuru:
    '' in your JDFTypes.xsd file builds off of the default NMTOKENS type. However, this type has minimum length 1, not 0.

    Change the corresponding part in your file


    <xs:simpleType name="NMTOKENS">
          <xs:restriction base="xs:NMTOKENS">
                <xs:minLength value="1"/>              <--   THIS LINE HERE -->
                <xs:maxLength value="2048"/>

    Error easily found using XMLSpy.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Suggested Solutions

    Title # Comments Views Activity
    More Changes to Closed Request Regarding XML Tags 5 43
    Merge XML into DOM 5 25
    Custom Ribbon doesn't refresh 7 41
    XML namaspace 2 26
    The Client Need Led Us to RSS I recently had an investment company ask me how they might notify their constituents about their newsworthy publications.  Probably you would think "Facebook" or "Twitter" but this is an interesting client.  Their cons…
    Browsing the questions asked to the Experts of this forum, you will be amazed to see how many times people are headaching about monster regular expressions (regex) to select that specific part of some HTML or XML file they want to extract. The examp…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now