|
Home > Archive > BizTalk Server General > November 2004 > How to include schema's H E L P...... HELP
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
How to include schema's H E L P...... HELP
|
|
| Patrick Wellink 2004-11-26, 7:47 am |
| Hello I have a very simple Biztalk Schema with only simple types.
Below is the definition of this schema.
<?xml version="1.0" encoding="utf-16" ?>
<xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="stStr50">
<xs:restriction base="xs:string">
<xs:minLength value="10" />
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Woonplaats">
<xs:restriction base="stStr50" />
</xs:simpleType>
<xs:simpleType name="Adres">
<xs:restriction base="stStr50" />
</xs:simpleType>
<xs:simpleType name="stStr20">
<xs:restriction base="xs:string">
<xs:maxLength value="20" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Telefoon">
<xs:restriction base="stStr20" />
</xs:simpleType>
<xs:simpleType name="str7">
<xs:restriction base="xs:string">
<xs:minLength value="6" />
<xs:maxLength value="7" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="strPostc">
<xs:restriction base="str7">
<xs:pattern value="[1234567890]" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="PostCode">
<xs:restriction base="strPostc" />
</xs:simpleType>
</xs:schema>
I want to create a new schema and include this schema in it......
The new schema does have a namespace. But i can't include it....
i get an error message
This operation could not be completed:
1. Type 'str7' is not declared or not a simple type. An error occurred at
file:///C:/Projecten/DataTypeDerivation/DataTypeDerivation/BiztalkBaseTypes.xsd, (29, 4).
2. Type 'strPostc' is not declared or not a simple type. An error occurred
at
file:///C:/Projecten/DataTypeDerivation/DataTypeDerivation/BiztalkBaseTypes.xsd, (34, 4).
3. Type 'stStr50' is not declared or not a simple type. An error occurred at
file:///C:/Projecten/DataTypeDerivation/DataTypeDerivation/BiztalkBaseTypes.xsd, (9, 4).
4. Type 'stStr50' is not declared or not a simple type. An error occurred at
file:///C:/Projecten/DataTypeDerivation/DataTypeDerivation/BiztalkBaseTypes.xsd, (12, 4).
5. Type 'stStr20' is not declared or not a simple type. An error occurred at
file:///C:/Projecten/DataTypeDerivation/DataTypeDerivation/BiztalkBaseTypes.xsd, (20, 4).
| |
| Martijn Hoogendoorn 2004-11-29, 5:52 pm |
| On Fri, 26 Nov 2004 03:59:02 -0800, Patrick Wellink wrote:
> Hello I have a very simple Biztalk Schema with only simple types.
> Below is the definition of this schema.
>
> <?xml version="1.0" encoding="utf-16" ?>
> <xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
> xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:simpleType name="stStr50">
> <xs:restriction base="xs:string">
> <xs:minLength value="10" />
> <xs:maxLength value="50" />
> </xs:restriction>
> </xs:simpleType>
> <xs:simpleType name="Woonplaats">
> <xs:restriction base="stStr50" />
> </xs:simpleType>
> <xs:simpleType name="Adres">
> <xs:restriction base="stStr50" />
> </xs:simpleType>
> <xs:simpleType name="stStr20">
> <xs:restriction base="xs:string">
> <xs:maxLength value="20" />
> </xs:restriction>
> </xs:simpleType>
> <xs:simpleType name="Telefoon">
> <xs:restriction base="stStr20" />
> </xs:simpleType>
> <xs:simpleType name="str7">
> <xs:restriction base="xs:string">
> <xs:minLength value="6" />
> <xs:maxLength value="7" />
> </xs:restriction>
> </xs:simpleType>
> <xs:simpleType name="strPostc">
> <xs:restriction base="str7">
> <xs:pattern value="[1234567890]" />
> </xs:restriction>
> </xs:simpleType>
> <xs:simpleType name="PostCode">
> <xs:restriction base="strPostc" />
> </xs:simpleType>
> </xs:schema>
>
> I want to create a new schema and include this schema in it......
> The new schema does have a namespace. But i can't include it....
>
> i get an error message
> This operation could not be completed:
> 1. Type 'str7' is not declared or not a simple type. An error occurred at
> file:///C:/Projecten/DataTypeDerivation/DataTypeDerivation/BiztalkBaseTypes.xsd, (29, 4).
> 2. Type 'strPostc' is not declared or not a simple type. An error occurred
> at
> file:///C:/Projecten/DataTypeDerivation/DataTypeDerivation/BiztalkBaseTypes.xsd, (34, 4).
> 3. Type 'stStr50' is not declared or not a simple type. An error occurred at
> file:///C:/Projecten/DataTypeDerivation/DataTypeDerivation/BiztalkBaseTypes.xsd, (9, 4).
> 4. Type 'stStr50' is not declared or not a simple type. An error occurred at
> file:///C:/Projecten/DataTypeDerivation/DataTypeDerivation/BiztalkBaseTypes.xsd, (12, 4).
> 5. Type 'stStr20' is not declared or not a simple type. An error occurred at
> file:///C:/Projecten/DataTypeDerivation/DataTypeDerivation/BiztalkBaseTypes.xsd, (20, 4).
Hi Patrick,
It has to do with using declarations you made previously within the same
schema. I think you actually want something like this though:
<?xml version="1.0" encoding="utf-8" ?>
<xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:simpleType name="Adres">
<xs:restriction base="xs:string">
<xs:minLength value="10" />
<xs:maxLength value="50" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="Telefoon">
<xs:restriction base="xs:string">
<xs:maxLength value="20" />
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="PostCode">
<xs:restriction base="xs:string">
<xs:minLength value="6" />
<xs:maxLength value="7" />
<xs:pattern value="[1234567890]" />
</xs:restriction>
</xs:simpleType>
</xs:schema>
and then the main schema could have something like this:
<?xml version="1.0" encoding="utf-16"?>
<xs:schema xmlns="http://BizTalk_Server_Project2"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
targetNamespace="http://BizTalk_Server_Project2"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:include schemaLocation=".\addressentities.xsd" />
<xs:element name="AdresInformatie">
<xs:complexType>
<xs:sequence>
<xs:element ref="Address" />
<xs:element ref="Postcode" />
<xs:element ref="Telefoon" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Address" type="Adres" />
<xs:element name="Postcode" type="PostCode" />
<xs:element name="Telefoon" type="Telefoon" />
</xs:schema>
(ja, ik ben ook Nederlands :-))
HTH,
Martijn Hoogendoorn.
|
|
|
|
|