|
[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
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








