This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
testing for existence of variables?
- To: xsl-list at mulberrytech dot com
- Subject: testing for existence of variables?
- From: Matthew Haughey <matt at haughey dot com>
- Date: Tue, 20 Jun 2000 12:33:27 -0700
- Reply-To: xsl-list at mulberrytech dot com
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