xsl-list
[Top] [All Lists]

Re: XSL stylesheet syntax help

2003-12-03 07:01:40
Yes
                   <xsl:when test="<xsl:value-of select="InputType"/>='S'">
Should be

                  <xsl:when test="@InputType='S'">

Also

<td NOWRAP></td> is not valid, not sure what you are trying to do here?








----- Original Message ----- 
From: <dan(_at_)theroadside(_dot_)org>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Wednesday, December 03, 2003 1:47 PM
Subject: [xsl] XSL stylesheet syntax help


Hey folks,

I have been trying to get the xsl document below to work for a few
days and am not having any luck.  I keep getting an error indicating
it is not a well formed xsl document.  I cannot find what I am doing
wrong so I am including the whole xsl in hopes that someone can explain
my mistake (possibly mistakes?).  Thanx in advance for any suggestions
you can offer.  Also, I have been using some websites to get the
basics of xsl, but as I have a lot of work to do in it now, I think I
need some better resources.  Is there a good website or book you all
recommend often for learning xslt from the ground up?


<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<!--Declare Variables -->
<xsl:param name="OrderedBy" select="''"/>
<xsl:param name="OrderedType" select="'ascending'"/>
<xsl:param name="gJobPositionGroupCode" select="''"/>
<xsl:param name="sMethod" select="''"/>
<xsl:param name="sSubsidiaryTieCode" select="''"/>

<xsl:template match="/">
      <xsl:for-each select="CCF/CCFNumber">
      <xsl:sort select="*[name()=$OrderedBy]" order="{$OrderedType}"
data-type="number"/>
      <tr>
            <td><xsl:value-of
select="CcfNumber"/><xsl:text>&#xA0;</xsl:text></td>
            <td><xsl:value-of
select="Module"/><xsl:text>&#xA0;</xsl:text></td>
            <xsl:choose>
                  <xsl:when test="{$sMethod}='Product'">
                        <td><xsl:value-of
select="IacDemo"/><xsl:text>&#xA0;</xsl:text></td>
                  </xsl:when>
            </xsl:choose>
            <xsl:choose>
                  <xsl:when test="<xsl:value-of select="InputType"/>='S'">
                        <td>X</td>
                  </xsl:when>
                  <xsl:otherwise>
                        <td><xsl:text>&#xA0;</xsl:text></td>
                  </xsl:otherwise>
            </xsl:choose>
            <xsl:choose>
                  <xsl:when test="{$sMethod}='Product'">
                        <xsl:choose>
                              <xsl:when
test="{$sISPFlagOfModule}='Product'">
                                    <td><xsl:value-of
select="ResignFlag"/><xsl:text>&#xA0;</xsl:text></td>
                                    <td><xsl:value-of
select="DSLFlag"/><xsl:text>&#xA0;</xsl:text></td>
                              </xsl:when>
                              <xsl:otherwise>
                                    <td><xsl:value-of
select="ResignFlag"/><xsl:text>&#xA0;</xsl:text></td>
                                    <td><xsl:value-of
select="StrategicFlag"/><xsl:text>&#xA0;</xsl:text></td>
                              </xsl:otherwise>
                        </xsl:choose>
                  </xsl:when>
            </xsl:choose>
            <td><xsl:value-of
select="ApprovedForCompensationFlag"/><xsl:text>&#xA0;</xsl:text></td>
            <td><xsl:value-of
select="JobPositionCategoryCode"/><xsl:text>&#xA0;</xsl:text></td>
            <xsl:choose>
                  <xsl:when test="{$sMethod}='Product'">
                        <td><xsl:value-of
select="ProductCode"/><xsl:text>&#xA0;</xsl:text></td>
                  </xsl:when>
                  <xsl:otherwise>
                        <td><xsl:text>&#xA0;</xsl:text></td>
                  </xsl:otherwise>
            </xsl:choose>
            <td><xsl:value-of
select="Client"/><xsl:text>&#xA0;</xsl:text></td>
            <td><xsl:value-of
select="CurAnnualValue"/><xsl:text>&#xA0;</xsl:text></td>
            <td><xsl:value-of
select="CurQuotaValue"/><xsl:text>&#xA0;</xsl:text></td>
            <td><xsl:value-of
select="ActualSaleDate_f"/><xsl:text>&#xA0;</xsl:text></td>
            <td NOWRAP></td>
            <td><xsl:value-of
select="ActualInstDate"/><xsl:text>&#xA0;</xsl:text></td>
            <td><xsl:value-of
select="EstInstDate"/><xsl:text>&#xA0;</xsl:text></td>
            <td>{$sSubsidiaryTieCode}</td>
            <td><xsl:value-of
select="ChangeDate_f"/><xsl:text>&#xA0;</xsl:text></td>
      </tr>
      </xsl:for-each>
      <tr>
            <td colspan="20" border="0"><xsl:value-of
select="count(ServiceOrder)"/></td>
      </tr>
</xsl:template></xsl:stylesheet>



-- 
Thanx,
 dan                          mailto:dan(_at_)theroadside(_dot_)org



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



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



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