Solved

using parenthesis in xslt

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: Matthew
I am a very big proponent of technology compliance standards and strive to meet such criteria in all of my work. That includes my site, which is 100% XHTML 1.0 compliant as determined by the World Wide Web Consortium. https://www.matthewstevenkel…
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

707 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

14 Experts available now in Live!

Get 1:1 Help Now