xsl usage question

R

ramc8191

I am working on a small project and have been experimenting with xml as
the data store. It does make certain things extremely simple, but being
new to this am not sure of its potential or of its suitability in
solving my particular problem

This is the issue:
My xml file is pretty simple and has the following structure.

<note>
<tag></tag> <<<< there can be more than one tag
<question></question>
<answer></answer>
</note>

I use xsl to convert this to html. What I want to do is transform the
tag elements to hyperlinks. When the user clicks the link, he gets only
the questions associated with that particular tag.

This could be done by modifying the appropriate xsl:value-of
select="[tag=$choice]" in the xsl file. If I define such a variable
choice with xsl:variable is it possible to set this dynamically? From
what I get so far, such a mechanism isnt available. The xsl file would
require to be modified and restored depending on users actions. It
would have to be able to 'recieve' the users choice.
Any ideas on how I could do this?
Thanks.
 
P

Peter Flynn

I am working on a small project and have been experimenting with xml
as the data store. It does make certain things extremely simple, but
being new to this am not sure of its potential or of its suitability
in solving my particular problem

This is the issue:
My xml file is pretty simple and has the following structure.

<note>
<tag></tag> <<<< there can be more than one tag

Element. See http://xml.silmaril.ie/authors/makeup/
<question></question>
<answer></answer>
</note>

I use xsl to convert this to html. What I want to do is transform the
tag elements to hyperlinks. When the user clicks the link, he gets
only the questions associated with that particular tag.

This could be done by modifying the appropriate xsl:value-of
select="[tag=$choice]" in the xsl file. If I define such a variable
choice with xsl:variable is it possible to set this dynamically? From
what I get so far, such a mechanism isnt available. The xsl file would
require to be modified and restored depending on users actions. It
would have to be able to 'recieve' the users choice.

See http://www.w3.org/TR/xslt#top-level-variables under "Parameters".

///Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top