You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Bertrand Delacretaz <bd...@apache.org> on 2006/02/17 23:29:06 UTC
[ANN] ApacheCon EU 2006 - Dublin, Ireland, June 26-30
From Rich Bowen on the ASF members list:
The ApacheCon Planners are pleased to announce that ApacheCon Europe
2006 will be held in Dublin, Ireland, at the Burlington Hotel (http://
www.jurysdoyle.com/ireland/doyle_burlington.htm), June 26-30.
Further details to follow as they are available. CFP to follow shortly.
Please feel free to spread this information far and wide.
Re: Stylesheet to match rowset
Posted by Giacomo Pati <gi...@apache.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Mon, 20 Feb 2006, Martin Brüggebors wrote:
> Date: Mon, 20 Feb 2006 23:35:39 +0100
> From: "Martin [iso-8859-15] Brüggebors" <ma...@ninu.de>
> Reply-To: users@cocoon.apache.org
> To: users@cocoon.apache.org
> Subject: Stylesheet to match rowset
>
> I'm new to cocoon (and XSL-transformatons), so please excuse my beginner's
> question:
>
> I have a rowset from a sql-query:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
>
> <rowset xmlns="http://apache.org/cocoon/SQL/2.0">
> <row>
> <k_num>50132</k_num>
> <k_kurz>Amt fuer Bla</k_kurz>
> <k_plzort>25464 Rellingen</k_plzort>
> </row>
> <row>
> <k_num>50133</k_num>
> <k_kurz>Leid</k_kurz>
> <k_plzort>91710 Gunzenhausen</k_plzort>
> </row>
> </rowset>
> </page>
>
> and I'm trying to convert this into a simple html-table:
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <xsl:stylesheet version="1.0"
Add xmlns:sql="http://apache.org/cocoon/SQL/2.0" to element
xsl:stylesheet above.
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:template match="page">
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
> <title>rs-test</title>
> </head>
> <body>
> <table>
> <xsl:for-each select="rowset/row" >
> <tr>
> <td><xsl:value-of select="k_num"/></td>
> <td><xsl:value-of select="k_kurz"/></td>
> <td><xsl:value-of select="k_plzort"/></td>
and now you should use
<td><xsl:value-of select="sql:k_num"/></td>
<td><xsl:value-of select="sql:k_kurz"/></td>
<td><xsl:value-of select="sql:k_plzort"/></td>
instead
HTH
> </tr>
> </xsl:for-each>
> </table>
> </body>
> </html>
> </xsl:template>
> </xsl:stylesheet>
>
> This only works, when I delete the xmlns="http://apache.org/cocoon/SQL/2.0"
> at the beginning of the rowset. In real-life I cannot delete this, because the
> sql-transformer builds the rowset in my pipeline.
>
> Which template will match the rowset with the namespace-attribute?
>
> Martin
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
- --
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (GNU/Linux)
iD8DBQFD+k0vLNdJvZjjVZARAtUqAKCl73dSWes3QqqprdK08/0e6tiztACeNNcB
sERh+t2GFnv5s9t+BE2m4GQ=
=BCe5
-----END PGP SIGNATURE-----
Stylesheet to match rowset
Posted by Martin Brüggebors <ma...@ninu.de>.
I'm new to cocoon (and XSL-transformatons), so please excuse my beginner's
question:
I have a rowset from a sql-query:
<?xml version="1.0" encoding="ISO-8859-1"?>
<page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
<rowset xmlns="http://apache.org/cocoon/SQL/2.0">
<row>
<k_num>50132</k_num>
<k_kurz>Amt fuer Bla</k_kurz>
<k_plzort>25464 Rellingen</k_plzort>
</row>
<row>
<k_num>50133</k_num>
<k_kurz>Leid</k_kurz>
<k_plzort>91710 Gunzenhausen</k_plzort>
</row>
</rowset>
</page>
and I'm trying to convert this into a simple html-table:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="page">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>rs-test</title>
</head>
<body>
<table>
<xsl:for-each select="rowset/row" >
<tr>
<td><xsl:value-of select="k_num"/></td>
<td><xsl:value-of select="k_kurz"/></td>
<td><xsl:value-of select="k_plzort"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
This only works, when I delete the xmlns="http://apache.org/cocoon/SQL/2.0"
at the beginning of the rowset. In real-life I cannot delete this, because the
sql-transformer builds the rowset in my pipeline.
Which template will match the rowset with the namespace-attribute?
Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org