Error in customizing BookBrowse.xsl template

Discuss using and your tips/tricks for BookCAT
Post Reply
pg111
Posts: 11
Joined: Sun Apr 03, 2016 8:09 am

Error in customizing BookBrowse.xsl template

Post by pg111 » Mon Aug 08, 2016 11:12 am

Hi everybody,

While trying to customize BookBrowse.xsl template I get a strange error message which I cannot understand what it is related to.

Code: Select all

           [b] <td class="record_pane_table_group" colspan="2">General</td>[/b]
          </tr>
          <tr>
            <td class="record_pane_table_group_padding" colspan="2"></td>
          </tr>        
          <xsl:if test="publisher!=''">
          <tr>
            <td class="record_pane_table_fieldname" nowrap=""><xsl:value-of select="/data/fld/book/publisher/@name"/></td>
            <td class="record_pane_table_fieldvalue">
              <a href="BookList.xsl?Publisher={publisher}@xslparam:doctitle=Publisher: {publisher}" target="_blank"> 
                <xsl:value-of select="publisher"/>
              </a>
            </td>
          </tr>
          </xsl:if>
          <xsl:if test="publicationplace!=''">
          <tr>
            <td class="record_pane_table_fieldname" nowrap="">Pub. Place</td>
            <td class="record_pane_table_fieldvalue">
              <a href="BookList.xsl?PublicationPlace={publicationplace}@xslparam:doctitle=Publication Place: {publicationplace}" target="_blank"> 
                <xsl:value-of select="publicationplace"/>
              </a>
            </td>
          </tr>
          </xsl:if>
          <xsl:if test="isbn!=''">
          <tr>
            <td class="record_pane_table_fieldname" nowrap=""><xsl:value-of select="/data/fld/book/isbn/@name"/></td>
            <td class="record_pane_table_fieldvalue"><xsl:value-of select="isbn"/></td>
          </tr>
          </xsl:if>
          <xsl:if test="lccn!=''">
          <tr>
            <td class="record_pane_table_fieldname" nowrap=""><xsl:value-of select="/data/fld/book/lccn/@name"/></td>
            <td class="record_pane_table_fieldvalue"><xsl:value-of select="lccn"/></td>
          </tr>
          </xsl:if>
          <xsl:if test="lccallnum!=''">
          <tr>
            <td class="record_pane_table_fieldname" nowrap=""><xsl:value-of select="/data/fld/book/lccallnum/@name"/></td>
            <td class="record_pane_table_fieldvalue"><xsl:value-of select="lccallnum"/></td>
          </tr>
          </xsl:if>
          <xsl:if test="dewey!=''">
          <tr>
            <td class="record_pane_table_fieldname" nowrap=""><xsl:value-of select="/data/fld/book/dewey/@name"/></td>
            <td class="record_pane_table_fieldvalue"><xsl:value-of select="dewey"/></td>
          </tr>
          </xsl:if>
          <xsl:if test="binding!=''">
          <tr>            
            <td class="record_pane_table_fieldname" nowrap=""><xsl:value-of select="/data/fld/book/binding/@name"/></td>
            <td class="record_pane_table_fieldvalue">
              <a href="BookList.xsl?Binding={binding}@xslparam:doctitle=Binding: {binding}" target="_blank"> 
                <xsl:value-of select="binding"/>
              </a>
            </td>
          </tr>
          </xsl:if>
          <xsl:if test="edition!=''">
          <tr>
            <td class="record_pane_table_fieldname" nowrap=""><xsl:value-of select="/data/fld/book/edition/@name"/></td>
            <td class="record_pane_table_fieldvalue">
              <a href="BookList.xsl?Edition={edition}@xslparam:doctitle=Edition: {edition}" target="_blank">
                <xsl:value-of select="edition"/>
              </a>
            </td>
          </tr>
          </xsl:if>
          <xsl:if test="type!=''">
          <tr>
            <td class="record_pane_table_fieldname" nowrap=""><xsl:value-of select="/data/fld/book/type/@name"/></td>
            <td class="record_pane_table_fieldvalue">
              <a href="BookList.xsl?Type={type}@xslparam:doctitle=Type: {type}" target="_blank"> 
                <xsl:value-of select="type"/>
              </a>
            </td>
          </tr>
          </xsl:if>
          <xsl:if test="country!=''">
          <tr>
            <td class="record_pane_table_fieldname" nowrap=""><xsl:value-of select="/data/fld/book/country/@name"/></td>
            <td class="record_pane_table_fieldvalue">
              <a href="BookList.xsl?Country={country}@xslparam:doctitle=Country: {country}" target="_blank"> 
                <xsl:value-of select="country"/>
              </a>
            </td>
          </tr>    
          </xsl:if>                           
          <xsl:if test="language!=''">
          <tr>
            <td class="record_pane_table_fieldname" nowrap=""><xsl:value-of select="/data/fld/book/language/@name"/></td>
            <td class="record_pane_table_fieldvalue">
              <a href="BookList.xsl?Language={language}@xslparam:doctitle=Language: {language}" target="_blank">
                <xsl:value-of select="language"/>
              </a>
            </td>
          </tr>
          </xsl:if>     
          <xsl:if test="series!=''"> 
          <tr> 
            <td class="record_pane_table_fieldname" nowrap=""><xsl:value-of select="/data/fld/book/series/@name"/></td> 
            <td class="record_pane_table_fieldvalue"> 
              <a href="BookList.xsl?Series={series}@xslparam:doctitle=Series: {series}" target="_blank"> 
                <xsl:value-of select="series"/> 
              </a> 
              <xsl:if test="releaseno/@unformatted!=0"> 
                <xsl:text> (</xsl:text><xsl:value-of select="releaseno"/><xsl:text>)</xsl:text> 
              </xsl:if> 
            </td> 
          </tr> 
          </xsl:if>                 
          <xsl:if test="dimensions_width/@integer>0 or dimensions_height/@integer>0 or dimensions_depth/@integer>0">
          <tr>
            <td class="record_pane_table_fieldname" nowrap="">
              <xsl:text>Dimensions</xsl:text>
            </td>
            <td class="record_pane_table_fieldvalue">
              <xsl:if test="dimensions_width/@integer>0">
                <xsl:text>W:</xsl:text><xsl:value-of select="dimensions_width"/><xsl:text> </xsl:text>
              </xsl:if> 
              <xsl:if test="dimensions_height/@integer>0">
                <xsl:text>H:</xsl:text><xsl:value-of select="dimensions_height"/><xsl:text> </xsl:text>
              </xsl:if> 
              <xsl:if test="dimensions_depth/@integer>0">
                <xsl:text>D:</xsl:text><xsl:value-of select="dimensions_depth"/>
              </xsl:if> 
            </td>
          </tr>                
          </xsl:if>
          <tr> 
If I try to translate "General" on the first line then I get the flwg error message:

ERROR: Table name is not specified in template.

when I display the contents of the book record in the browse pane.

I cannot understand which table is mentioned there and why it is not possible for me to change the text of "General" which is merely a text string.

Anybody can help?

Many thanks in advance.
Cheers.

Patrick

User avatar
LotsOCds
Posts: 177
Joined: Thu Aug 20, 2015 4:23 am
Location: California, USA

Re: Error in customizing BookBrowse.xsl template

Post by LotsOCds » Fri Aug 12, 2016 4:08 am

Hi Patrick,

Could you post the entire template that gives the error? I'll take a look.
Cheers,
Dave

pg111
Posts: 11
Joined: Sun Apr 03, 2016 8:09 am

Re: Error in customizing BookBrowse.xsl template

Post by pg111 » Fri Aug 12, 2016 4:22 am

Hi Dave,

Thanks for your request.

Plse find the file hereattached.
Attachments
BookBrowse_pg.xls.zip
(3.61 KiB) Downloaded 58 times
Cheers.

Patrick

User avatar
LotsOCds
Posts: 177
Joined: Thu Aug 20, 2015 4:23 am
Location: California, USA

Re: Error in customizing BookBrowse.xsl template

Post by LotsOCds » Fri Aug 12, 2016 6:59 am

