Subject: testing for existence of variables? From: Matthew Haughey <matt@xxxxxxxxxxx> Date: Tue, 20 Jun 2000 12:33:27 -0700
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
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
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?