[xsl] re: how to get variable value outside scope

Subject: [xsl] re: how to get variable value outside scope
From: "Brian Phelps" <bphelps@xxxxxxxxxxx>
Date: Sun, 27 Feb 2005 01:32:37 -0800
Thanks for the several comments. I'll try to figure out if I should get
rid of all of the d-o-e as you say. I inherited this application from
several previous individuals, and it only has a shelf-life of about one
more year, when we'll replace it with something more robust. 

In case my previous missive was unclear, the value for the variable
"category" is available within the scope of 

  <xsl:for-each select="news_post">

but I need to write out the value for 'category' after the for-each loop
is completed. I'll try the xsl:with-param suggestion.

As to why the compiler doesn't complain on this construction:

  <xsl:if test="count(news_post) &lt; 3">

which the compiler should have thrown out: the only things allowed
xsl:choose are xsl:when and xsl:otherwise.

I don't know why the compiler is not throwing an error. The application
and XSLT code is 3 or 4 years old. I am not a programmer by training,
but a web site developer and writer. I am trying to kludge something
workable to meet a pressing need with the existing application. Thanks
for your advice!

Brian Phelps

Web Manager
Marketing and University Relations
(209) 946-3273 PST

For current web site updates, stay informed:

AIM/Yahoo IM: btphelps
icq: 221376

University of the Pacific
Stockton, CA

Current Thread