luvtitans50
MIS
I have the below scenario:
RA......
RE......
RW......
All my RW information lists and then my
RS....
This is what I need the file to print out as
RA....
RE....
RW....
RS....
RW....
RS....
I need the RS row to follow after the RW row? How can I acheive this?
Both RS and RW are in 2 separate XSLT files. I need to merge the 2 so that they print out as indicated above?
Below is my RW code:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl=" xmlns:ms="urn:schemas-microsoft-com:xslt"
xmlns:date=" extension-element-prefixes="date">
<xslutput method="text" />
<xsl:decimal-format name="us" decimal-separator="." grouping-separator=","/>
<!-- Parameters -->
<xslaram name="Char"> </xslaram>
<xslaram name="newline"><xsl:text>
</xsl:text></xslaram>
<!-- Template Matching -->
<xsl:template match="/">
<xsl:for-each select="NewDataSet/Table">
<xsl:text>RW</xsl:text>
<xsl:value-of select="substring(SocSecNo,1,9)" />
<xsl:call-template name="fillSpace">
<xsl:with-param name="Cnt" select="9 - string-length(SocSecNo)" />
<xsl:with-param name="Char" select="0"/>
</xsl:call-template>
<xsl:value-of select="substring(firstname,1,15)" />
<xsl:call-template name="fillSpace">
<xsl:with-param name="Cnt" select="15 - string-length(substring(firstname,1,15))" />
<xsl:with-param name="Char" select="' '"/>
</xsl:call-template>
<xsl:value-of select="substring(middlename,1,15)" />
<xsl:call-template name="fillSpace">
<xsl:with-param name="Cnt" select="15 - string-length(substring(middlename,1,15))" />
<xsl:with-param name="Char" select="' '"/>
</xsl:call-template>
<xsl:value-of select="substring(lastname,1,20)" />
<xsl:call-template name="fillSpace">
<xsl:with-param name="Cnt" select="20 - string-length(substring(lastname,1,20))" />
<xsl:with-param name="Char" select="' '"/>
</xsl:call-template>
<xsl:value-of select="$newline"/>
</xsl:for-each>
</xsl:template>
<!-- Custom template to support fixed-width column formatting -->
<xsl:template name="fillSpace">
<xslaram name="Cnt"/>
<xslaram name="Char"/>
<xsl:if test="$Cnt > 0"><xsl:value-of select="$Char"/></xsl:if>
<xsl:if test="$Cnt > 1">
<xsl:call-template name="fillSpace">
<xsl:with-param name="Cnt" select="$Cnt - 1"/>
<xsl:with-param name="Char" select="$Char"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
Below is my RS code:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl=" xmlns:ms="urn:schemas-microsoft-com:xslt"
xmlns:date=" extension-element-prefixes="date">
<xslutput method="text" />
<xsl:decimal-format name="us" decimal-separator="." grouping-separator=","/>
<!-- Parameters -->
<xslaram name="Char"> </xslaram>
<xslaram name="newline"><xsl:text>
</xsl:text></xslaram>
<!-- Template Matching -->
<xsl:template match="/">
<xsl:for-each select="NewDataSet/Table">
<xsl:text>RS</xsl:text>
<xsl:text>55</xsl:text>
<!-- State Taxable Wages -->
<xsl:call-template name="fillSpace">
<xsl:with-param name="Cnt" select="11 - string-length(translate(StateWages,'\.',''))" />
<xsl:with-param name="Char" select="0"/>
</xsl:call-template>
<xsl:value-of select="translate(StateWages,'\.','') " />
<!-- State Income Tax Withheld -->
<xsl:call-template name="fillSpace">
<xsl:with-param name="Cnt" select="11 - string-length(translate(StateTax,'\.',''))" />
<xsl:with-param name="Char" select="0"/>
</xsl:call-template>
<xsl:value-of select="translate(StateTax,'\.','') " />
<xsl:call-template name="fillSpace">
<xsl:with-param name="Cnt" select="215" />
<xsl:with-param name="Char" select="' '"/>
</xsl:call-template>
<xsl:value-of select="$newline"/>
</xsl:for-each>
</xsl:template>
<!-- Custom template to support fixed-width column formatting -->
<xsl:template name="fillSpace">
<xslaram name="Cnt"/>
<xslaram name="Char"/>
<xsl:if test="$Cnt > 0"><xsl:value-of select="$Char"/></xsl:if>
<xsl:if test="$Cnt > 1">
<xsl:call-template name="fillSpace">
<xsl:with-param name="Cnt" select="$Cnt - 1"/>
<xsl:with-param name="Char" select="$Char"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
Any help on merging the 2 is GREATLY appreciated!!!
RA......
RE......
RW......
All my RW information lists and then my
RS....
This is what I need the file to print out as
RA....
RE....
RW....
RS....
RW....
RS....
I need the RS row to follow after the RW row? How can I acheive this?
Both RS and RW are in 2 separate XSLT files. I need to merge the 2 so that they print out as indicated above?
Below is my RW code:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl=" xmlns:ms="urn:schemas-microsoft-com:xslt"
xmlns:date=" extension-element-prefixes="date">
<xslutput method="text" />
<xsl:decimal-format name="us" decimal-separator="." grouping-separator=","/>
<!-- Parameters -->
<xslaram name="Char"> </xslaram>
<xslaram name="newline"><xsl:text>
</xsl:text></xslaram>
<!-- Template Matching -->
<xsl:template match="/">
<xsl:for-each select="NewDataSet/Table">
<xsl:text>RW</xsl:text>
<xsl:value-of select="substring(SocSecNo,1,9)" />
<xsl:call-template name="fillSpace">
<xsl:with-param name="Cnt" select="9 - string-length(SocSecNo)" />
<xsl:with-param name="Char" select="0"/>
</xsl:call-template>
<xsl:value-of select="substring(firstname,1,15)" />
<xsl:call-template name="fillSpace">
<xsl:with-param name="Cnt" select="15 - string-length(substring(firstname,1,15))" />
<xsl:with-param name="Char" select="' '"/>
</xsl:call-template>
<xsl:value-of select="substring(middlename,1,15)" />
<xsl:call-template name="fillSpace">
<xsl:with-param name="Cnt" select="15 - string-length(substring(middlename,1,15))" />
<xsl:with-param name="Char" select="' '"/>
</xsl:call-template>
<xsl:value-of select="substring(lastname,1,20)" />
<xsl:call-template name="fillSpace">
<xsl:with-param name="Cnt" select="20 - string-length(substring(lastname,1,20))" />
<xsl:with-param name="Char" select="' '"/>
</xsl:call-template>
<xsl:value-of select="$newline"/>
</xsl:for-each>
</xsl:template>
<!-- Custom template to support fixed-width column formatting -->
<xsl:template name="fillSpace">
<xslaram name="Cnt"/>
<xslaram name="Char"/>
<xsl:if test="$Cnt > 0"><xsl:value-of select="$Char"/></xsl:if>
<xsl:if test="$Cnt > 1">
<xsl:call-template name="fillSpace">
<xsl:with-param name="Cnt" select="$Cnt - 1"/>
<xsl:with-param name="Char" select="$Char"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
Below is my RS code:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl=" xmlns:ms="urn:schemas-microsoft-com:xslt"
xmlns:date=" extension-element-prefixes="date">
<xslutput method="text" />
<xsl:decimal-format name="us" decimal-separator="." grouping-separator=","/>
<!-- Parameters -->
<xslaram name="Char"> </xslaram>
<xslaram name="newline"><xsl:text>
</xsl:text></xslaram>
<!-- Template Matching -->
<xsl:template match="/">
<xsl:for-each select="NewDataSet/Table">
<xsl:text>RS</xsl:text>
<xsl:text>55</xsl:text>
<!-- State Taxable Wages -->
<xsl:call-template name="fillSpace">
<xsl:with-param name="Cnt" select="11 - string-length(translate(StateWages,'\.',''))" />
<xsl:with-param name="Char" select="0"/>
</xsl:call-template>
<xsl:value-of select="translate(StateWages,'\.','') " />
<!-- State Income Tax Withheld -->
<xsl:call-template name="fillSpace">
<xsl:with-param name="Cnt" select="11 - string-length(translate(StateTax,'\.',''))" />
<xsl:with-param name="Char" select="0"/>
</xsl:call-template>
<xsl:value-of select="translate(StateTax,'\.','') " />
<xsl:call-template name="fillSpace">
<xsl:with-param name="Cnt" select="215" />
<xsl:with-param name="Char" select="' '"/>
</xsl:call-template>
<xsl:value-of select="$newline"/>
</xsl:for-each>
</xsl:template>
<!-- Custom template to support fixed-width column formatting -->
<xsl:template name="fillSpace">
<xslaram name="Cnt"/>
<xslaram name="Char"/>
<xsl:if test="$Cnt > 0"><xsl:value-of select="$Char"/></xsl:if>
<xsl:if test="$Cnt > 1">
<xsl:call-template name="fillSpace">
<xsl:with-param name="Cnt" select="$Cnt - 1"/>
<xsl:with-param name="Char" select="$Char"/>
</xsl:call-template>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
Any help on merging the 2 is GREATLY appreciated!!!