cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Barth" <>
Subject RE: XSL-Problem. I can't find the error
Date Mon, 16 Jan 2006 12:38:13 GMT
> -----Original Message-----
> From: Geert Josten [] 
> Sent: Monday, January 16, 2006 12:42 PM
> To:
> Subject: Re: XSL-Problem. I can't find the error
> Hi,
> It is a bit confusing that you are referring to XSP pages as 
> .xsl files. 

Well, that's right. Maybe I'll change it.

> Apart from that, your snippet looks okay on first 
> impression. You are passing {request-param:typ} as a 
> map:parameter to the relevant map:transforms, as far as I can 
> see just from glancing at it. I do notice that you are using 
> xinclude. Are you performing HTTP requests to Cocoon 
> internally with Xinclude? If so, pass the query string on to 
> it 

That was the step I had forgotten. Now I have the parameter in the xsl-file.
But fo rany reason, the if-Clause isn't executed. Could you please have a
look again?

Here is the code:

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0"

<xsl:param name="typ"/>

<xsl:template match="/">

		<script type="text/javascript">
			highlight(color, key) {
				.getElementById(key).style.backgroundColor =
			openBvh(bvh_id, session) {
			updateDetails(id) {
		<table align="center" border="1" cellpadding="3"
cellspacing="3" >
					<th>Beschreibung <xsl:value-of
select="$typ" /></th><th>Ähnlichkeit</th>
				<xsl:apply-templates />


<xsl:template match="ergebnis">
<xsl:for-each select="objekt">
<xsl:attribute name="onmouseover">highlight('yellow', '<xsl:value-of
<xsl:attribute name="onmouseout">highlight('white', '<xsl:value-of
<xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute> 
<xsl:attribute name="ondblclick">openBvh('<xsl:value-of
<xsl:attribute name="ondblclick">updateDetails('<xsl:value-of

<xsl:if test="$typ = A">
	<xsl:variable name="stock" select="@stockwerk"></xsl:variable>
	<xsl:if test="$stock != '' ">
		<td><xsl:value-of select="@typ" /> in Stockwerk "$stock" von
Gebaeude "<xsl:value-of select="gebaeude" />" in Bauvorhaben "<xsl:value-of
select="bauvorhaben" />"</td>
		<td align="center"><b><xsl:value-of select="gesamtSim"
	<td>Gebaeude "<xsl:value-of select="gebaeude" />" in Bauvorhaben
"<xsl:value-of select="bauvorhaben" />"</td>
	<td align="center"><b><xsl:value-of select="gesamtSim" /></b></td>
<xsl:if test="$typ = B">
<td><xsl:value-of select="@typ" /> "<xsl:value-of select="bezeichnung" />"
aus Bauvorhaben 
			"<xsl:value-of select="bauvorhaben" />" in Gebaeude
"<xsl:value-of select="gebaeude" />"</td>
			<td align="center"><b><xsl:value-of
select="gesamtSim" /></b>



Thanks, Barthi!

View raw message