cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manuel Mata <>
Subject Problems with Views and SQLTransformer - A Bug ?
Date Wed, 12 Nov 2003 10:18:56 GMT
Hi i have a little problem using Views and
SQLTransformer. Maybe its a bug ? .I'm reading the
book 'Cocoon Developers Handbook' and its a sample
from that book at the chapter 10 section
SQLTransformer, so if one of you have the book may can
see it. Here is my code and problem.

I have this view in my sitemap to see raw XML data in
the IExplorer:

<map:view from-label="xml" name="xml">
  <map:serialize type="xml"/>

It works fine.

And the pipeline:

  <map:match pattern="tickets.html">
    <map:generate type="file"
	<map:transform type="sql" label="xml">
	  <map:parameter name="use-connection" value="abc"/>
	<map:transform type="xslt" src="style/tickets.xsl"/>
    <map:serialize type="html"/>

The file tickets.xml:

<?xml version="1.0"?>

<page xmlns:sql="">
<title>Trouble tickets for BigCorp</title>

<query>select * from TroubleTickets where
Customer='BigCorp' order by TicketOpened</query>


And the file tickets.xsl:

<?xml version="1.0"?>

<xsl:stylesheet version="1.0"

<xsl:template match="/page">
<title><xsl:value-of select="title"/></title>
<link rel="stylesheet" type="text/css"
<br/><br/><a href="">Home page</a>

<xsl:template match="title">
<h3 align="center"><xsl:apply-templates/></h3>

<xsl:template match="sql:rowset">
<table border="1">

<xsl:template match="sql:row">
<xsl:for-each select="*">


Here is all the code we need.
I use the URI
http://localhost:8080/cocoon/abc/tickets.html and it
all works fine !!!. I get the query in an beautiful
html table.
But note that in the pipeline there is a 'label=xml'
attribute so when i use the URI
to see the raw xml data generated by the
SQLTransformer i get an error.
The error is that the xml formed has a duplicate
attribute in the <rowset> tag. The duplicate attribute
is xmlns="".
So i dont understand why it works in the pipeline so
duplicated attributes are not allowed in XML and when
i use the view the IExplorer cant show it.

Anyway it works but I'd like to solve this to debug
viewing the XML data returned from the SQLTransformer.


Yahoo! Messenger - Nueva versión GRATIS
Super Webcam, voz, caritas animadas, y más...

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message