changing report .xsl
Robby Stephenson
robby at periapsis.org
Wed Oct 25 07:31:01 MDT 2006
On Wednesday 25 October 2006 3:07, Shelagh Manton wrote:
> I want to print out a report which has the title and author with a
> third column with the ISBN. I tried to understand what is happening in
> the xsl files and trying to work out what goes where but I'm completely
> lost. I thought I ought to base it on Column_View.xsl but it needs a
> third column. And I can't work out how the script knows which field to
> use in the report.
The Column View report will show the columns in the current main window
view, and those columns get passed to the XSL transform through an
xsl:param element, which is line 39, or close to it. Those columns are just
a list of field names, separated by a space. Then the stylesheet creates a
local variable with the fields by splitting them up.
So you need to over-ride the xsl:param. Best way to do it would be to delete
line 39, and replace $column-names in the next line by 'title author isbn'
In short,
<xsl:param name="column-names" select="'title'"/>
<xsl:variable name="columns" select="str:tokenize($column-names)"/>
becomes
<xsl:variable name="columns" select="str:tokenize( 'title author isbn')"/>
Incidently, that 'title' that is already there is just a defult value in
case you use the stylesheet outside of Tellico and the columns don't get
passed in at all.
> Actually, I'm totally confused by these files.
:) And I'm not sure how exactly to explain some of that stuff that I figured
out by trial and error. Save that new xsl file in
$HOME/.kde/share/apps/tellico/report-templates/ with a new name, and that
should do it for you.
> But apart from that, I really like Tellico. It just keeps getting
> better.
Thanks!
Robby
More information about the tellico-users
mailing list