cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kari M. Scott" <kmsc...@pandora.binc.net>
Subject Re: conditional processing & SQL
Date Fri, 17 Mar 2000 19:08:44 GMT

This is probably no surprise to you experts, but it worked!
Thanks!

-Kari

On Fri, 17 Mar 2000, Donald Ball wrote:

> Why not match STAFF and generate the header there?
> 
> <xsl:template match="STAFF">
> 	<H3>
> 	<xsl:apply-templates select="STAFFROW[1]/cat_name"/>
> 	Expert(s):
> 	</H3>
> 	<xsl:apply-templates select="STAFFROW"/>
> </xsl:template>
> 
> and then style the others as usual.
> 
> - donald
> 
> > 
> > Here's a piece of my xsl file:
> > 
> >  <!-- STAFFROW ========================================================-->
> >   <xsl:template match="STAFFROW">
> >         <xsl:if test="????">
> >         <H3>
> >           <xsl:apply-templates select="cat_name"></xsl:apply-templates>
> >                 <xsl:text> Expert(s):</xsl:text>
> >         </H3>
> >         </xsl:if>
> >           <P>
> >           <xsl:apply-templates select="firstname"></xsl:apply-templates>
> >           <xsl:text>&#160;</xsl:text>
> >           <xsl:apply-templates select="lastname"></xsl:apply-templates>
> >           </P>
> >           <HR WIDTH="25%" ALIGN="LEFT"></HR>
> >   </xsl:template>
> >   <!--firstname ===================================================-->
> >   <xsl:template match="firstname">
> >         <xsl:value-of select="."/>
> >   </xsl:template>
> >   <!--lastname ===================================================-->
> >   <xsl:template match="lastname">
> >         <xsl:value-of select="."/>
> >   </xsl:template>
> >   <!--cat_name ====================================================-->
> >   <xsl:template match="cat_name">
> >                 <xsl:value-of select="."/>
> >   </xsl:template>
> > 
> > 
> > If it matters, here is my sql query:
> > 
> > <!-- Expert Name Results-->
> >  <query connection="foo_connection" doc-element="STAFF"
> > row-element="STAFFROW">
> >         select firstname, lastname, cat_name 
> > 	from staff_list, expert_list, category 
> > 	where staff_id=staff_list.id 
> > 	and category_id=category.id 
> > 	and category.id={@category}
> >  </query>
> > 
> > 
> > 
> > Thanks,
> > -Kari
> > 
> > Kari M. Scott
> > Berbee
> > 5520 Research Park Drive
> > Madison, WI  53711-5377
> > kmscott@berbee.com
> > 608.288.3000 ext. 1223
> > 608.298.1223 direct dial
> > 608.288.3037 fax
> > 
> > Berbee...putting the E in business
> > 
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: cocoon-users-help@xml.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 


Kari M. Scott
Berbee
5520 Research Park Drive
Madison, WI  53711-5377
kmscott@berbee.com
608.288.3000 ext. 1223
608.298.1223 direct dial
608.288.3037 fax

Berbee...putting the E in business


Mime
View raw message