L'onglet Marker Eclipse affiche un problème Ceci est ma hiérarchie de projet: p> P> erreurs affichés dans la fenêtre Marqueur: p> XML code>. Cela s'est produit lorsque j'ai vérifié
module Web dynamique code> dans les facettes de projet
code>.
jdconfig.xml code> (généré automatiquement): p>
cvc-elt.1: Cannot find the declaration of element 'jdoconfig'.
5 Réponses :
Parce que c'est faux? Cette page a un exemple simple http://db.apache.org/jdo/jdoconfig_dtd.html
Le La documentation de toute implémentation JDO expliquerait ce que ce dossier est pour, de même qu'une simple recherche sur Internet. p>
Un meilleur en-tête XML serait quelque chose comme P>
<jdoconfig xmlns="http://xmlns.jcp.org/xml/ns/jdo/jdoconfig" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/jdo/jdoconfig http://xmlns.jcp.org/xml/ns/jdo/jdoconfig_3_0.xsd" version="3.0">
Cela n'a pas fonctionné pour moi. La réponse de Protoxy a travaillé pour moi.
cvc-elt.1: Cannot find the declaration of element 'jdoconfig'. This is a validation error. It says, that when validating your XML file, parser couldn't find declaration for element <jdconfig> on the referred schema document.In your case it is probably caused by two different things: The schemalocation http://java.sun.com/xml/ns/jdo/jdoconfig is incorrect, there is no schema in that address. The element <jdconfig> has a (default) namespace, yet the schema location refers to non-namespaced schema.
Essayez cela à la place
<jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig http://java.sun.com/xml/ns/jdo/jdoconfig_3_0.xsd">
Il a corrigé le problème!
Est-il possible que cette réponse inclue pourquoi i> cela a fonctionné? (Upéted quand même depuis qu'il résume le problème).
<?xml version="1.0" encoding="UTF-8" ?> <jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/jdo/jdoconfig http://java.sun.com/xml/ns/jdo/jdoconfig_3_0.xsd">
S'il n'existe aucun schéma selon 'XSI: NonaméSpacesChamalocation, puis supprimer cet attribut tue cette erreur de validation.
<?xml version="1.0" encoding="utf-8"?> <jdoconfig xmlns="http://java.sun.com/xml/ns/jdo/jdoconfig" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >