> > playing with xmllint from libxml2:
> > xmllint --noent --valid --noout [--timing] manual.xml >error 2>&1
> >
> > solves trailing ; problem for entities, which jade isn't capable of.
> > Maybe this could go into make test, but needs a little bit more
> > research;-) Despite the offical make test, for now its usefull to invoke
> > this cmdline in addition to make test.
>
> What we need to go into if we would like to replace jade tools is to
> find a way of generating the missing-entities and missing-ids files.
> Missing entities and IDs are listed by nsgmls, and so nsgmls is used in
> the configure process to create the files for those. If we can find a
> way to do the same with xmllint, then there would be no problem with
> switching over to xmllint instead of nsgmls, which I would be very happy
> to see ;)

A bit more testing and the results:

The errors thrown by xmllint are a bit ehm weird;-), because of double entries 
in file-entities.ent and &chapters.install; . But I might be wrong ;-)
The errors shown by xmllint from chapters/install, run with-lang-de, are just 
misleading. A short cut from the output: 

manual.xml:4: validity error: ID installation already defined
 <chapter id="installation">
                           ^
manual.xml:7: validity error: ID install.downloading already defined
  <sect1 id="install.downloading">
                                 ^
manual.xml:18: validity error: ID install.unix already defined
  <sect1 id="install.unix">
                          ^
and so on. But later on xlstproc doesn't complain about these already defined 
entities.

With lang=en the results are fine.

A possible way to go:

multiple runs of xmllint during the configure process and catching the output 
with a php-skript.

(A) entities/missing-* must not exist during the first run of xmllint, because   
the results could not trusted (--noent does replace entities)

(B) the first run of xmllint could be used to correct entities without the 
trailing ; "on the fly" and to create a valid  entities/missing-entities.ent

(c) the second run of xmllint could be used to create a valid 
entities/missing-ids.xml

(B) and (C) seems to be  mandatory, because I found no way to convince xmllint 
to report errors for missing entities and missing IDREFS in the same run. 
After all entities are valid, xmllint reports errors about ID(IDREFS.


The quick (temporary) way could be:
let existing php-scripts, based on nsgmls, do the job to create 
entities/missing-* files, no need to touch the scripts.
invoke xmllint at the end of configure to catch entities without trailing ; 
and correct them with a php-script in the lang-dir, or write the output to a 
file for manual correction, maybe entities/wrong-entities?

This might be not the ideal solution, but it ensures that all entities are 
valid, xlstproc will run, without complaining about missing trailling ; and a 
_very_ little step towards XSLT processing.

If we want to produce the manual with xsltproc , we must find a general 
solution to treat the trailling ; problem ;-) 
Maybe my little playing with xmllint and the described results and possible 
solutions suggested could be a starting point.

> Or are there any options for xmllint/xsltproc like --noent to disable
> entity problems, and replace them with something, or disable ID
> problems, and simply disregard the ID references in transformation time?

AFAIK no .

Friedhelm

p.s: testings done with libxml version 20502

--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to