Questions tagged [xsl-variable]
22 questions
20
votes
3 answers
Print out value of XSL variable using
I'm trying to output a variable's literal string value, after it is being set depending on whether a node exists or not. I think the condition check logic is correct. But it is not outputing the values...

tomato
- 5,644
- 13
- 43
- 48
12
votes
1 answer
can we insert HTML tags in XSL Variable
I just want to confirm whether we can insert html tags inside the xsl variable?
example
hiiii
if i use
I shoud…

Ironman
- 556
- 3
- 7
- 21
4
votes
3 answers
Overwrite the variable in xsl
I just need to overwrite the variable in xsl
Example:
x=0
if x=0
then
x=3
I need to change the value of variable.
I am very new to xsl, please help me how to achieve this. This may be silly but I don't have any idea..

Ironman
- 556
- 3
- 7
- 21
3
votes
1 answer
Find the element with the highest valence in xml document
I have a XML-Structure like this:
FUNCTION
PressKey
FUNCTION
PressKey

Daniel
- 33
- 3
3
votes
1 answer
Using xsl:value-of in for-each loop over a xsl:variable
This is a sequel to the question in entry 25317199.
In the 25317199 post, the data has 2 blocks, i.e., Schools and FamilySmith. Data in FamilySmith is used as the key to retrieve the data in Schools.
Now, in this case, the data is split in that…

Bumblevee
- 69
- 1
- 5
3
votes
3 answers
Is xsl:sequence always non-empty?
I don't understand output from this stylesheet:

Peter Štibraný
- 32,463
- 16
- 90
- 116
3
votes
2 answers
xsl variable initialization, method doesn't get called
I'm new to xslt and have a question.
I have a validate class that contains all necessary setters and getters. For example it has such method:
public void setProducer(String producer) {
this.producer = producer;
…

Aliaksei Bulhak
- 6,078
- 8
- 45
- 75
1
vote
1 answer
how to supply stylesheet variable value from html or javascript
My issue is regarding rendering on client that uses xsl. This already works in IE but I want to make it work on firefox
First, the stylesheet (variablexsl.xsl) The only thing special here is the existence of

Sekhar
- 5,614
- 9
- 38
- 44
1
vote
2 answers
Store and use variable inside an XML file
Preamble
In the usecase I try to solve, I could have in each document different speakers (with different first names, last names, nicknames, honorific titles…). The information related to each speaker are not universal and should still related to an…

fauve
- 226
- 1
- 10
1
vote
2 answers
xsl:variable assignment clarification
My understanding is that is immutable and cannot be reassigned.
I am new to XSL and came across a situation like what is in the example below.

hungerstar
- 21,206
- 6
- 50
- 59
1
vote
1 answer
XSLT How to select node attribute value with xsl:for-each and xsl:if
I have an XML file to render with XSLT 1.0.
My cas is the following :
If value of longName is "Oui_Combi"
$Publication = prodDate value (21.11.2018)
else
$Publication = productionDates value (17.11.2018, 21.11.2018)
I'm not sur my syntax is…

Meloman
- 3,558
- 3
- 41
- 51
1
vote
1 answer
How to handle with arrays within different loops in XSLT
I have a problem with processing following xml code:
Column1
TEXT
Column2
…

Jan Stanicek
- 1,201
- 1
- 14
- 30
0
votes
1 answer
xslt 1.0 get data from dynamic node-set in variable
A variable is being used to store related record information
The variable has been updated to dynamically select, depending on results of a match,
eg
…

Jonny Hotchkiss
- 33
- 5
0
votes
1 answer
Generat new nodes at XSLT file with loop and variables
Need your help. I have some XML file with data before the transformation.
book
200
1
And I have…
0
votes
1 answer
Using xsl:variable to set another variable using xsl:choose -> Invalid property
I'm trying to define some standard colours to use elsewhere in an XSLT, but the following gives an error:

Dave The Dane
- 650
- 1
- 7
- 18