On Fri, May 06, 2005 at 08:55:11AM +0100, eps com estem wrote:
> Yes, the presence of the credits is an important issue. One basic thing in
> internet pages
> (not intranet ones) is speed and speed means reduce at the maximum the size
> of documents
> that are going to be sent.
> The "credits" presence is a bad thing, not for the publicity (which is
> acceptable) but for
> the extra bandwidth you spend.
ok :), see previous mail. You can disable it at compile time. It would
probably be better to make it a run time option, though.
> And another problem is the inexistent control of the html output. I mean,
> the code
>
> -html-
> -body-
> hello
> -a href="aaa" link -/a
>
> should be without breaklines/white spaces/etc
>
> -html--body-hello-a href="aaa" link -/a
>
> This makes a difference if you do in all the pages, but i think there is no
> option to
> control it in the mod-xslt module.
ok, this is a much more delicate issue. XML and XSL are very strict in
dictating which spaces should be preserved or stripped during
transformations. Breaking those rules, means breaking standard
compliance.
And mod-xslt removing spaces may not always be the correct choice: I
believe some browsers may display a document differently depending on
the presence/absency of deemed useless spaces.
The behavior in respect to whitespaces and XML/XSL is very well
defined, as indicated in the http://www.w3.org/TR/xslt specifications.
You have some control of it in your XSL by using:
something like
<xsl:strip-space elements="*" />
right after your
<xsl:stylesheet>
directive may help.
You can also use the:
<element xml:space="preserve|default" ...>
as an attribute of your xml elements.
Additionally, the following may also help:
XPath function -- normalize-space(string)
removes leading and trailing spaces from
anything that can be converted to a string
indent attribute of <xsl:output element
<xsl:output indent="no" ... will remove
many ``useless'' \n, \r and leading spaces.
Hope it helps,
Cheers,
Carlo
--
GPG Fingerprint: 2383 7B14 4D08 53A4 2C1A CA29 9E98 5431 1A68 6975
-------------
What about WRITING it first and rationalizing it afterwords? :-)
-- Larry Wall in <8162@xxxxxxxxxxxxxxxxxxxxxxx>