Subject: RE: White space control when formatting for ascii text From: "Kennedy, Chris" <chris.kennedy@xxxxxxx> Date: Tue, 17 Oct 2000 17:52:09 -0400 |
I've noticed this in other ascii application when transferring data from unix to windows. -----Original Message----- From: Rick Anderson [mailto:rianders@xxxxxxxxxxxxxxx] Sent: Tuesday, October 17, 2000 3:29 PM To: XSL-List@xxxxxxxxxxxxxxxx Subject: White space control when formatting for ascii text 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? I switched to using the unicode characters for return and tab. return = 
 and tab = 	 so that I could know what tabs and line breaks I was putting in. Maybe I've missed something. Style sheet output: ------------------- <?xml version="1.0" encoding="utf-8"?> This is a listing of fields by category Category: People PersonID Global unique identifier for a person. SSN Social Security Number Firstname First Name Lastname Last Name Middlename Middle Name DOB Date of birth Gender Gender of the person. ^ |--------no reason for tab here. Style sheet: ------------ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:strip-space elements="*"/> <xsl:template match="fieldlist"> <xsl:text>This is a listing of fields by category
</xsl:text> <xsl:apply-templates/> </xsl:template> <xsl:template match="table"> <xsl:text>
</xsl:text> <xsl:text>Category: </xsl:text> <xsl:apply-templates/> </xsl:template> <xsl:template match="name"> <xsl:apply-templates/> <xsl:text>

</xsl:text> </xsl:template> <xsl:template match="field"> <xsl:value-of select="@name"/> <xsl:text>	</xsl:text> <xsl:apply-templates/> </xsl:template> <xsl:template match="desc"> <xsl:apply-templates/> </xsl:template> </xsl:stylesheet> Original xml: ------------- <?xml version="1.0" standalone="no"?> <!DOCTYPE fieldlist SYSTEM "fieldlist.dtd"> <fieldlist> <table> <name>People</name> <field name="PersonID" type="Number(10)" keytype="PRIMARY KEY"> <desc>Global unique identifier for a person. </desc> </field> <field name="SSN" type="varchar2(9)" keytype="NOT NULL"> <desc>Social Security Number </desc> </field> <field name="Firstname" type="varchar2(20)" keytype=""> <desc>First Name </desc> </field> <field name="Lastname" type="varchar2(20)" keytype=""> <desc>Last Name </desc> </field> <field name="Middlename" type="varchar2(20)" keytype=""> <desc>Middle Name </desc> </field> <field name="DOB" type="Date" keytype=""> <desc>Date of birth </desc> </field> <field name="Gender" type="char(1)" keytype=""> <desc>Gender of the person. </desc> </field> </table> </fieldlist> ______________________________________________________ Rick Anderson | rianders@xxxxxxxxxxxxxxx ________________|_____________________________________ Continuous Education & Outreach Manager of Computer Systems, (732)932-5071 ______________________________________________________ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: White space control when format, Mike Brown | Thread | Looking for good links, Wayne Davis |
RE: Which engine? (RE: JavaScript a, Kaganovich, Yevgeniy | Date | Re: SUMMARY: Re: Sorting on a varia, John E. Simpson |
Month |