我需要避免混合=" true"因为如果我使用mixed =" true"我的Microsoft SSIS就会抱怨在我的* .XSD文件中。我收到以下错误消息:
" ... XML源适配器不支持复杂类型的混合内容模型"
我的XML文件:
<MappingProject name="anyString1">
<MappingSpecification name="anyString2">
<MappingTargetTable>TEXT_BLOCK1</MappingTargetTable>
<MappingSourceTables>
<Table>TEXT_BLOCK2</Table>
<Table>TEXT_BLOCK3</Table>
</MappingSourceTables>
<Description>
<DescriptionText>Some Text... </DescriptionText>
<Condition type="filter"> -</Condition>
</Description>
</MappingSpecification>
</MappingProject>
我的XSD文件:
<!-- <MappingProject> -->
<xs:element name="MappingProject">
<xs:complexType>
<xs:sequence>
<xs:element name="MappingSpecification" type="MappingSpecificationType"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
<!-- MappingSpecification -->
<xs:complexType name="MappingSpecificationType">
<xs:sequence>
<xs:element name="MappingTargetTable" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="MappingSourceTables" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Description" type="DescriptionType" minOccurs="1"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>
<!-- Description -->
<xs:complexType name="DescriptionType">
<xs:sequence>
<xs:element name="DescriptionText"/>
<xs:element name="Condition" type="ConditionType"/>
</xs:sequence>
</xs:complexType>
<!-- Condition-->
<xs:complexType name="ConditionType" mixed="true">
<xs:attribute name="type" type="xs:string" use="required"/>
</xs:complexType>
此部分:xs:complexType name="ConditionType" mixed="true"
是必需的,因为我收到任何错误消息,如:
&#34;元素&#39;条件&#39;不能有字符[children],因为type的内容类型是 元件只&#34;
现在怎么办?我无法使用mixed="true"
,因为MS SSIS不喜欢它,否则我会收到错误消息。你能帮帮我吗?
非常感谢!
答案 0 :(得分:1)
如果元素分别类型应该没有子元素但至少有一个属性,则应将其定义为
map.getBounds()