|
Subject: Re: White space control when formatting for ascii text From: Tony Graham <tgraham@xxxxxxxxxxxxxxxx> Date: Tue, 17 Oct 2000 16:43:07 -0400 (EST) |
At 17 Oct 2000 15:29 -0400, Rick Anderson wrote:
> I'm attempting to transform some xml into nicely formatted ascii style
> text instead of to html. I've been using tabs to align my columns but
> sometimes I get extra tabs. I don't know why.
>
> It seems to be very difficult to control the white space in the style
> sheet. Is there a way to make the white space more visibile for better
> debugging?
Your problem isn't with the stylesheet, it's with your data.
The <xsl:strip-space elements="*"/> in your stylesheet strips any
whitespace-only text nodes in your XML, but your XML has several text
nodes that end with a line feed and some spaces or a tab:
> <desc>Global unique identifier for a person.
> </desc>
Either put the end tags after the last printing character:
<desc>Global unique identifier for a person.</desc>
or, in your stylesheet, normalize the spaces in your <desc> elements
to both remove leading and trailing whitespace and collapse multiple
spaces between words into single spaces:
<xsl:template match="desc">
<xsl:value-of select="normalize-space()"/>
</xsl:template>
Regards,
Tony Graham
======================================================================
Tony Graham mailto:tgraham@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9632
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: White space control when format, Dan Vint | Thread | Re: White space control when format, Mike Brown |
| Re: Which engine? (RE: JavaScript a, Eric van der Vlist | Date | Looking for good links, Wayne Davis |
| Month |