xsl usage question

Discussion in 'XML' started by ramc8191@rediffmail.com, Nov 19, 2005.

  1. Guest

    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 19, 2005
    #1
    1. Advertising

  2. Read about the

    xsl:param

    instruction


    Cheers,
    Dimitre Novatchev


    <> wrote in message
    news:...
    >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.
    >
    Dimitre Novatchev, Nov 19, 2005
    #2
    1. Advertising

  3. Peter Flynn Guest

    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
    Peter Flynn, Nov 20, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. metfan
    Replies:
    2
    Views:
    4,837
    Robert Olofsson
    Oct 21, 2003
  2. Vijay singh
    Replies:
    1
    Views:
    430
    Martin Honnen
    Nov 4, 2004
  3. Replies:
    1
    Views:
    3,591
    A. Bolmarcich
    May 27, 2005
  4. Colin J. Williams

    Webchecker Usage - a problem with local usage

    Colin J. Williams, Feb 25, 2004, in forum: Python
    Replies:
    1
    Views:
    525
    Colin J. Williams
    Feb 26, 2004
  5. hvt
    Replies:
    0
    Views:
    1,197
Loading...

Share This Page