Re: Excess whitespace in XML files

From: Date: Mon, 09 Sep 2002 19:17:06 +0000
Subject: Re: Excess whitespace in XML files
References: 1 2 3 4  Groups: php.doc 
Request: Send a blank email to phpdoc+get-969348545@lists.php.net to get a copy of this message
Gabor Hojtsy wrote: > > > > I'm pretty sure it's possible to tweak > > > things so that those spaces don't show up, > > > > If all programlistings in manual have two blank lines in the start and > > at the end, they could be removed by some stylesheet tweaking. > > We do not need any newlines at the begining of examples and at the > end. There is no reason to have an example begining in one blank line, > it has no function in PHP... You don't need but you have: <programlisting><<line-end and thus blank line>> <[CDATA[<<line-end and thus blank line>> <?php <<line-end and thus line break>> echo "PHP code goes here";<<line-end and thus line break>> ?><<line-end and thus line break>> ]]><<line-end and thus blank line>> </programlisting> So you get: ----------------------- <?php echo "..." ?> ----------------------- instead of ----------------------- <?php echo "..." ?> ----------------------- Do you see where the problem is? ...Hmm I'm surprised that these excess blank lines are not visible in HTML source. I looked in html-common.dsl and found the hack -- you are using (process-children-trim) in custom verbatim rule instead of (process-children) which is in standard DSSSL stylesheets. I can port this code to print stylesheet, this will solve the problem. (But I still don't think this is technically correct solution, but I know that it is quite impossible to do it in other way /like changinf XML sources/ for many reasons now.) Jirka -- ----------------------------------------------------------------- Jirka Kosek e-mail: jirka@kosek.cz http://www.kosek.cz

« previous php.doc (#969348545) next »