Subject: RE: [xsl] XSL stylesheet syntax help From: Haydn Flower <Haydn.Flower@xxxxxxxxxxx> Date: Wed, 3 Dec 2003 13:59:07 -0000 |
Im using XML Spy and it says In here <xsl:choose> <xsl:when test="<xsl:value-of select="InputType"/>='S'"> <td>X</td> </xsl:when> <xsl:otherwise> <td><xsl:text> </xsl:text></td> </xsl:otherwise> </xsl:choose> you can't have that in your test statement I'm not sure what you do want in there however -----Original Message----- From: dan@xxxxxxxxxxxxxxx [mailto:dan@xxxxxxxxxxxxxxx] Sent: 03 December 2003 13:48 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx 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> </xsl:text></td> <td><xsl:value-of select="Module"/><xsl:text> </xsl:text></td> <xsl:choose> <xsl:when test="{$sMethod}='Product'"> <td><xsl:value-of select="IacDemo"/><xsl:text> </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> </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> </xsl:text></td> <td><xsl:value-of select="DSLFlag"/><xsl:text> </xsl:text></td> </xsl:when> <xsl:otherwise> <td><xsl:value-of select="ResignFlag"/><xsl:text> </xsl:text></td> <td><xsl:value-of select="StrategicFlag"/><xsl:text> </xsl:text></td> </xsl:otherwise> </xsl:choose> </xsl:when> </xsl:choose> <td><xsl:value-of select="ApprovedForCompensationFlag"/><xsl:text> </xsl:text></td> <td><xsl:value-of select="JobPositionCategoryCode"/><xsl:text> </xsl:text></td> <xsl:choose> <xsl:when test="{$sMethod}='Product'"> <td><xsl:value-of select="ProductCode"/><xsl:text> </xsl:text></td> </xsl:when> <xsl:otherwise> <td><xsl:text> </xsl:text></td> </xsl:otherwise> </xsl:choose> <td><xsl:value-of select="Client"/><xsl:text> </xsl:text></td> <td><xsl:value-of select="CurAnnualValue"/><xsl:text> </xsl:text></td> <td><xsl:value-of select="CurQuotaValue"/><xsl:text> </xsl:text></td> <td><xsl:value-of select="ActualSaleDate_f"/><xsl:text> </xsl:text></td> <td NOWRAP></td> <td><xsl:value-of select="ActualInstDate"/><xsl:text> </xsl:text></td> <td><xsl:value-of select="EstInstDate"/><xsl:text> </xsl:text></td> <td>{$sSubsidiaryTieCode}</td> <td><xsl:value-of select="ChangeDate_f"/><xsl:text> </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@xxxxxxxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list ******************************************************* This email has originated from Perwill plc (Registration No. 1906964) Office registered at: 13A Market Square, Alton, Hampshire, GU34 1UR, UK Tel: +44 (0)1420 545000 Fax: +44 (0)1420 545001 www.perwill.com ******************************************************* Privileged, confidential and/or copyright information may be contained in this email, and is only for the use of the intended addressee. To copy, forward, disclose or otherwise use it in any way if you are not the intended recipient or responsible for delivering to him/her is prohibited. If you receive this email by mistake, please advise the sender immediately, by using the reply facility in your email software. We may monitor the content of emails sent and received via our network for the purposes of ensuring compliance with policies and procedures. This message is subject to and does not create or vary any contractual relationships between Perwill plc and the recipient. ******************************************************* Any opinions expressed in the email are those of the sender and not necessarily of Perwill plc. ******************************************************* This email has been scanned for known viruses using Sophos MailMonitor ******************************************************* XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSL stylesheet syntax hel, Peter Hickman | Thread | [xsl] Strange Sorting Problem, CBeach |
[xsl] XSL stylesheet syntax help, dan | Date | Re: [xsl] XSL stylesheet syntax hel, andrew . curry |
Month |