Hello, [EMAIL PROTECTED]

    I've tried to make validation check on my WIN system without
cygwin, jade and nsgmls and found some strange things about PHPDOC
build system. I'll be glad if somebody could read this and answer
my questions. =)

  RFC/xml_validation seems to be outdated.
  I'll quote it here for convenience.

> xml validation with xmllint
>[PROBLEM]
>nsgmls aka "make test" does not detect entity usage without
>trailing ';', either add additional checks or switch to a
>different, more XML-specific validator.
>
>[SOLUTION]
>xmllint form libxml package. xlstproc form the same package seems to be
>XLST processor of choice. The english version of the enhanced chm manual
>is produced by xsltproc. It seems a good idea to use programms out aof the
>same package.
>
>[TESTRESULTS]
>xmllint detects entity usage without trailing ';', also missing ids,
>entities and double usage of IDs.
>
>xmllint needs to be run several times.
>
>(A) The first run should be used to detect wrong entities, without trailing ;
>This errors should be fixed on the fly with a php script.
>
>(B) The second run should be used to detect valid missing entities.
>
>(c) The third run should be used to detect valid missing ids.
>
>Multiple runs of xmllint seems to be necessary. As long as wrong entities
>(without trailing ;) exists, the error output is not usable to create valid
>missing entities. Also is seems there is no way to convince convince xmllint
>to report errors for missing entities and missing IDREFS in the same run.
>
>[POSSIBLE SOLUTIONS]
>(1) long time:
> Processing the manual with xsltproc relies on valid entities. Therefore it's
> mandatory to ensure valid entities in all lang modules.
>
> - We need a script to catch wrong entities from the first run of xmllint, which
>   corrects them on the fly.
>
> - We need a script to produce missing-entities.ent and missing-ids.xml
>
> - Makefile.in and configure.in adjustments:
>   (a) detect/check for xmllint.
>   (b) include the above mentioned scripts in the build system
>
> (2) short time:
>  Use xmllint to check for non valid entities only.
>
>  - Makefile.in and configure.in adjustments as above (1a)
>  - missing-entities and missing-ids are produced through existing mechanisms.
>  - additional make target for xmllint to check for wrong entities.
>
>Feb 10 2003: betz
>
>build system adjusted to detect xmllint
>additional support for win, with the possibilty to use
>phpdoc-tools/libxml for xslt and xmllint, rather than the
>cygwin versions.
>
>A first script to create missing-entities.ent and missing-ids.xml
>from xmllint output can be found in scripts/test_missting-entities.php.in
>
> Testing was done with libxml 20430 and 20502


    1. Is the problem with missing ; still in place?
    Xmllint does the job pretty well, but is it really necessary to
include additional PHP layer for processing xmllint messages? Every
editor's highlightning engine can point out missing ; in xml entity,
so I doubt there are many such errors.

>  (B) The second run should be used to detect valid missing entities.
>  (c) The third run should be used to detect valid missing ids.
    2. What is "valid missing entity"?
    3. What is "valid missing id"?
    As I said before, I don't have nsgmls, so my missing-entities.ent
is empty. But validation process goes just fine with
cmd> xmllint.exe --noent --noout --valid manual.xml
except for one thing with Zend API:
>element link: validity error : IDREF attribute linkend references an
>unknown ID "zend"
But it can be fixed by replacing <link linkend="zend"> with &zend;
entity, which contents will depend on if ZENDAPI is available.
i.e.
 if ZENDAPI
      <!ENTITY zend '<link linkend="zend">ZendAPI</link>'>;
 else
      <!ENTITY zend '<ulink
      url="http://www.zend.com/zend/api.php";>ZendAPI</ulink>';
 endif


To my point of view there should not be any "missing valid" entries.
More probably, that these "missing valid" will transform into
interfaces for linking external documentation, so php hacks aren't
good.

I can't see the reasons for missing-entities no more. Perhaps I
missed something so I'd like to know if I'm wrong.

tnx,
t
-- 
--[ http://wiki.phpdoc.info/DocLinks ]--

Reply via email to