473,320 Members | 2,189 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

variabili in xslt

ciao, ho bisogno di definire una variabile in xslt in modo tale in modo
tale da poterla usare in un ciclo for-each assegnandole di volota in
volta un differente valore..

é possibile fare qualcosa del genere?

in particolare il codice che sto sviluppando (giusto per darvi un'idea)
é
<xsl:for-each select="Files/Filename">
<img src="minusonly.gif" border="0" /><img alt="open"
src="acrobat.gif" />
<p id="{.}" class="files">
<a>
<xsl:attribute name="href">
javascript:void(parent.Showfile1(<xsl:value-of
select="substring-after(.,'\\')"/>));
</xsl:attribute>
<xsl:value-of select="substring-after(.,'\\')"/>
</a>
</p><br />
</xsl:for-each>

Al posto di <xsl:value-of select="substring-after(.,'\\')"/> vorrei
poter usare una variabile tipo $variable..
é possibile? (é che se no sembra nn funzionare nulla..)

grazie mille!

Dec 12 '05 #1
2 2572
purtroppo nn e' possibile...una volta assegnato un valore ad una variabile
quello e' e rimane (a meno che non la dichiari in due blocchi differenti che
non hanno intersezioni di scoping). I parametri da passare ai template
possono fare al caso tuo.

ciao
<te*********@tiscali.it> ha scritto nel messaggio
news:11*********************@g49g2000cwa.googlegro ups.com...
ciao, ho bisogno di definire una variabile in xslt in modo tale in modo
tale da poterla usare in un ciclo for-each assegnandole di volota in
volta un differente valore..

é possibile fare qualcosa del genere?

in particolare il codice che sto sviluppando (giusto per darvi un'idea)
é
<xsl:for-each select="Files/Filename">
<img src="minusonly.gif" border="0" /><img alt="open"
src="acrobat.gif" />
<p id="{.}" class="files">
<a>
<xsl:attribute name="href">
javascript:void(parent.Showfile1(<xsl:value-of
select="substring-after(.,'\\')"/>));
</xsl:attribute>
<xsl:value-of select="substring-after(.,'\\')"/>
</a>
</p><br />
</xsl:for-each>

Al posto di <xsl:value-of select="substring-after(.,'\\')"/> vorrei
poter usare una variabile tipo $variable..
é possibile? (é che se no sembra nn funzionare nulla..)

grazie mille!
Dec 14 '05 #2
ti ringrazio comunque per la tua risposta!
teo

Dec 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: ted | last post by:
Was wondering if XSLT alone is appropriate for the following situation. From XML, I'm creating a small website (around 50 pages) with pages that link to each other through a nav menu and a...
2
by: Tom Corcoran | last post by:
I am working to ease updating of a html page by transforming 2 xml files. I was going to use xslt for this and had bought 2 unopened books, wrox xslt and o'reilly's xslt cookbook. But am now...
1
by: Mohit | last post by:
Hi Friends I have to call 1 of the 2 child XSLT files from the Main XSLT file based on some criteria. I want one child XSLT file will be executed by version 1 of XSLT processor and the other by...
3
by: Jack Fox | last post by:
I've never had the need to work with XML, but I believe I now have an appropriate application. I have time-series data in objects organized as a tree that I want an ASP.NET program to write out to...
3
by: Teksure | last post by:
Hi group, searching in the Internet I found two products for XML which incorporate a very robust debugger for XSL/XSLT, I would like you to see these products and then, give me your opinion about...
3
by: Ian Roddis | last post by:
Hello, I want to embed SQL type queries within an XML data record. The XML looks something like this: <DISPLAYPAGE> <FIELD NAME="SERVER" TYPE="DROPDOWN"> <OPTION>1<OPTION> <OPTION>2<OPTION>...
1
by: Sergey Dubinets | last post by:
In effort to prioritize our goals we composed the list of random features each of them may add value to set of XSLT tools offered from Microsoft. 1. XSLTc (Compiler for XSLT...
12
by: Chris | last post by:
Hi, Just wondering if anyone out there knows if it is possible to convert a CSV to xml using XSLT? I've seen a lot of examples of xml to CSV, but is it possible to go back the other way? I...
2
jkmyoung
by: jkmyoung | last post by:
Here's a short list of useful xslt general tricks that aren't taught at w3schools. Attribute Value Template Official W3C explanation and example This is when you want to put dynamic values...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.