cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: sql:block
Date Fri, 11 Jun 2004 09:45:49 GMT
On 09.06.2004 13:17, Patrick Schlaepfer wrote:

> After the SQLTransformer and Filter the xml files looks
> like:
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> - <page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
> <title>New Books List</title>
> - <sql>
> - <rowset xmlns="http://apache.org/cocoon/SQL/2.0">
> - <block id="1">
> - <row>
> <id>460</id>
> <hotelname>Adler</hotelname>
> <adresse>Gerechtigkeitsgasse 7</adresse>
> <plz>3011</plz>
> <ort>Bern</ort>
> <sterne>30</sterne>
> <pic_l>2229</pic_l>
> <doppel_min>0</doppel_min>
> <einzel_min>0</einzel_min>
> </row>
> - <row>
> <id>5949</id>
> <hotelname>Alfa Bern</hotelname
> ....
> In the xslt there is:
> template match="/page"
> template match="title"
> template match="sql:rowset"
> and template match="sql:block[count(sql:row) > 0]"
> What exactly does the line above, and why it's not working,
> doesn't match the template...

Look like a namespace problem. Can you use the log transformer between 
the sql transformer and the stylesheet to see if the correct sax events 
were fired?

BTW, sql:block[count(sql:row) > 0] can be shortened to 
sql:block[sql:row]. No need to count the sql:row, just test for their 
existency.

Joerg


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message