forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <>
Subject Preserving space?
Date Sun, 06 Oct 2002 13:22:43 GMT

I have some source XML whose element's whitespace shouldn't be lost:

    Anteater demo

    1. sdflsdf
    2. sdflsdfkj


(background: I'm using XPathDirectoryGenerator to extract
these descriptions from a directory of Ant scripts)

The official way to indicate significant whitespace is the
xml:space="preserve" attribute. How about adding support for it to

<xsl:template match="p[@xml:space='preserve']">
  <div class="pre">

And then in style.css:

.pre { white-space: pre;}

The intention here is to preserve whitespace without also getting the
monospace font and block display that <pre> uses.

Does this sound decent? Any better ideas for preserving whitespace?


View raw message