Solved

using parenthesis in xslt

Posted on 2008-06-19
1
299 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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Removing Flash from Website 6 65
Element alignment and word wrapping 9 71
Re-position the objects 7 110
Create animated movies for web page 18 48
Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
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)

832 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