From: <jc...@fe...> - 2003-03-10 19:53:30
|
On Monday 10 March 2003 17:19, Rafael Laboissiere wrote: | * Alan W. Irwin <ir...@be...> [2003-03-09 16:32]: | > You are probably right; we need to learn more about this aspect, | > and my educated guesses may be leading us astray. The critical | > question then is how does the perl parser know the location of | > those xml/sgml files you mentioned where the required entities are | > defined? | | I dug a little bit deeper and found the following: the Perl module | XML::DOM::Parser extends the module XML::Parser, which uses the expat | library (package libexpat1 in Debian). The error that Joao gets: | | undefined entity at line 2915, column 62, byte 85921 at | | /usr/lib/perl5/site_perl/5.8.0/i586-linux-thread-multi/XML/Parser.pm | line 185 | | comes for the expat library (I am 100% sure about this). What is | intriguing is that the expat library have different behaviors in | Joao's system than in Debian. However, I could replicate the bug | above when I changed the first line of src/plplotdoc.xml.in to: | | <?xml version="1.0" standalone="yes"?> | | The standalone declaration tells the parser that the document has no | external definitions. It seems that Joao system's expat library is | assuming this. | | I did a commit recently that may fix this problem. I added an | explicit declaration standalone="yes" to the temporary file that is | parsed by api2txt.pl, which is a "concatenation" of plplotdoc.xml.in | (yes, Alan, *.in!) and api.xml. I also added "text" definition for | the entities usually found in api.xml. The nice side-effect of this | change is that, contrary to what happened before, the output in the | *.txt is correct, with entities like "°", ">", and "–" | being translated into " degrees", ">", and "--", respectively. | | Test this, please. Yes, it works. And also in a straight RH-8.0 from a colleague. And also in a plain SuSE-8.1 from another colleague. | | When I will have some time, I will commit the change in | bindings/octave/ Makefile.am to include the files in | plplot_octave_txt into the tarball through make dist, such that | regular users won't need XML Perl modules in order to build the | Octave bindings. Good idea. Joao |