Edit XSL Template of the CATraxx Audio Player

Discuss using and your tips/tricks for CATraxx
Post Reply
Thomas Ambrus
Posts: 2
Joined: Wed Jul 17, 2019 10:21 am

Edit XSL Template of the CATraxx Audio Player

Post by Thomas Ambrus » Wed Jul 17, 2019 10:37 am

I'd like to let the Audio Player display some information which are not available easily.
Like the "Notes" field of a track, where I store information about the history of a track in plain text.
So I tried [Edit XSL Template] with right click in the left column of the Audio Player.
The problem is, if you make a little error and the XSL is not wellformed any more, you have no longer access to the XSL to correct your error.
Has anybody ever tried to edit the XSL template of the Audio Player? Some experience? Some hints?
Best regards, Thomas.

Peerli
Posts: 13
Joined: Sun Sep 06, 2015 3:54 pm

Re: Edit XSL Template of the CATraxx Audio Player

Post by Peerli » Mon Jul 22, 2019 5:56 pm

Hallo Thomas.
Ich arbeite mit zwei Monitoren. Bei ersten Monitor habe ich das XSL File geöffnet und beim anderen Monitor CATraxx mit dem Audioplayer.
Das XSL File bearbeite ich mit dem WordPad-Editor. Wenn ich eine Änderung vornehme, speichere ich sie mit STRG+S und und im Audio-Player Rechtsklick auf "Refresh". Wenn die Änderung des XSL-File nicht das erwartete Ergebnis hat gehe ich WordPad-Editor mit STRG+Z wieder zurück. Voraussetzung ist, dass der Editor und der Player auch nach den Änderungen geöffnet bleiben.
LG
Peer

User avatar
ustoexx
Posts: 15
Joined: Fri Oct 09, 2015 4:58 pm
Location: Hamburg, Germany

Re: Edit XSL Template of the CATraxx Audio Player

Post by ustoexx » Tue Jul 23, 2019 7:44 am

Hi Thomas,

here is my code for "Notes" in AudioPlayer.xsl

Code: Select all

<!-- Zusatz 10.2009 Notes    http://www.fnprg.com/forum/viewtopic.php?f=21&t=11164&p=52487#p52487  -->
<!-- Notes  -->
            <xsl:if test="/data/record/trackdata/notes!=''">
              <TR>
                <TD CLASS="audioplayer_fieldname2" COLSPAN="2">
                  Notes:
                </TD>
              </TR>
              <TR CLASS="fieldrow">
                <TD CLASS="audioplayer_fieldname" COLSPAN="2">
                  <xsl:if test="notes!=''">
                  <xsl:call-template name="add-line-breaks">
                    <xsl:with-param name="string" select="notes"/>
                  </xsl:call-template>
                  <BR/>
                  </xsl:if>
                  <A HREF="Track.xsl?ID={/data/record/trackdata/notes/@id}" TARGET="_BLANK">
                     <xsl:value-of select="/data/record/trackdata/notes"/>
                  </A>
                </TD>
              </TR>
            </xsl:if>
<!-- Zusatz Notes Ende -->
I've inserted it behind the code for the Amazon-Link "...asinsite..."

Code: Select all

<xsl:if test="/data/record/albumdata/@asinsite!=''">
        <TR HEIGHT="10">
         <TD>
         </TD>
        </TR>
	<TR>
          <TD COLSPAN="2" ALIGN="RIGHT">        
            <A HREF="{/data/record/albumdata/@asinsite}" TARGET="_BLANK"><IMG SRC="amazon.gif" BORDER="0"/></A>
          </TD>
        </TR>
      </xsl:if>

Maybe it helps

Cheers
Uwe

Thomas Ambrus
Posts: 2
Joined: Wed Jul 17, 2019 10:21 am

Re: Edit XSL Template of the CATraxx Audio Player

Post by Thomas Ambrus » Wed Jul 24, 2019 7:55 pm

Hello Peerli, hello ustoexx,
thanks a lot.
I've got a bit of code inserted and the audio player works.
It does not show the notes yet, but I think I have to look after differences between the notes section and perhaps the lyrics section.
Best regards, Thomas.

Post Reply