[xsl] Variables and Values

Subject: [xsl] Variables and Values
From: Julian Voelcker <asp@xxxxxxx>
Date: Tue, 23 Mar 2004 17:48:59 GMT
I am trying to replicate some programming logic in my template along 
the following lines:

1. The XML file holds data from a questionnaire.
2. At the beginning of a template I want to test to see if a particular 
question has been answered - if it has it will either be true or false 
- if it hasn't been answered there will be no value.
3. If it hasn't been given a value, I will want to give it one.
4. Further down the template I will want to use the value to determine 
the formatting of content.

OK, now I have been doing some reading on variables and believe the 
that the only way to deal with this is as follows:-
1. Check the XML file to see if the question has been answered and if 
is has, create a variable in the template to hold the value.
2. If the question hasn't been answered, also create the variable and 
give a value.
3. From then on in the document, work from the variable, not the value 
in the XML file.

Does this make sense?

Can you see any pitfalls to this?

-- 
Cheers,

Julian Voelcker
United Kingdom

Current Thread