Il existe une ancienne recommandation W3C contenant un schéma XML pour XHTML 1.0, et affirmant que le schéma pour 1.1 sera disponible. Où est le schéma XML W3C pour XHTML 1.1?Où est le schéma XML W3C pour XHTML 1.1?
4
A
Répondre
4
Voici la version officielle hébergé:
3
Edit:XHTML 1.1 XML Schema Definition
http://www.w3.org/TR/2009/PER-xhtml11-20090507/xhtml11_schema.html
1
Le schéma XML (XSD) pour XHTML 1.1 est modularisé dans plusieurs fichiers, ainsi, pour valider vous avez besoin des fichiers suivants disponibles dans un répertoire local:
http://www.w3.org/MarkUp/SCHEMA/xhtml11.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml11-model-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml11-modules-1.xsd
Avec ces fichiers (et l'accès au réseau), vous pouvez valider un XHTML 1.1 fichier comme ceci:
$ xmllint -noout -schema xhtml11.xsd foo.xml
Sans accès au réseau, vous devez également les fichiers suivants:
http://www.w3.org/2001/xml.xsd
http://www.w3.org/2009/01/xml.xsd # -> xml_2009_01.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-attribs-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-base-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-bdo-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-blkphras-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-blkpres-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-blkstruct-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-charent-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-csismap-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-datatypes-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-datatypes-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-edit-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-events-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-form-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-framework-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-hypertext-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-image-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-inlphras-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-inlpres-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-inlstruct-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-inlstyle-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-link-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-list-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-meta-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-notations-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-object-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-param-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-param-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-pres-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-ruby-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-script-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-ssismap-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-struct-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-style-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-table-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-target-1.xsd
http://www.w3.org/MarkUp/SCHEMA/xhtml-text-1.xsd
Réglez ensuite les emplacements de schéma avec quelque chose comme:
$ sed -i '[email protected]="http://www.w3.org/2009/01/xml.xsd"@schemaLocation="xml_2009_01.xsd"@' *.xsd
$ sed -i '[email protected]="[^"]\+/\([^"]\+\)"@schemaLocation="\1"@' *.xsd
Avec les fichiers résultants, vous pouvez valider localement un fichier XHTML 1.1 comme ceci:
$ xmllint -noout -schema xhtml11.xsd -nonet foo.xml
Pour la navigation, il est le XHTML 1.1 XML Schema Defintion appendix qui contient la ligne de modules.
C'est complètement faux: XML Schema 1.1 n'est pas la même chose qu'un schéma pour XHTML 1.1. – bmargulies
@bmargu Voir la mise à jour – NullUserException
N'existe-t-il aucun fichier hébergé en ligne pour que les processeurs XML puissent les atteindre automatiquement? –