I want to put a simple attribute in a schema, and reference it another schema.
First schema looks like this:
<xs:attribute name=\”MyVar\”>
<xs:simpleType>
<xs:restriction base=\”xs:string\”>
<xs:enumeration value=\”A\” />
<xs:enumeration value=\”B\” />
<xs:enumeration value=\”C\” />
</xs:restriction>
</xs:simpleType>
</xs:attribute>
but in second schema, I do an imports, but do not have a choice of a simple type under \”Base Data Type\” only a reference under \”Data Type\”.
The reference seems to be \”evil\”.
It builds XSD like this:
<xs:attribute ref=\”mt:MyVar\” />
It causes XML to be generated like this:
<ns0:Root xmlns:ns0=\”http://TestBiztalkSchemaIssues.MyGroup\”>
<test ns1:MyVar=\”A\” ns2:PaymentFrequencyType=\”One Time\” xxx=\”xxx_2\” Field=\”Field_3\” xmlns:ns2=\”http://schemas.compassion.com/payment/paymentfrequencytype/2005-10-01\” xmlns:ns1=\”http://TestBiztalkSchemaIssues.MyType\”/>
</ns0:Root>
There seems to be no way to xpath to the variable ns2:PaymentFrequenceType because the ns2 namespace is on the same level, not the level above.
The only way we can get a non-reference, is to build a <SimpleType> in the first schema, which requires editing in XML editor outside of Biztalk, as shown below:
<xs:simpleType name=\”PaymentFrequencyType\”>
<xs:restriction base=\”xs:string\”>
<xs:enumeration value=\”OneTime\” />
<xs:enumeration value=\”Annually\” />
<xs:enumeration value=\”Monthly\” />
<xs:enumeration value=\”Quarterly\” />
<xs:enumeration value=\”Semiannually\” />
</xs:restriction>
</xs:simpleType>
The problem with this you apparently cannot use the GUI Biztalk Editor tools.
Any ideas appreciated.
Thanks,
Neal Walters