2010-06-24 11 views
0

Ce schéma fonctionnait sur notre environnement Biztalk 2004 mais génère une erreur lors de sa compilation dans Biztalk 2006 R2.validation de schéma HELP (converti de 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> 

maintenant nous obtenons cette erreur:

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

Je ne vois pas quelque chose de différent sur le nœud mentionné. D'ailleurs quand je supprime ce noeud, il va juste continuer à montrer quelque chose d'autre comme le coupable. Je sais que cela a quelque chose à voir avec le changement de .NET 1.1 à 2.0, mais nous devons obtenir ce schéma pour fonctionner d'une manière ou d'une autre.

S'IL VOUS PLAÎT AIDE!

Répondre

1

Wow StackOverflow, où sont vos experts? 1 jour, 12 vues sur la question et aucune tentative de réponse !!!

J'ai reçu de l'aide d'un développeur aux Philippines, ils sont définitivement de première classe là-bas! Merci Rose!

Voici son message d'origine:

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

Elle ne même pas la version plus récente de Biztalk pour le tester, mais son conseil a travaillé sur ma machine. Voici le nouveau schéma:

<?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> 

Un travail incroyable Rose! Merci encore!

+0

Oui, il n'y a pas beaucoup d'experts BizTalk sur ce site, mais pour être honnête, il n'y a pas trop d'experts BizTalk autour de la période. – aceinthehole