Schemas reusable types

Home Page Forums BizTalk 2004 – BizTalk 2010 Schemas reusable types

Viewing 1 reply thread
  • Author
    Posts
    • #17446

      hi everybody…

      i am still new to Biztalk and i am working on my first project, so please forgive my simple question:)

      i have a schema with a "Currency" element. I created the element, set it's "DerivedBy" property to "Restriction", set it's "BaseDataType" to "decimal", and finally used the "Pattern" property to apply my currency expression…

      now my problem is that i want to reuse this type in other elements. I tried to simply set the "DataType" property of other elements to "Currency" but that did not work…

      Please i need help with this issue…

      Thanks in advance.

    • #17452

      The best way would be to create a <xs:complexType> in your schema.
      I am not sure how to do this with the Biztalk Xml editor, I tend to use a text editor.

      Open your schema in a text editor and find you definition for Currency, it should look something like this:

      <xs:element name="Currency">
      <xs:complexType>

      </xs:complexType>
      </xs:element>

      Cut and paste the complexType  as a child of <xs:schema> and give it a name
      <xs:schema>

        <xs:complexType name="CurrencyType">
        …
        </xs:complexType>
      <xs:schema>

      Modify the original Currency element to use this type:
      <xs:element name="Currency" type="CurrencyType">
      </xs:element>

      When you open the schema in the Biztalk Xml Editor the Currency element should have a data type of CurrencyType and you should be able to set any other element to this same type. 

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.