Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Ansi Unix

From: "foobar" <esuey@-------------.--->
To: NULL
Date: 8/4/2005 9:23:00 AM
Oops.  <xsl:text>&#xa;</xsl:text> should be <xsl:text>&#xd;&#xa;</xsl:text>. 
That is CR LF.  Sorry for the post.
"foobar" <esuey@i...> wrote in message 
news:eAK9QNHmFHA.2156@T......
> I'm exporting data from database to a fixed width text file.
>
> Here is the process:
>
>    Get the data from the database into a dataset.
>
>    Apply a xslt transform to xml in dataset
>
>    Write the string to a file.
>
>
>
> When viewing the file using TextPad the file type = Unix and the Code set 
> = ansi.
>
> I want the file type to equal PC.  I don't know why it is unix.
>
>
>
> I have tried converting the encoding to ASCII but I don't think that is 
> where the problem is and it doesn't help anyway.
>
>
>
> Any help will be greatly appreciated.
>
> Here is the xslt transform:
>
>
>
> <!DOCTYPE root [
>  <!ELEMENT COLUMN_DATA ANY>
>  <!ATTLIST COLUMN_DATA SSN ID #REQUIRED>
> ]>
> <xsl:stylesheet version="1.0" 
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:output method="text" encoding="8859-1"/>
> <xsl:preserve-space elements="*" />
>
> <xsl:template match="Table">
>
>  <xsl:apply-templates  select="Client_Number"/>
>
>  <xsl:apply-templates  select="Filler_0"/>
>
>  <xsl:apply-templates  select="Name"/>
>
>  <xsl:apply-templates  select="Optional"/>
>
>  <xsl:apply-templates  select="Address"/>
>
>  <xsl:apply-templates  select="City"/>
>
>  <xsl:apply-templates  select="State"/>
>
>  <xsl:apply-templates  select="Zip"/>
>
>  <xsl:apply-templates  select="Service"/>
>
>  <xsl:apply-templates  select="Transmittal_Number"/>
>
>  <xsl:apply-templates  select="Filler_1"/>
>
>  <xsl:apply-templates  select="Debtor_Reference"/>
>
>  <xsl:apply-templates  select="LastDepositDate"/>
>
>  <xsl:apply-templates  select="AccountBalance"/>
>
>  <xsl:apply-templates  select="Filler_2"/>
>
> <xsl:text>&#xa;</xsl:text>
> </xsl:template>
>
> <xsl:template  match="Client_Number">
> <xsl:value-of  select='substring(concat(.,"     "), 1, 5)'/>
> </xsl:template>
>
> <xsl:template  match="Filler_0">
> <xsl:value-of  select='substring(concat(.,"   "), 1, 3)'/>
> </xsl:template>
>
> <xsl:template  match="Name">
> <xsl:value-of  select='substring(concat(.," "), 1, 30)'/>
> </xsl:template>
>
> <xsl:template  match="Optional">
> <xsl:value-of  select='substring(concat(.," "), 1, 30)'/>
> </xsl:template>
>
> <xsl:template  match="Address">
> <xsl:value-of  select='substring(concat(.," "), 1, 30)'/>
> </xsl:template>
>
> <xsl:template  match="City">
> <xsl:value-of  select='substring(concat(.,"               "), 1, 15)'/>
> </xsl:template>
>
> <xsl:template  match="State">
> <xsl:value-of  select='substring(concat(.,"  "), 1, 2)'/>
> </xsl:template>
>
> <xsl:template  match="Zip">
> <xsl:value-of  select='substring(concat(.,"     "), 1, 5)'/>
> </xsl:template>
>
> <xsl:template  match="Service">
> <xsl:value-of  select='substring(concat(.," "), 1, 1)'/>
> </xsl:template>
>
> <xsl:template  match="Transmittal_Number">
> <xsl:value-of  select='substring(concat(.,"          "), 1, 10)'/>
> </xsl:template>
>
> <xsl:template  match="Filler_1">
> <xsl:value-of  select='substring(concat(.," "), 1, 1)'/>
> </xsl:template>
>
> <xsl:template  match="Debtor_Reference">
> <xsl:value-of  select='substring(concat(.,"               "), 1, 15)'/>
> </xsl:template>
>
> <xsl:template  match="LastDepositDate">
> <xsl:value-of  select='substring(concat(.,"      "), 1, 6)'/>
> </xsl:template>
>
> <xsl:template  match="AccountBalance">
> <xsl:value-of  select='substring(concat(.,"        "), 1, 8)'/>
> </xsl:template>
>
> <xsl:template  match="Filler_2">
> <xsl:value-of  select='substring(concat(.,"         "), 1, 9)'/>
> </xsl:template>
>
>
> </xsl:stylesheet>
>
>
>
> 




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent