|
| Please help! I'm using an envelope schema that promotes two properties
(attributes of the root element), of which I'm trying to demote within the
document schema. When I try demote to the document schema (see example 1) as
attributes of the root element I get the following error: "The disassembler
encountered an envelope that does not contain the body element."
When I try to demote to the document schema (see example 2) as attributes of
a child element I don't get an error, but my properties are not demoted
either.
However, when I demote to the document schema as child elements everything
seems to work.
Envelope Schema
<xs:schema xmlns:ns0="http://Schemas.TaskItems"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:appinfo>
<b:schemaInfo is_envelope="yes"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003" />
<b:imports>
<b:namespace prefix="ns0" uri="http://Schemas.TaskItems"
location=".\taskitems.xsd" />
</b:imports>
</xs:appinfo>
</xs:annotation>
<xs:element name="PROCESS">
<xs:annotation>
<xs:appinfo>
<b:recordInfo body_xpath="/*[local-name()='PROCESS' and
namespace-uri()='']/*[local-name()='ITEMS' and namespace-uri()='']" />
<b:properties>
<b:property name="ns0:PROCESS_NAME"
xpath="/*[local-name()='PROCESS' and
namespace-uri()='']/@*[local-name()='NAME' and namespace-uri()='']" />
<b:property name="ns0:PROCESS_STATUS"
xpath="/*[local-name()='PROCESS' and
namespace-uri()='']/@*[local-name()='STATUS' and namespace-uri()='']" />
</b:properties>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="ITEMS">
<xs:complexType>
<xs:sequence>
<xs:any maxOccurs="unbounded" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="NAME" type="xs:string" />
<xs:attribute name="STATUS" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:schema>
EXAMPLE 1: Document Schema
<xs:schema xmlns:ns1="http://Schemas.TaskItems"
xmlns:ns0="http://ZenaDemoSchemas.PropertySchema.PropertySchema"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:appinfo>
<b:imports>
<b:namespace prefix="ns1" uri="http://Schemas.TaskItems"
location=".\taskitems.xsd" />
</b:imports>
</xs:appinfo>
</xs:annotation>
<xs:element name="TASK">
<xs:annotation>
<xs:appinfo>
<b:properties>
<b:property name="ns1:PROCESS_NAME" xpath="/*[local-name()='TASK'
and namespace-uri()='']/@*[local-name()='PARENT_ALIAS' and
namespace-uri()='']" />
<b:property name="ns1:PROCESS_STATUS"
xpath="/*[local-name()='TASK' and
namespace-uri()='']/@*[local-name()='PARENT_STATUS' and namespace-uri()='']"
/>
</b:properties>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:attribute name="ALIAS" type="xs:string" />
<xs:attribute name="STATUS" type="xs:string" />
<xs:attribute name="PARENT_ALIAS" type="xs:string" />
<xs:attribute name="PARENT_STATUS" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:schema>
EXAMPLE 2: Envelope Schema
<xs:schema xmlns:ns1="http://Schemas.TaskItems"
xmlns:ns0="http://ZenaDemoSchemas.PropertySchema.PropertySchema"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:appinfo>
<b:imports>
<b:namespace prefix="ns1" uri="http://Schemas.TaskItems"
location=".\taskitems.xsd" />
</b:imports>
</xs:appinfo>
</xs:annotation>
<xs:element name="TASK">
<xs:annotation>
<xs:appinfo>
<b:properties>
<b:property name="ns1:PROCESS_NAME" xpath="/*[local-name()='TASK'
and namespace-uri()='']/*[local-name()='PARENT' and
namespace-uri()='']/@*[local-name()='ALIAS' and namespace-uri()='']" />
<b:property name="ns1:PROCESS_STATUS"
xpath="/*[local-name()='TASK' and namespace-uri()='']/*[local-name()='PARENT'
and namespace-uri()='']/@*[local-name()='STATUS' and namespace-uri()='']" />
</b:properties>
</xs:appinfo>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="PARENT">
<xs:complexType>
<xs:attribute name="ALIAS" type="xs:string" />
<xs:attribute name="STATUS" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="ALIAS" type="xs:string" />
<xs:attribute name="STATUS" type="xs:string" />
</xs:complexType>
</xs:element>
</xs:schema>
Property Schema
<xs:schema xmlns="http://Schemas.TaskItems"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003"
targetNamespace="http://Schemas.TaskItems"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:annotation>
<xs:appinfo>
<b:schemaInfo schema_type="property"
xmlns:b="http://schemas.microsoft.com/BizTalk/2003" />
</xs:appinfo>
</xs:annotation>
<xs:element name="PROCESS_STATUS" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo propertyGuid="fa28b6e2-2ac0-4b84-80c0-bcdf7a76b4a9" />
</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="PROCESS_NAME" type="xs:string">
<xs:annotation>
<xs:appinfo>
<b:fieldInfo propertyGuid="1acc7425-45f6-4b06-bb02-649b8fb6d516" />
</xs:appinfo>
</xs:annotation>
</xs:element>
</xs:schema>
Can someone explain why the above scenarios do not work and point me to any
documentation that either supports or does not support what I'm trying to do.
Right now it's just a proof of concept that I'm working on. Sorry for the
lengthy message and any incorrect terminoloy as I'm new to Biztalk.
Thanks for any feedback.
|
|