Solved

using parenthesis in xslt

Posted on 2008-06-19
1
305 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Visitor to Web site (Log showing Strange IP Address) 9 133
two submit buttons one form 15 116
removing a class in javascript 4 97
Code Coverage and Coding Standards 2 82
When you work with shopping cart / ecommerce relates web sites, you need to pass the certain form post details to the payment gateway process page with required details for the products items you give to order. Also you may need to track the ordered…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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…

710 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