🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: fr.comp.text.xml
1 messages
1 total messages Started by Thomas Harding Mon, 09 Jun 2008 22:31
[xmllint] qu'en est-il du support de schematron ?
#297
Author: Thomas Harding
Date: Mon, 09 Jun 2008 22:31
98 lines
4128 bytes
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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads