xsl-list
[Top] [All Lists]

RE: generation of flat file from XSL

2003-10-13 09:39:29
I have worked on generation of a flat file from xml using 
XSL. I have used  select:value-of for the data and xsl:text 
to put the commas in the flat file.


Could some body let me know if the flat file can be generated 
as  a fixed field length file and 
the necessary options xsl has.

It can, but you need to do more work. Write a template like:

<xsl:template name="pad">
<xsl:param name="value"/>
<xsl:param name="size"/>
<xsl:variable name="spaces"
 select="'                                            '"/>
<xsl:value-of select="substring(concat($value, $spaces), 1, $size)"/>
</xsl:template>

Michael Kay
   


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



<Prev in Thread] Current Thread [Next in Thread>