locked
XSD schemas separated in several files [BizTalk 2004] RRS feed

  • Question

  • Hi all,
    in my BizTalk 2004 solution, I have to create a schema with a file .xsd that is correlated with other 4 xsd files.
    In the principal xsd file there are the following rows:

     <!--===== Imports =====-->
      <xs:import namespace="http://emcs.dgtaxud.ec/v10/types" schemaLocation="types.xsd" />
      <xs:import namespace="http://emcs.dgtaxud.ec/v10/tms" schemaLocation="tms.xsd" />
      <xs:import namespace="http://emcs.dgtaxud.ec/v10/tcl" schemaLocation="tcl.xsd" />
      <xs:import namespace="http://emcs.dgtaxud.ec/v10/doc" schemaLocation="doc.xsd" />

    I've tried to creata an empty schema, copy and paste the content of the principal xsd schema, and copy the other 4 file under the root "Schema" in my solution, but I've got these errors:

    "<Schema>" - Schema reference "doc.xsd" is not a valid reference or does not exist in the current project.
    "<Schema>" - Schema reference "tcl.xsd" is not a valid reference or does not exist in the current project.
    "<Schema>" - Schema reference "tms.xsd" is not a valid reference or does not exist in the current project.
    "<Schema>" - Schema reference "types.xsd" is not a valid reference or does not exist in the current project.

    How can I solve this problem?

    Thanks a lot.

    Luigi

    Monday, November 29, 2010 11:41 AM

Answers

  • Hi,

    I would suggest you to do the following.

    1. Create a new schema in the same location using any schema editor(Using Biztalk).
    2. Try importing the same 4 schemas through the editor's import property.
    3.Now compare the import tag of this schema with your schema that is failing.

    This would help you to confirm that the '../' is not the culprit.

    Thanks.
    Please mark this as answer if it helps.


    Sriram N http://srirambiztalks.wordpress.com/
    Sunday, February 20, 2011 3:56 AM

All replies

  • What is the content you are copying and pasting to the new schema file? is that the import lines? if so, you can check whether you have missed to take a reference assembly which contains those schema inside your new project.


    Please mark it as Answer if this answers your question
    Thanks.
    Mo
    The contents I write here is my personal views, not the view of my employer and anyone else.
    Monday, November 29, 2010 12:16 PM
  • Here the beginning of the "principal" XSD file:

    <?xml version="1.0" encoding="utf-16" ?>
    - <xs:schema xmlns:doc="http://emcs.dgtaxud.ec/v10/doc" xmlns:tcl="http://emcs.dgtaxud.ec/v10/tcl" xmlns:tms="http://emcs.dgtaxud.ec/v10/tms" xmlns:ie="http://emcs.dgtaxud.ec/v10/cd801/ie" xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns:emcs="http://emcs.dgtaxud.ec/v10/types" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://emcs.dgtaxud.ec/v10/cd801/ie" version="1.00" xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:import schemaLocation="types.xsd" namespace="http://emcs.dgtaxud.ec/v10/types" />
      <xs:import schemaLocation="tms.xsd" namespace="http://emcs.dgtaxud.ec/v10/tms" />
      <xs:import schemaLocation="tcl.xsd" namespace="http://emcs.dgtaxud.ec/v10/tcl" />
      <xs:import schemaLocation="doc.xsd" namespace="http://emcs.dgtaxud.ec/v10/doc" />
    - <xs:annotation>
    - <xs:appinfo>
    - <references xmlns="http://schemas.microsoft.com/BizTalk/2003">
      <reference targetNamespace="http://emcs.dgtaxud.ec/v10/tms" />
      <reference targetNamespace="http://emcs.dgtaxud.ec/v10/tcl" />
      <reference targetNamespace="http://emcs.dgtaxud.ec/v10/types" />
      <reference targetNamespace="http://emcs.dgtaxud.ec/v10/doc" />
      </references>
      </xs:appinfo>
      </xs:annotation>
      <xs:element name="CD801A" type="ie:CD801AType" />
    - <xs:complexType name="CD801AType">
    - <xs:sequence>
      <xs:element name="Header" type="tms:HeaderType" />
      <xs:element name="Body" type="ie:BodyType" />
      </xs:sequence>
      </xs:complexType>
    .....
    .....


    and I have put the other 4 xsd files in the same folder of my solution, but I got the errors that I've wrote before.

    Luigi

    Monday, November 29, 2010 1:36 PM
  • This should work.
    Are the file names exactly the same as the import schemaLocation?
    Have you added these files to you project?
    What is the Build Action for each of these files?

    Monday, November 29, 2010 6:29 PM
    Answerer
  • Hi Luigi,

     

    Only seeing this now. I did a message editor for IE315 / IE313 using C++/CLI, and I am now exploring one for the IE815. Among the things I am considering is using XSD.exe to generate a class for the IE815 by throwing the schema at it - I forgot to mail home tms.xsd this weekend. Would you like to compare notes?

    Saturday, February 19, 2011 9:48 AM
  • Hi,

    I would suggest you to do the following.

    1. Create a new schema in the same location using any schema editor(Using Biztalk).
    2. Try importing the same 4 schemas through the editor's import property.
    3.Now compare the import tag of this schema with your schema that is failing.

    This would help you to confirm that the '../' is not the culprit.

    Thanks.
    Please mark this as answer if it helps.


    Sriram N http://srirambiztalks.wordpress.com/
    Sunday, February 20, 2011 3:56 AM