l'élément racine du document n'est pas <xsd:schema>
J'ai un fichier nommé jvxml-mise en œuvre-0-7.xsd dans mon projet.
Le contenu du fichier sont
<?xml version="1.0" encoding="UTF-8"?>
<xsi:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.jvoicexml.org/xsd/jvxml-implementation-0-7.xsd"
xmlns:tns="http://www.example.org/jvxml-implementation"
xmlns:beans="http://www.springframework.org/schema/beans"
elementFormDefault="qualified">
<xsi:import namespace="http://www.springframework.org/schema/beans"
schemaLocation="spring-beans-2.0.xsd" />
<xsi:element name="implementation">
<xsi:annotation>
<xsi:documentation>
Implementation platform for JVoiceXML
</xsi:documentation>
</xsi:annotation>
<xsi:complexType>
<xsi:sequence minOccurs="0" maxOccurs="unbounded">
<xsi:element name="repository" type="xsi:string"
minOccurs="0" maxOccurs="1">
<xsi:annotation>
<xsi:documentation>
The name of the loader repository.
</xsi:documentation>
</xsi:annotation>
</xsi:element>
<xsi:element name="classpath" type="xsi:string"
minOccurs="0" maxOccurs="unbounded">
<xsi:annotation>
<xsi:documentation>
Entry to be added to the CLASSPATH when
loading this implementation platform^M
</xsi:documentation>
</xsi:annotation>
</xsi:element>
<xsi:element ref="beans:bean" minOccurs="1"
maxOccurs="unbounded">
<xsi:annotation>
<xsi:documentation>Spring bean configuration
</xsi:documentation>
</xsi:annotation>
</xsi:element>
</xsi:sequence>
</xsi:complexType>
Mais quand il est chargé à une telle erreur se produit.
org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'jvxml-implementation-0-7.xsd', because 1) could not find the document; 2) the document could not be read; 3) the root element of the document is not <xsd:schema>.
J'ai changé l'autorisation et de mettre le fichier dans lequel elle est suppoesed. Donc, je suis parti avec le troisième erreur.
Merci de me donner un aperçu sur la façon de traiter avec elle.
Ce qui concerne.
OriginalL'auteur Abhishek | 2012-06-08
Vous devez vous connecter pour publier un commentaire.
XSI est un exemple de schéma de référence - pas de schéma.
1 de 2 choses va travailler ici.
<xsi:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema"
à<xsi:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
OU
<xsi:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema"
à<xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema"
et remplacer tous les "xsi" avec "xsd"
OriginalL'auteur user3013659