2010-06-24 52 views
0

此模式用于在我们的Biztalk 2004环境中工作,但在Biztalk 2006 R2中编译时引发错误。模式验证帮助(从Biztalk 2004转换为2006 R2)

<?xml version="1.0" encoding="utf-16"?> 
<xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://Project.Schemas.External.ScheduleRepair" attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> 
    <xs:element name="schedulerepair"> 
    <xs:complexType> 
     <xs:complexContent mixed="true"> 
     <xs:extension base="xs:anyType"> 
      <xs:sequence>   
      <xs:element name="customerremarks"> 
       <xs:complexType /> 
      </xs:element> 
      </xs:sequence> 
     </xs:extension> 
     </xs:complexContent> 
    </xs:complexType> 
    </xs:element> 
</xs:schema> 

现在我们得到这个错误:

Error 54 Wildcard '##any' allows element 'customerremarks', and causes the content model to become ambiguous. A content model must be formed such that during validation of an element information item sequence, the particle contained directly, indirectly or implicitly therein with which to attempt to validate each item in the sequence in turn can be uniquely determined without examining the content or attributes of that item, and without any information about the items in the remainder of the sequence. C:\Project\ScheduleRepair.xsd

我没有看到任何关于所提到的节点不同。除此之外,当我删除那个节点时,它会继续指出其他的东西是罪魁祸首。我知道这与.NET 1.1到2.0的改变有关,但我们需要让这个模式以某种方式工作。

请帮助!

回答

1

Wow StackOverflow,您的专家在哪里? 1天,12个观点的问题,并没有尝试回应!

我从菲律宾的一名开发者那里得到了帮助,他们绝对是那里的头等舱!谢谢罗斯!

这里是她的原创消息:

Hello,

Checking the schema from BizTalk 2004, I see that schedulerepair element is in xs:anyType with Derived By property set to Extension. As far as I recall, we cannot set the Derived By property to Extension to derive from an xs:anyType otherwise the error you stated below will be encountered. To correct this, we can either change the Derived By property to Restriction or change the Base Data Type property from xs:anyType to some other types and rebuild the schema.

The error you encountered is raised due to a new check which has been introduced in the 2.0 framework as part of the restructuring of the 2.0 XML libraries.

Couldn’t exactly determine if that really is the case here as I have no Biztalk 2006 R2 to compile to but anyway hope this helps. 

Thanks! Rose

她甚至没有较新的Biztalk的版本测试,但她的意见的工作我的机器上。这里是新的模式:

<?xml version="1.0" encoding="utf-16"?> 
<xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://Project.Schemas.External.ScheduleRepair" attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> 
    <xs:element name="schedulerepair"> 
    <xs:complexType> 
     <xs:complexContent mixed="true"> 
     <xs:restriction base="xs:anyType"> 
      <xs:sequence>    
      <xs:element name="customerremarks"> 
       <xs:complexType /> 
      </xs:element> 
      </xs:sequence> 
     </xs:restriction> 
     </xs:complexContent> 
    </xs:complexType> 
    </xs:element> 
</xs:schema> 

惊人的工作玫瑰!再次感谢!

+0

是的,在这个网站上没有太多的BizTalk专家,虽然公平,周围没有太多的BizTalk专家。 – aceinthehole 2011-09-23 13:27:19