Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

using parenthesis in xslt

Posted on 2008-06-19
1
Medium Priority
?
320 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 1000 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

It's sometimes a bit tricky to use date functions in Oracle BPEL. I'll explain quickly how you can add N days to the current date. In a BPEL process this can be useful, and you can adapt it to fit your needs. First of all, let's see how to add 1 …
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
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…
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…

721 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