473,406 Members | 2,208 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,406 software developers and data experts.

xsl usage question

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.

Nov 23 '05 #1
2 1024
Read about the

xsl:param

instruction
Cheers,
Dimitre Novatchev
<ra******@rediffmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
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.

Nov 23 '05 #2
ra******@rediffmail.com wrote:
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

Nov 23 '05 #3

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

Similar topics

3
by: Ian Taite | last post by:
Hello, I'm exploring why one of my C# .NET apps has "high" memory usage, and whether I can reduce the memory usage. I have an app that wakes up and processes text files into a database...
3
by: Dan | last post by:
First, I'm sorry if this question has been asked too many times. I'm new to this news group. The question has to do with the use of popup windows in a web page. I have heard that popup windows...
0
by: Clemens Hintze | last post by:
Hello, I have a question concerning the usage of default constructed std::slice instances. Our company currently validate the GNU-G++ 3.4 compiler against the ISO/IEC 14882:2003 standard for...
3
by: Ian Taite | last post by:
Hello, I'm exploring why one of my C# .NET apps has "high" memory usage, and whether I can reduce the memory usage. I have an app that wakes up and processes text files into a database...
26
by: rao | last post by:
On some of the compilers integer size is 2 and on some other it is 4 bytes. My doubt is who decides the size of the integer? is it plainly the compiler? Does OS or Processor also has any control...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.