[Tellico-users] Dewey Decimal in Tellico?

Andrew Bennett drewbenn at gmail.com
Sat Jul 10 09:31:53 UTC 2010


On Fri, Jul 9, 2010 at 8:55 PM, Robby Stephenson <robby at periapsis.org> wrote:
> Thanks for your pointer, Andrew. I wasn't sure yet where the Dewey value was
> in the MODS output. You can actually just add the field definition to the
> mods2tellico.xsl file and Tellico will add the Dewey field when you do a
> search.

Glad I could help.
I figured it had to be simpler than I was making it; it's good to know
that I'll be able to get these results without patching and
recompiling each release.  I really appreciate the design and
configurability of Tellico.

> I actually had the same question back in 2004! :)
> http://periapsis.org/archives/2004/12/09/importing_additional_mods_info_to_tellico.html

Wow, I wish I'd seen that page a couple years ago! :)
In the Tellico Handbook, 7. Hacking Tellico | XSLT Tricks is currently
empty.  That post might be a good candidate for that section of the
Handbook.

> I just decided not to add the LCC or Dewey to default fields since it would
> crowd things, but maybe I should add them to the optional list.

I like those fields, but I suspect I'm in a very small minority, so I
would not push to even add them to the optional list.

> Derek, just drop the attached mods2tellico.xsl in your
...
> If you want that edition, edit the attached mods2tellico.xsl file to have
>   <xsl:value-of select="concat(' ', @edition)"/>
...
>> I noticed that SubTitle isn't being fetched;
> Just fixed that.

Thank you for all those!

>> and that subjects/keywords
>> that should be dashed are being treated as separate subjects (e.g. a

I found a solution, based on a site I stumbled upon while trying to
learn about XSL yesterday.  Between
http://www.siteexperts.com/tips/xml/ts01/page5.asp and
http://www.w3.org/TR/xslt , I ended up with:

  <keywords i18n="true">
    <!-- use authority=lcsh to filter out some non-sensical results -->
   <xsl:for-each select="mods:subject[@authority='lcsh']">
    <keyword>
      <!-- use * instead of mods:topic to pick up mods:geographic as well.
           This is probably a per-user preference whether or not fields
	   other than 'topic' should get included. -->
     <xsl:for-each select="*">
      <xsl:value-of select="."/>
       <!-- put a space then two dashes in between related subjects -->
      <xsl:if test="not(position()=last())"> --</xsl:if>
       <!-- end with a period, just like on the LoC website -->
      <xsl:if test="position()=last()">.</xsl:if>
     </xsl:for-each>
    </keyword>
   </xsl:for-each>
  </keywords>

Since I'm probably the first to complain about this, it adds
complexity to both the XSL file and the returned results, and I didn't
test it very thoroughly, I wouldn't expect any of this to get included
in the Tellico source.

>> view, sometimes some (but never all) of the data fields (like title,
>> author; seemed to change every time) would be blank. The data was still
> That one's odd. Maybe something wrong with the refresh somewhere. I'll try
> to reproduce.

I repeated it a few times today in 2.1.1, so whatever the issue is,
it's not new in 2.2.  It happened right after adding the entry from
the search window by clicking on the Add button.  If I closed the
search window and then double-clicked on the new entry, most of the
fields were blank.  Closing the entry window gave me a save/discard
changes dialog.  I clicked discard.  Double-clicking on the entry gave
me the mostly-blank entry window again, but no save/discard dialog
when closing the entry window.  Every time I double-clicked on that
new entry I got the mostly-empty entry window, until I double-clicked
on another entry (in this case, the original entry for that book) and
closed that entry window, after which point double-clicking on the new
entry brought up an entry window with all the fields (that were
populated by the search results) filled in.
I created a screencast; I can upload it somewhere if you think seeing
what I'm doing and seeing will help.

Andrew



More information about the tellico-users mailing list