Re: [xsl] using different templates

Subject: Re: [xsl] using different templates
From: Joerg Heinicke <joerg.heinicke@xxxxxx>
Date: Tue, 03 Dec 2002 19:51:22 +0100
Hello Madhavi,

your problem is really unspecified.

Madhavi Thottempudi wrote:
Hi there!
I am having a mainMenu.xsl page which gets accessed from two links
1. login
2. redirect

You can't "access" an XSL. Please reformulate this. Do you create a HTML page from an XML structure using mainMenu.xsl? Can you show some XML code?


When I login successfuly, at server side I create an xml document called - login
Some variables - x & y in mainMenu.xsl will be populated through "login".


At some pages I do redirect - I create an xml document called - redirect
And again the same variables - x & y (as in above case) will be populated through "redirect".


I did this and it didn't work...
  <xsl:template match="/">
     <xsl:variable  name = "sName">
    <xsl:value-of select="./uSession/sName"/>
     </xsl:variable>

Should be <xsl:variable name="sName" select="uSession/sName"/>.


'./' does nothing. And the code you wrote creates a Result Tree Fragment (http://www.w3.org/TR/xslt#section-Result-Tree-Fragments), which on the one hand must be converted to a string and on the other hand it's not accessible like a node set.

     <xsl:variable  name = "sid">
    <xsl:value-of select="./uSession/sid"/>
     </xsl:variable>
  </xsl:template>

I can't go for having same name for the document beacuse this type of overlap happens with other pages too.
how can i achieve this?? Any suggestions will be of great help.

Sorry, that I can't help you. Please repost your problem in other words.


Regards,

Joerg


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread