Solved

using parenthesis in xslt

Posted on 2008-06-19
1
297 Views
Last Modified: 2013-11-18
i need to insert <xsl:number> is the link below but it doesn't work
<a href="flights.aspx?func={xsl:number}">nbr</a>  it wouldn't work fine
if i use <a href="flights.aspx?func={BAS_FAR}">nbr</a> it would work fine
below is the whole file

<?xml version='1.0'?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<html>
<body>
<xsl:for-each select="PSW5/ALT_INF">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse">
  <tr>
    <td>
    <table class="DisplayFare1" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%">
      <tr>
        <td width="25" height="23" align="center" class="FareNbr">
        <xsl:number /></td>
        <td><a href="flights.aspx?func={xsl:number}">nbr</a> </td>
        <td>Fare $<xsl:value-of select="BAS_FAR" /> </td>
        <td width="120">
        <xsl:value-of select="TAX" /></td>
        <td width="*">Total : $
        <xsl:value-of select="TTL_FAR" />Per Person </td>
      </tr>
    </table>
    </xsl:for-each>
    </td>
  </tr>
</table>
</xsl:for-each>
</body>
</html>
</xsl:template>
0
Comment
Question by:Nabilbahr
1 Comment
 
LVL 60

Accepted Solution

by:
Geert Bormans earned 250 total points
ID: 21825516
if you need xsl number there you will need xsl:attribute as well, xsl:number is not an XPath function, it is a xsl element
<a>
<xsl:attribute name="href">
<xsl:text>flights.aspx?func=</xsl:text>
<xsl:number/>
</xsl:attribute>
<xsl:text>nbr</xsl:text>
</a>
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

27 Experts available now in Live!

Get 1:1 Help Now