Re: [xsl] Using <xsp:expr> into an attribute

Subject: Re: [xsl] Using <xsp:expr> into an attribute
From: Alessio Mazzieri <mazzieri@xxxxxxxxxxx>
Date: Mon, 26 Nov 2001 12:50:57 +0100
Excuse me for the previous mail.

In fact, it was enough to use <xsp:attribute> instead <xsl:attribute>.

Alessio Mazzieri

Alessio Mazzieri wrote:

Hi to all.
I've this XML document (home.xml)

<?xml version="1.0"?>
<?cocoon-disable-caching ?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="templates/home.xsl" type="text/xsl"?>
<xsp:page language="java"

The XSP page process some DB Tables and populate the XML document with some nodes. In one node, I need to specify an attribute, with this code:

  <xsl:attribute name="day">

But the generated XML document contanins explicitly
  <xsl:attribute name="day">

and not, as I want,

<news day="2001-11-26"/>

I've tried with

 <news day="<xsp:expr>dateFormatter.format(todayLog)</xsp:expr>"/>

but this give me an error because I can't use "<" into the day attribute.
Any solution?


XSL-List info and archive:

XSL-List info and archive:

Current Thread