[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 254
  • Last Modified:

Error using XSD.exe creating a .NET classes

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 (www.CIP4.org) 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 'http://www.CIP4.org/JDFSchema_1_3_Types:NMTOKENS' 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.
Erik

P.S.: you can download an example of schema files here : ftp://ftp.bbinfo.com/JDF/schema.zip
0
ErikIce
Asked:
ErikIce
1 Solution
 
jkmyoungCommented:
As I posted at CodeGuru:
'http://www.CIP4.org/JDFSchema_1_3_Types:NMTOKENS' 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

Code:

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

Error easily found using XMLSpy.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now