Hmm, I don't see any errors. However, the line with General is not changed/translated. Is there some text you've put there that causes the error?
Cheers,
Dave

pg111
Posts: 11
Joined: Sun Apr 03, 2016 8:09 am

Re: Error in customizing BookBrowse.xsl template

Post by pg111 » Fri Aug 12, 2016 12:28 pm

Hi Dave,

Thanks for your help.

Yes, if you change "General" to "Général", or "Library" to "Bibliothèque", and so on, then you get the error message I mentioned.

Currently the xsl template works fine but I was unable to change/customize any text on those lines.

What is strange is that line 497 contains the flwg code

Code: Select all

<td class="record_pane_table_group" colspan="2"><xsl:value-of select="/data/fld/book/synopsis/@name"/></td>
which displays just fine.

Any idea?

Many thanks in advance.
Cheers.

Patrick

User avatar
LotsOCds
Posts: 177
Joined: Thu Aug 20, 2015 4:23 am
Location: California, USA

Re: Error in customizing BookBrowse.xsl template

Post by LotsOCds » Fri Aug 12, 2016 2:56 pm

Yes, if you change "General" to "Général", or "Library" to "Bibliothèque", and so on, then you get the error message I mentioned.
I changed those two lines and do not see the error.
Screenshot - 8_12_2016.jpg
Screenshot - 8_12_2016.jpg (32.85 KiB) Viewed 1023 times
Do you see the error if you change "General" to "Foobar" ? If not, that would indicate some issue with the use of extended characters.

If you want me to look further, transfer a couple books to a new database, check that they still fail, and send me a zip with the new database and your BookBrowse.xsl (with the changes that show the failure) . I'll take a look over the weekend.
Cheers,
Dave

pg111
Posts: 11
Joined: Sun Apr 03, 2016 8:09 am

Re: Error in customizing BookBrowse.xsl template

Post by pg111 » Fri Aug 12, 2016 4:35 pm

Hi Dave,

Thanks again for your input.

Actually the error message is not displayed when I change "General" to "Foobar" as you suggested. So the issue might be with use of accented chars.

Plse find hereenclosed a sample database with about 5 books.

Have a nice week-end all the same!
Attachments
pg_livres_sample.zip
(272.49 KiB) Downloaded 45 times
Cheers.

Patrick

User avatar
LotsOCds
Posts: 177
Joined: Thu Aug 20, 2015 4:23 am
Location: California, USA

Re: Error in customizing BookBrowse.xsl template

Post by LotsOCds » Sat Aug 13, 2016 4:08 am

Still I do not see an error. Sorry, but I don't know what to recommend.
Screenshot2 - 8_12_2016.jpg
Screenshot2 - 8_12_2016.jpg (45.36 KiB) Viewed 1010 times
You could try the template you posted earlier with the two text changes I made. It's not likely, but maybe there will be a difference.
BookBrowse_pg_modified.zip
(3.7 KiB) Downloaded 58 times
Cheers,
Dave

pg111
Posts: 11
Joined: Sun Apr 03, 2016 8:09 am

Re: Error in customizing BookBrowse.xsl template

Post by pg111 » Sat Aug 13, 2016 4:07 pm

Hi Dave,

Thank you so much for your help.

I've just downloaded your modified xsl file and used it to browse book info. It works just fine.

I'm still unsure why mine is still not working. I will have to carefully scrutinize line differences between both files. I will do so later as I'm not available for that right now. I just noticed that line numbers for "Général" were different between your file and mine. I'll try to pinpoint the differences.

I'll make sure to let you know what I will have found.

Have a nice week-end!
Cheers.

Patrick

User avatar
LotsOCds
Posts: 177
Joined: Thu Aug 20, 2015 4:23 am
Location: California, USA

Re: Error in customizing BookBrowse.xsl template

Post by LotsOCds » Sat Aug 13, 2016 6:15 pm

I just noticed that line numbers for "Général" were different between your file and mine.
Strange. All I did was change the two text strings in the template you posted earlier in this thread.
Cheers,
Dave

Post Reply