Print Page | Close Window

ASP & XSL & XML

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=30204
Printed Date: 29 March 2026 at 1:29pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: ASP & XSL & XML
Posted By: dwhite02
Subject: ASP & XSL & XML
Date Posted: 06 March 2012 at 12:40am

I'm using some classic ASP and XSLT to select records from an XML file.

Can someone please show me how to modify the xsl below to return a statement of "no records found" if there is no matches for for the xsl:when query?

Thanks.

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<xsl:template match="rss/channel">
<xsl:apply-templates select="item">
<xsl:sort order="ascending" select="title"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="item">
<xsl:choose>
<xsl:when test="alpha='d'">
<a href="{link}"><xsl:value-of select="title" /></a>
</xsl:when>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net