cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Perry Tew <perry_...@yahoo.com>
Subject correct way to specify template match using attribute = some value?
Date Tue, 06 Nov 2001 21:06:56 GMT
Hello.
   I'm new to cocoon, and I'm working on my first xsl sheet.
I'm having an issue where cocoon renders different results as the
command line is outputting.  I'm using the sql transformer, and pdf
serializer to move oracle data to pdf (which is cool).

The problem I'm having is with my templates that are matching by
comparing an attribute to a value.  Here's an example:
<xsl:value-of
select="/page/sql:rowset[@name='report_date']/sql:row/sql:business_unit"/>

Those templates match when I run the process from the command line
using Jack Clark's xt.exe to go from xml -> fo, also when I use the
binary fop distribution's fop.bat to create a pdf from the xml.  I
create a very nice pdf file.

If I change the template to the following, it works:
<xsl:value-of select="/page/sql:rowset/sql:row/sql:business_unit"/>

However, I have several rowsets, and need to select the correct one
based on attribute name.  I'm new at this, so I ask, am I doing
something incorrectly or need to specifiy the attribute match using a
different syntax for it to properly render in cocoon?


I'm using the RC2 version of cocoon on HPUX 11.00.  I haven't changed
my cocoon.xconf except to added an oracle datasource.

I can supply my xml and xslt file if that would be helpful.

My sitemap configuration is the following:
   <map:match pattern="test.pdf">
    <map:generate src="docs/samples/sql/atp.xml"/>
    <map:transform type="sql">
      <map:parameter name="use-connection" value="adwt"/>
		<map:parameter name="business-unit" value="High Volume"/>
    </map:transform>
    <map:transform src="stylesheets/perry-sql2fo.xsl"/>
    <map:serialize type="fo2pdf"/>
   </map:match>

Thanks,
Perry Tew


__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

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


Mime
View raw message