You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Patrick Schlaepfer <pa...@schlaepfer.com> on 2004/06/09 16:10:08 UTC

Re: sql:block [Cocoon 2.1.5]?

The thing is, that it worked with Cocoon 2.1.4, and
now stopped working. Anyone having sql:block running
with Cocoon 2.1.5? 


Rui Alberto L.  [ISO-8859-1] Gon硬ves writes: 

> On Wed, 2004-06-09 at 12: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... 
> 
> This: 
> 
> match="sql:block[count(sql:row) > 0] 
> 
> will match any element "block" that belongs to the 
> namespace associated with prefix sql, if that block
> has one or more child's called "row" belonging to the
> same namespace. 
> 
> In your stylesheet, to associate the prefix sql with
> the correct namespace, do: 
> 
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>                 xmlns:sql="http://apache.org/cocoon/SQL/2.0"
>                 version="1.0"> 
> 
> Hope this helps. 
> 
> Rui
>>  
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
> -- 
> Rui Alberto L. Gonçalves <ru...@ptinovacao.pt>
> PT Inovação 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org 
> 
 


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