cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From O.Vobe...@sh.cvut.cz
Subject Re: XSL template from database
Date Wed, 07 Jan 2004 18:16:20 GMT
Thanks, I tried it, but cocoon returns error message: "Streaming of an internal 
pipeline is not possible with a reader.". What does it mean?

Otmar

> This is not necessary. One could use the cocoon: protocol when
> specifying the source for the stylesheet. Next, a pipeline for the
> stylesheet is needed that consists only of the database reader et voilŕ.



My sources:

<map:match pattern="*/*/*/stylesheet/*">
  <map:read type="databasereader" src="{1}" mime-type="text/xml">
  <map:parameter name="table" value="subweb s, article a, article_version v, 
article_version_format avf, format f, language l"/>
  <map:parameter name="image" value="v.body"/>
  <map:parameter name="key" value="s.name"/>
  <map:parameter name="where" value="s.stylesheet=a.id and a.id=v.article and 
v.id=avf.article_version and avf.format=f.id and f.name='{2}' and 
v.language=l.id and l.name='{3}'"/>
  </map:read>
</map:match>

<map:match pattern="*/html/*/*/*.html">
  <map:generate type="serverpages" src="logic/main.xsp">
    <map:parameter name="language" value="{2}"/>
    <map:parameter name="format" value="html"/>
    <map:parameter name="subweb" value="{1}"/>
    <map:parameter name="id" value="{4}"/>
    <map:parameter name="content" value="{3}"/>
  </map:generate>
  <map:transform src="cocoon:/{1}/html/{2}/stylesheet/0"/>
  <map:serialize type="html"/>
</map:match>

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


Mime
View raw message