Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[xmllint] qu'en est-il du support de schematron ?

0 views
Skip to first unread message

Thomas Harding

unread,
Jun 9, 2008, 6:31:18 PM6/9/08
to

Bonjour,
Je suis en train de faire un tutoriel « Docbook sur Winxxxx » (à usage
interne de ma boîte, désolé), et il s'avère qu'il m'est impossible de
valider un exemple d'article en docbook5 avec xmllint, alors que je suis
scrupuleusement la doc de N. Walsh.

En poussant les recherches, je suis tombé sur la page
http://www.sagehill.net/docbookxsl/ProcesingDb5.html de Stayton, qui
prétend qu'xmllint ne prends pas en compte schematron.

Pourtant :

tom@geekette:~$ xmllint --version
xmllint: using libxml version 20627
compiled with: Threads Tree Output Push Reader Patterns Writer SAXv1
FTP HTTP DTDValid HTML Legacy C14N Catalog XPath XPointer XInclude
Iconv ISO8859X Unicode Regexps Automata Expr Schemas Schematron
Modules Debug Zlib ##########


Bref, s'agit-il d'un support partiel, ou bien dois-je m'interroger
sur mes capacités d'analyse ? Curieusement, j'arrive à sortir un "book"
de 60 pages et pas un article de 2...

xmllint --valid --noout includes/article-exemple.xml => RAS

tom@geekette:~/xml_howto$ xmllint --valid --noout --relaxng
http://docbook.org/xml/5.0/rng/docbookxi.rng
includes/article-exemple.xml
includes/article-exemple.xml:46: element sect1: Relax-NG validity error
: Did not expect element sect1 there
includes/article-exemple.xml:31: element bibliography: Relax-NG validity
error : Expecting element example, got bibliography
includes/article-exemple.xml:31: element bibliography: Relax-NG validity
error : Did not expect element bibliography there
includes/article-exemple.xml:31: element bibliography: Relax-NG validity
error : Expecting element bridgehead, got bibliography
includes/article-exemple.xml:31: element bibliography: Relax-NG validity
error : Expecting element annotation, got bibliography
includes/article-exemple.xml fails to validate
tom@geekette:~/xml_howto$

en gros, la structure de mon document est :
(je maintiens la DTD pour les entités « texte »)


<?xml version="1.0" encoding="UTF-8"?>
<!-- vim: set expandtab tabstop=2 shiftwidth=2: -->
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V5.0//EN"
"http://docbook.org/xml/5.0/dtd/docbook.dtd"
[
<!ENTITY og "&#x000AB;&#160;">
<!ENTITY fg "&#160;&#x000BB;">
<!ENTITY mdash "&#x2014;">
]>
<article xmlns="http://docbook.org/ns/docbook"
version="5.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xml:lang="fr">
<info>
<title>Exemple de fichier docbook 5.0</title>
...
<abstract>
<para>Ceci est un exemple de fichier docbook.</para>
</abstract>
</info>
<bibliography>
<biblioentry>
<author>
<personname>
...
</personname>
</author>
</biblioentry>
</bibliography>
<sect1>
<title>Une section</title>
<sect2>
<title>Une sous-section</title>
<para>Paragraphe contenu dans la sous-section.</para>
</sect2>
<sect2>
<title>Listes</title>
...
</sect2>
</sect1>
<sect1>
<title>Une seconde section</title>
<para>Un paragraphe de la seconde section</para>
</sect1>
</article>


Où est l'erreur ?

--
Thomas Harding

0 new messages