Before the end of 2017 the board will be down for a brief period of time for an upgrade.
Past experience says less than 30 minutes but I can't predict the future.
Also, there is a high probability that the forum will move to a different host, but that will not happen in 2017.
Thanks,
Doug

Last issue with title

Discuss using and your tips/tricks for BookCAT
User avatar
Alex Ivanovich
Posts: 286
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: Last issue with title

Postby Alex Ivanovich » Sat May 13, 2017 5:43 pm

Thanks for your help DougWilliams ;)

How to enter the query? :shock:
I forgot :roll: :roll:

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

Re: Last issue with title

Postby LotsOCds » Sat May 13, 2017 5:59 pm

Thanks Doug for jumping in!

Alex, the query needs to be in Access. I don't remember the details, but there was a VB macro that runs the query and writes the XML file.
Cheers,
Dave

User avatar
DougWilliams
Site Admin
Posts: 213
Joined: Thu May 22, 2014 11:36 am
Location: Wisconsin, USA
Contact:

Re: Last issue with title

Postby DougWilliams » Sat May 13, 2017 6:04 pm

With MS Access, open the MDB and right click on the query. Select Design View. Then VIEW > SQL VIEW and update the code with the provided code. Remember to BACKUP first!! :)
Capture.JPG
Capture.JPG (92.31 KiB) Viewed 305 times
Record Collector
"You Mean I'm Supposed To Listen To 'Em?!?!?!?"

User avatar
Alex Ivanovich
Posts: 286
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: Last issue with title

Postby Alex Ivanovich » Sat May 13, 2017 7:56 pm

query update, OK ;)
(Different procedure though (i have Microsoft Office 2003))

code xslt wrong :? :roll:

error in BookCAT

ERROR: Could not parse template: BookBrowse.xsl
Invalid expression
compilation error: file E:\==DATABASE==\FNProgramvare\BookCAT\Explorer Templates\BookBrowse.xsl line 347 element value-of
xsl:value-of : could not compile select expression 'substring(document('LastInSeries.xml')/dataroot/LastInSeries[SeriesID=$_title]'


Code: Select all

<xsl:variable name="Title">
          <xsl:value-of select="substring(document('LastInSeries.xml')/dataroot/LastInSeries[SeriesID=$_title]"/>
        </xsl:variable>

User avatar
Alex Ivanovich
Posts: 286
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: Last issue with title

Postby Alex Ivanovich » Sat May 13, 2017 8:14 pm

does not work :| :(

Wrong code? :?

FULL CODE + query

Code: Select all

 <xsl:variable name="_seriesno">
          <xsl:value-of select="series/@id"/>
        </xsl:variable>
      <!-- code title start 1 of 2 -->
      <xsl:variable name="Title">
          <xsl:value-of select="document('LastInSeries.xml')/dataroot/LastInSeries[SeriesID=$_title]"/>
        </xsl:variable>
      <!-- code title end 1 of 2-->
        <xsl:variable name="LastInSeries">
          <xsl:value-of select="document('LastInSeries.xml')/dataroot/LastInSeries[SeriesID=$_seriesno]/Max_Of_ReleaseNo"/>
        </xsl:variable>
        <xsl:variable name="LastPublishYear">
          <xsl:value-of select="substring(document('LastInSeries.xml')/dataroot/LastInSeries[SeriesID=$_seriesno]/PublishDate,1,4)"/>
        </xsl:variable>
        <xsl:variable name="LastPublishMonth">
          <xsl:value-of select="document('')//month[number(substring(document('LastInSeries.xml')/dataroot/LastInSeries[SeriesID=$_seriesno]/PublishDate,5,2))]"/>
        </xsl:variable>
        <xsl:variable name="_series">
          <xsl:value-of select="document('LastInSeries.xml')/dataroot/LastInSeries[SeriesID=$_seriesno]/LastInSeries.Series.Series"/>
        </xsl:variable>
        <a href="Book.xsl?series={$_series}@releaseno={$LastInSeries}" target="_blank">
          <strong><span style="color:red;"><xsl:value-of select="concat('Ultimo Numero: { ',
                                     $Title,
                                       $LastInSeries,
                                       ' } del mese di ',
                                       $LastPublishMonth,
                                       ' ',
                                       $LastPublishYear)"/></span></strong>
      
      <!-- Link al database .mdb per aprirlo -->
      <A HREF="file:E:\==DATABASE==\FNProgramvare\BookCAT\db1Query.mdb"> Aggiorna Query </A>
        <!-- Link al database .mdb per aprirlo -->
        </a>   
Attachments
db1Query UPDATE title.rar
quey update title
(39.74 KiB) Downloaded 10 times

User avatar
Alex Ivanovich
Posts: 286
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: Last issue with title

Postby Alex Ivanovich » Sat May 13, 2017 9:06 pm

Fixed code ;)
it seems to work :roll:

Code: Select all

