[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

trying to drop leading/trailing WS text nodes from ver

Subject: trying to drop leading/trailing WS text nodes from verbatim
From: "Robert P. J. Day" <rpjday@xxxxxxxxxxxxxx>
Date: Wed, 3 Sep 2003 07:19:00 -0400 (EDT)
leading trailing nodes
  authoring in docbook, and i have numerous verbatim environments
that i like to write:

<programlisting>
  ... listing here ...
</programlisting>

and 

<screen>
  ... screen content here ...
</screen>


  it was just pointed out to me that, when this is rendered
into PDF, i get a leading and trailing blank line displayed
based on whitespace nodes at the beginning and the end.  to
fix this, i *could* type

<programlisting>line 1
line 2
line 3</programlisting>

and so on, but i'd rather not since that would require me
to change all my input files, and i don't even like it
aesthetically.

  rather, i'd like to design a template for any kind of
environment like that (screen, programlisting, perhaps others
as they come to mind) that would remove the first child element
only if it was a whitespace element, and similarly the last
whitespace element, then process the element normally from
then on.

  something like:

<xsl:template match="screen|programlisting">
  -- remove first/last child only if whitespace --
  -- process normally --
</xsl:template>

  is there a simple way to do this?  am i making this too
difficult?

rday


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.