none
Batch schema [X12_BatchSchema.xsd] questions RRS feed

  • Question

  • Hi,

    I'm trying to use the EDI batch schema X12_BatchSchema.xsd to validate the EDI batch today and got a strange errors:

    If I add the X12_BatchSchema.xsd and X12_00401_850.xsd schema only to the project in visual studio, it validate my EDI batch sample file fine, and generate the instance succuss, but if add my custom schema to the project, then validate the same EDI batch sampe file failed(use the same schema X12_BatchSchema.xsd ), and generate instance failed, report the error:

    A message was encountered with root element name of . It could not be classified as an X12 or Edifact message. The root namespace was http://MyCustomXml.

    If I add the map file to the project, validate the same sample file and generate instance by X12_BatchSchema.xsd failed, it report error:

    The root element of a W3C XML Schema should be <schema> and its namespace should be 'http://www.w3.org/2001/XMLSchema'

    Simply speaking, validate and generate instance can only work fine when there are only X12_BatchSchema.xsd and X12_00401_850.xsd schema in the project. If I add the non-EDI schema or map file to the project, then failed.

    How can I fix this issue?

    Thans.

    Monday, December 20, 2010 6:16 AM

Answers

  • Hi,

       I think you can not put X12_BatchSchema.xsd in the project where non-edi schema/map are there.

     

     

    Thanks

    Gyan


    If this answers your question, please mark it as "Answered".
    Tuesday, December 21, 2010 3:05 AM

All replies

  • Hi,

        X12_BatchSchema.xsd is meant only for X12 Edi related schemas. It can not batch other types because it does not understand other layouts.

     

    You can get more info here:

    http://msdn.microsoft.com/en-us/library/bb246036%28BTS.70%29.aspx

    http://msdn.microsoft.com/en-us/library/bb246007%28BTS.70%29.aspx

     

     

    Thanks

    Gyan


    If this answers your question, please mark it as "Answered".
    Monday, December 20, 2010 3:58 PM
  • Hi Gyan,

    Thanks for the response.

    I know that X12_BatchSchema.xsd can only for X12 Edi schema. I add other schema to the project for other purpose, I don't want it to validate my custom schema too. Just want to confirm that if the non-edi schema/map and X12_BatchSchema.xsd  can be in the same project.

    Thanks

    Kissedi

    Tuesday, December 21, 2010 2:27 AM
  • Hi,

       I think you can not put X12_BatchSchema.xsd in the project where non-edi schema/map are there.

     

     

    Thanks

    Gyan


    If this answers your question, please mark it as "Answered".
    Tuesday, December 21, 2010 3:05 AM
  • Thank you Gyan.
    Tuesday, December 28, 2010 1:23 AM