Работа в xml xsd в первый раз.
У меня есть данные xsd и xml, как показано ниже. Когда я пытаюсь проверить, я получаю ошибку.
Код и ошибка ниже.xml-xsd проверка отладки
Пожалуйста, помогите мне найти, что происходит не так.
XSD:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:t="http://www.m5net.com/mantle/configuration/connectors" targetNamespace="http://www.m5net.com/mantle/configuration/connectors" elementFormDefault="qualified">
<xsd:element name="Bullhorn" type="t:Bullhorn" nillable="true" />
<xsd:element name="Configuration" type="t:Configuration" nillable="true" />
<xsd:element name="Lync" type="t:Lync" nillable="true" />
<xsd:element name="SalesForce" type="t:SalesForce" nillable="true" />
<xsd:element name="ShoreTelCosmoMobility" type="t:ShoreTelCosmoMobility" nillable="true" />
<xsd:element name="ShoreTelCosmoScribe" type="t:ShoreTelCosmoScribe" nillable="true" />
<xsd:element name="ShoreTelFax" type="t:ShoreTelFax" nillable="true" />
<xsd:element name="ShoreTelMobility" type="t:ShoreTelMobility" nillable="true" />
<xsd:element name="ShoreTelScribe" type="t:ShoreTelScribe" nillable="true" />
<xsd:element name="ShoretelCosmoConference" type="t:ShoretelCosmoConference" nillable="true" />
<xsd:element name="ShoretelCosmoMobility" type="t:ShoretelCosmoMobility" nillable="true" />
<xsd:complexType name="Bullhorn">
<xsd:complexContent>
<xsd:extension base="t:Configuration">
<xsd:sequence>
<xsd:element name="AccountId" type="xsd:int" minOccurs="0" />
<xsd:element name="CorporationID" type="xsd:int" minOccurs="0" />
<xsd:element name="Password" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="PrivateLabelID" type="xsd:int" minOccurs="0" />
<xsd:element name="UserName" type="xsd:string" minOccurs="0" nillable="true" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="Configuration">
<xsd:complexContent>
<xsd:restriction base="xsd:anyType">
<xsd:sequence />
</xsd:restriction>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="Lync">
<xsd:complexContent>
<xsd:extension base="t:Configuration">
<xsd:sequence>
<xsd:element name="TrustedAppComputerFQDN" type="xsd:string" />
<xsd:element name="TrustedAppPort" type="xsd:int" />
<xsd:element name="TrustedAppComputerGRUU" type="xsd:string" />
<xsd:element name="CertificateFriendlyName" type="xsd:string" />
<xsd:element name="TrustedAppEndpointOwnerURI" type="xsd:string" />
<xsd:element name="RegistrarFQDN" type="xsd:string" />
<xsd:element name="RegistrarPort" type="xsd:int" />
<xsd:element name="AccountId" type="xsd:int" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="SalesForce">
<xsd:complexContent>
<xsd:extension base="t:Configuration">
<xsd:sequence>
<xsd:element name="IsSandbox" type="xsd:boolean" minOccurs="0" />
<xsd:element name="Password" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="Token" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="UserName" type="xsd:string" minOccurs="0" nillable="true" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="ShoreTelCosmoMobility">
<xsd:complexContent>
<xsd:extension base="t:Configuration">
<xsd:sequence>
<xsd:element name="AccountId" type="xsd:int" minOccurs="0" nillable="true" />
<xsd:element name="GroupId" type="xsd:string" minOccurs="0" nillable="true" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="ShoreTelCosmoScribe">
<xsd:complexContent>
<xsd:extension base="t:Configuration">
<xsd:sequence>
<xsd:element name="AccountId" type="xsd:int" minOccurs="0" nillable="true" />
<xsd:element name="GroupId" type="xsd:string" minOccurs="0" nillable="true" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="ShoreTelFax">
<xsd:complexContent>
<xsd:extension base="t:Configuration">
<xsd:sequence>
<xsd:element name="AccountId" type="xsd:int" minOccurs="0" />
<xsd:element name="ConfirmReceipt" type="xsd:int" minOccurs="0" />
<xsd:element name="ConfirmSent" type="xsd:int" minOccurs="0" />
<xsd:element name="IncludeCover" type="xsd:int" minOccurs="0" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="ShoreTelMobility">
<xsd:complexContent>
<xsd:extension base="t:Configuration">
<xsd:sequence>
<xsd:element name="AccountId" type="xsd:int" minOccurs="0" />
<xsd:element name="GroupID" type="xsd:string" minOccurs="0" nillable="true" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="ShoreTelScribe">
<xsd:complexContent>
<xsd:extension base="t:Configuration">
<xsd:sequence>
<xsd:element name="AccountId" type="xsd:int" minOccurs="0" />
<xsd:element name="PlanId" type="xsd:int" minOccurs="0" />
<xsd:element name="SendImmediate" type="xsd:int" minOccurs="0" />
<xsd:element name="SubplanId" type="xsd:int" minOccurs="0" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="ShoretelCosmoConference">
<xsd:complexContent>
<xsd:extension base="t:Configuration">
<xsd:sequence>
<xsd:element name="AccountId" type="xsd:int" minOccurs="0" nillable="true" />
<xsd:element name="StartConference" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="EndConference" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="WebLoginMode" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="Password" type="xsd:string" minOccurs="0" nillable="true" />
<xsd:element name="OutdialPrompt" type="xsd:boolean" minOccurs="0" />
<xsd:element name="NotifyChanges" type="xsd:boolean" minOccurs="0" />
<xsd:element name="NotificationEmail" type="xsd:string" minOccurs="0" nillable="true" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="ShoretelCosmoMobility">
<xsd:complexContent>
<xsd:extension base="t:Configuration">
<xsd:sequence>
<xsd:element name="AccountId" type="xsd:int" minOccurs="0" nillable="true" />
<xsd:element name="GroupId" type="xsd:string" minOccurs="0" nillable="true" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:schema>
XML:
<?xml version="1.0" encoding="UTF-8"?>
<ShoretelCosmoConference xmlns="http://www.m5net.com/mantle/configuration/connectors" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<AccountId>13284</AccountId>
<EndConference>Moderator leaves</EndConference>
<NotificationEmail />
<NotifyChanges>false</NotifyChanges>
<OutdialPrompt>true</OutdialPrompt>
<Password />
<StartConference>Host Joins</StartConference>
<WebLoginMode>Name Only</WebLoginMode>
</ShoretelCosmoConference>
Ошибка:
XML Validation: Unexpected element(s):
{http://www.m5net.com/mantle/configuration/connectors}NotifyChanges. Location:
/*:ShoretelCosmoConference[1]/*:NotifyChanges[1]
Можете ли вы предоставить схему XSD для 'tns: Configuration'? Я думаю, что это проблема – VMAtm
@Raghav Пожалуйста, добавьте в свой вопрос код 'xsd' и' xml', поэтому постановка задачи завершена. –
Где ошибка? –