This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

testing for existence of variables?


I'm building up a discussion forum in XML & XSL and was wondering about the 
limits of XSL, and where I should separate the scripting in XSL from the 
scripting in the server-side language I'm using for the site (ASP in this 
case).

The XML content file will be dynamically generated, and if the visitor to 
the site has a cookie with their ID, the XML file will contain their user 
information in addition to the page content (it will look like this 
<user><id>1234</id></user>).

When I transform the content with XSL, I'd like to display a form field for 
posting comments to logged in users, and if they are not logged in, display 
a "login here" link.

What I want to know is, can I check for the existence of the <user> 
information and display some HTML if it exists, and otherwise present 
alternate HTML? Or should this check be done on the server side in the 
scripting layer instead?

Matt


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]