<xsl:variable name="_seriesno">
          <xsl:value-of select="series/@id"/>
        </xsl:variable>
      <!-- code title start 1 of 2 -->
      <xsl:variable name="Title">
          <xsl:value-of select="document('LastInSeries.xml')/dataroot/LastInSeries[SeriesID=$_seriesno]/Title"/>
        </xsl:variable>
      <!-- code title end 1 of 2-->
        <xsl:variable name="LastInSeries">
          <xsl:value-of select="document('LastInSeries.xml')/dataroot/LastInSeries[SeriesID=$_seriesno]/Max_Of_ReleaseNo"/>
        </xsl:variable>
        <xsl:variable name="LastPublishYear">
          <xsl:value-of select="substring(document('LastInSeries.xml')/dataroot/LastInSeries[SeriesID=$_seriesno]/PublishDate,1,4)"/>
        </xsl:variable>
        <xsl:variable name="LastPublishMonth">
          <xsl:value-of select="document('')//month[number(substring(document('LastInSeries.xml')/dataroot/LastInSeries[SeriesID=$_seriesno]/PublishDate,5,2))]"/>
        </xsl:variable>
        <xsl:variable name="_series">
          <xsl:value-of select="document('LastInSeries.xml')/dataroot/LastInSeries[SeriesID=$_seriesno]/LastInSeries.Series.Series"/>
        </xsl:variable>
        <a href="Book.xsl?series={$_series}@releaseno={$LastInSeries}" target="_blank">
          <strong><span style="color:red;"><xsl:value-of select="concat('Ultimo Numero: { ',
                                       $Title,
                              ' ',
                              $LastInSeries,
                                       ' } del mese di ',
                                       $LastPublishMonth,
                                       ' ',
                                       $LastPublishYear)"/></span></strong>


I'm not happy with formatting :|

I would like to visualize this way

from

Ultimo Numero: { Ricordati di Elizabeth 16 } del mese di Gennaio 2017

to

Ultimo Numero: Ricordati di Elizabeth { 16 } del mese di Gennaio 2017 Aggiorna

:idea:

thank you @Dave @DougWilliams

User avatar
Alex Ivanovich
Posts: 286
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: Last issue with title

Postby Alex Ivanovich » Sat May 13, 2017 9:25 pm

I'm checking
The results are not good :|
On some titles and correct :roll:
In others and wrong :?

I do not understand :|
Attachments
Title right.png
Title Right
Title right.png (66.51 KiB) Viewed 294 times
Title wrong.png
Title Wrong
Title wrong.png (55.64 KiB) Viewed 294 times

User avatar
Alex Ivanovich
Posts: 286
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: Last issue with title

Postby Alex Ivanovich » Sat May 13, 2017 9:32 pm

this error is present when it is "only" an issue of the comic :roll:

Is it also necessary to update "FirstQuery"?

FirstQuery - Not modified

Code: Select all

SELECT Series.SeriesID, Series.Series, Max(Book.ReleaseNo) AS MaxOfReleaseNo
FROM Book INNER JOIN Series ON Book.SeriesID=Series.SeriesID
GROUP BY Series.SeriesID, Series.Series;


LastInSeries - code update by DougWilliams

Code: Select all

SELECT DISTINCTROW FirstQuery.SeriesID, Series.Series, Max(Book.ReleaseNo) AS Max_Of_ReleaseNo, Book.PublishDate, Book.Title
FROM (Book INNER JOIN Series ON Book.SeriesID=Series.SeriesID) INNER JOIN FirstQuery ON (Book.SeriesID=FirstQuery.SeriesID) AND (Book.ReleaseNo=FirstQuery.MaxOfReleaseNo)
GROUP BY FirstQuery.SeriesID, Series.Series, Book.PublishDate, Book.Title;

User avatar
Alex Ivanovich
Posts: 286
Joined: Mon Sep 07, 2015 2:24 pm
Location: Russian - Italia

Re: Last issue with title

Postby Alex Ivanovich » Mon May 15, 2017 9:18 am

DougWilliams, you could give me the code for the query FirstQuery

I think the problem lies there :roll:

User avatar
DougWilliams
Site Admin
Posts: 213
Joined: Thu May 22, 2014 11:36 am
Location: Wisconsin, USA
Contact:

Re: Last issue with title

Postby DougWilliams » Mon May 15, 2017 10:19 am

I am not at a computer where I can test it, but try this.

Code: Select all

SELECT Series.SeriesID, Series.Series, Max(Book.ReleaseNo) AS MaxOfReleaseNo, Book.Title
FROM Book INNER JOIN Series ON Book.SeriesID=Series.SeriesID
GROUP BY Series.SeriesID, Series.Series, Book.Title;
Record Collector
"You Mean I'm Supposed To Listen To 'Em?!?!?!?"


Return to “Using BookCAT”

Who is online

Users browsing this forum: No registered users and 1 guest