cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject Re: XSP taglib question
Date Fri, 16 Jun 2000 16:12:41 GMT
On Wed, 14 Jun 2000, Giacomo Pati wrote:

> 
> --- Donald Ball <balld@webslingerZ.com> wrote:
> > 
> > A bit, yes. I actually just got it working by explicitly invoking my
> > taglib using the xml-logicsheet PI. That implies that the relying 
> > on the namespace prefix matching a global logicsheet doesn't work - but
> > you say it works fine for you. I reckon there's some difference in either
> > our taglibs or our configurations that's causing us to get two different
> > results. what's your taglib like?
> 
> <?xml version="1.0"?>
> 
> <xsl:stylesheet version="1.0"
>    xmlns:sql="http://www.apache.org/1999/SQL"
>    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>    xmlns:pwr="http://www.pwr.ch/2000/XSP/PWR"
>    xmlns:xsp="http://www.apache.org/1999/XSP/Core" 
> >

Looks like the only relevant difference between our taglibs is the
namespace declarations. I altered my taglib to declare the namespaces in
the order in which yours does (and added the xsp namespace declaration,
even though I have no xsp nodes in my taglib) - and it still doesn't work
unless I explicitly invoke it using <?xml-logicsheet?>

- donald

> 
>   <xsl:template match="xsp:page">
>     <xsp:page>
>       <xsl:apply-templates select="@*"/>
>       <xsl:apply-templates/>
>     </xsp:page>
>   </xsl:template>
> 
>   <xsl:template match="xsp:structure">
>     <xsp:structure>
>       <xsl:apply-templates select="@*"/>
>       <xsl:apply-templates select="./*"/>
>       <xsp:include> org.exolab.castor.jdo.Database                </xsp:include>

>       <xsp:include> org.exolab.castor.jdo.ObjectNotFoundException </xsp:include>

>       <xsp:include> org.exolab.castor.jdo.OQLQuery                </xsp:include>

>       <xsp:include> org.exolab.castor.jdo.JDO                     </xsp:include>

>       <xsp:include> com.pwr.datamodel.util.JDOManager             </xsp:include>

>     </xsp:structure>
>   </xsl:template>
> 
>   <xsl:template match="xsp:include">
>     <xsp:include>
>       <xsl:apply-templates/>
>     </xsp:include>
>   </xsl:template>
> 
>   <xsl:template match="xsp:logic">
>     <xsp:logic>
>       <xsl:apply-templates/>
>     </xsp:logic>
>   </xsl:template>
> 
>   <xsl:template match="pwr:dbitemselector">
>    <dbitemselector>
>     <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
>     <xsl:attribute name="target"><xsl:value-of select="@target"/></xsl:attribute>
>     <xsl:attribute name="text-element"><xsl:value-of select="@optiontext"/></xsl:attribute>
>     <sql:execute-query>
>      <sql:driver>postgresql.Driver</sql:driver>
>      <sql:dburl>jdbc:postgresql://donald40.pwr.ch/turbine</sql:dburl>
>      <sql:username>turbine</sql:username>
>      <sql:password>turbine</sql:password>
>      <sql:query>select <xsl:value-of select="@optionid"/>, <xsl:value-of
select="@optiontext"/> as
> name from  <xsl:value-of select="@table"/> <xsl:if test="./pwr:where!=''">
where <xsl:value-of
> select="./pwr:where"/></xsl:if></sql:query>
>      <sql:doc-element>items</sql:doc-element>
>      <sql:row-element>item</sql:row-element>
>      <sql:null-indicator>yes</sql:null-indicator>
>      <sql:tag-case>preserve</sql:tag-case>
>      <sql:id-attribute>id</sql:id-attribute>
>      <sql:id-attribute-column><xsl:value-of select="@optionid"/></sql:id-attribute-column>
>      <sql:max-rows>999999999</sql:max-rows>
>      <sql:skip-rows>0</sql:skip-rows>
> <!--
>      <sql:count-attribute></sql:count-attribute>
> -->
>      <sql:query-attribute>query</sql:query-attribute>
>      <sql:skip-rows-attribute>rows-skipped</sql:skip-rows-attribute>
>      <sql:max-rows-attribute>max-rows</sql:max-rows-attribute>
>      <sql:update-rows-attribute>updated-rows</sql:update-rows-attribute>
>      <sql:namespace></sql:namespace>
>     </sql:execute-query>
>    </dbitemselector>
>   </xsl:template>  
> 
>   <xsl:template match="@*|*|text()|processing-instruction()">
>     <xsl:copy>
>       <xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
>     </xsl:copy>
>   </xsl:template>
> 
> </xsl:stylesheet>
> 
> 
> =====
> --
> PWR GmbH, Organisation & Entwicklung      Tel:   +41 (0)1 856 2202
> Giacomo Pati, CTO/CEO                     Fax:   +41 (0)1 856 2201
> Hintereichenstrasse 7                     Mailto:Giacomo.Pati@pwr.ch
> CH-8166 Niederweningen                    Web:   http://www.pwr.ch
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Photos -- now, 100 FREE prints!
> http://photos.yahoo.com
> 


Mime
View raw message