XLS templates

Any trouble you encounter with the Pedias, here's the place to ask for help.
Post Reply
Dante
Contributor
Contributor
Posts: 5
Joined: Thu Dec 02, 2004 7:40 am

XLS templates

Post by Dante »

I used this XLS template to import your .dvdpedia files. However as your .xml files changed again is there anyone who has an XML and XLS template to import in FileMaker Pro.
I realise DVDpedia is already a database, but I still need FileMaker for my work.
If anybody helped it would be great:
This was the XLS template which I used succesfully till now:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/>
<xsl:template match="/">
<FMPXMLRESULT xmlns="http://www.filemaker.com/fmpxmlresult">
<ERRORCODE>0</ERRORCODE>
<PRODUCT BUILD="" NAME="" VERSION="" />
<DATABASE DATEFORMAT="d/m/yyyy" LAYOUT="" NAME="" RECORDS="{count(/plist/dict/dict)}" TIMEFORMAT="h:mm:ss a" />

<METADATA>
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Version" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Asin" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Awards" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Collection" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Comments" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Country" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="CustomOne" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="CustomTwo" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Date" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Director" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Discs" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Display Gone" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Features" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Genre" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="IMDB" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Image" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Language" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="LentTo" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="ListPrice" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Locale" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Media" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="MyRating" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Names" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="PaidPrice" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="PictureFormat" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Producer" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="ProductURL" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="PurchasedAt" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Rated" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Region" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Release" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Roles" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="RunningTime" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="ScreenRatio" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Sound" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Starring" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Studio" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Subtitles" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Summary" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Theatrical" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Title" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="UPC" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="VideoFormat" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="ViewerRating" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="Writer" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="similiarProductsName" TYPE="TEXT" />
<FIELD EMPTYOK="YES" MAXREPEAT="1" NAME="similiarProductsURL" TYPE="TEXT" />
</METADATA>


<RESULTSET>
<xsl:attribute name="FOUND">
<xsl:value-of select="count(/plist/dict/dict)" />
</xsl:attribute>

<xsl:for-each select="/plist/dict/dict">
<ROW>
<xsl:attribute name="MODID">0</xsl:attribute>
<xsl:attribute name="RECORDID">0</xsl:attribute>

<!-- the Version -->
<xsl:for-each select="../key[.='Version']">
<COL>
<DATA>
<xsl:value-of select="../string"/>
</DATA>
</COL>
</xsl:for-each>

<!-- rest of the data -->

<COL>
<DATA>
<xsl:for-each select="key[.='Asin']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='Awards']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='Collection']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='Comments']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='Country']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='CustomOne']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='CustomTwo']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='Date']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>
<COL>
<DATA>
<xsl:for-each select="key[.='Director']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='Disks']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='Display Gone']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='Features']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>
<COL>
<DATA>
<xsl:for-each select="key[.='Genre']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='IMDB']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='Image']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='Language']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='LentTo']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='ListPrice']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='Locale']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='Media']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='MyRating']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>
<COL>
<DATA>
<xsl:for-each select="key[.='Names']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='PaidPrice']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='PictureFormat']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='Producer']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='ProductURL']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='PurchasedAt']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='Rated']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='Region']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='Release']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='Roles']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>
<COL>
<DATA>
<xsl:for-each select="key[.='RunningTime']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='ScreenRatio']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='Sound']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='Starring']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='Studio']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='Subtitles']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='Summary']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='Theatrical']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='Title']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='UPC']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='VideoFormat']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='ViewerRating']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='Writer']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='similiarProductsName']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

<COL>
<DATA>
<xsl:for-each select="key[.='similiarProductsName']">
<xsl:value-of select="following-sibling::*" />
</xsl:for-each>
</DATA>
</COL>

</ROW>
</xsl:for-each>

</RESULTSET>
</FMPXMLRESULT>
</xsl:template>
</xsl:stylesheet>
User avatar
Conor
Top Dog
Posts: 5346
Joined: Sat Jul 03, 2004 12:58 pm
Contact:

Post by Conor »

Hi Dante,

I don't know much about XLS, maybe someone who does can find where the change affected the XLS template, as the change to the database was more concerned with the collections area at the top, and not the actual DVD data. (That stayed the same except for the borrowed by history is now a list of dictionaries.) I think what caused the break is that there can now be several dictionaries as part of the collection before the DVD data. What you want to do is look for the "Tracks" dictionary. And then do the loop for each entry inside that dictionary.

I am just guessing here but it should be something like:

<xsl:for-each select="../key[.='Tracks']">
<ROW>
<xsl:attribute name="MODID">0</xsl:attribute>
<xsl:attribute name="RECORDID">0</xsl:attribute>
Kai
Contributor
Contributor
Posts: 9
Joined: Mon Nov 07, 2005 8:14 am

Post by Kai »

Dante, please post your new XSL templates here, in particular when you make progress with including covers too ;)
Post Reply