Sign up here and you can log into the forum!

XSL Support for templates

Support forum for the great ThumbGen software

Re: XSL Support for templates   

Postby ozzii » Sun Dec 12, 2010 12:54 am

Now me too I'm curious for this new relase from Taurus
ozzii
DLX'er
 
Posts: 143
Joined: Mon Apr 26, 2010 5:09 am

Re: XSL Support for templates   

Postby thumbgen » Sun Dec 12, 2010 8:33 am

Check Taurus IMDb Revolution templates ;)
Get ThumbGen!
If you like ThumbGen then buy me a coffee Image
thumbgen
Developer
 
Posts: 1061
Joined: Mon Apr 05, 2010 10:04 pm

Re: XSL Support for templates   

Postby s1l3nc0r » Sun Dec 12, 2010 1:28 pm

Just took a look, hehe.

Very nice indeed
s1l3nc0r
WDTVer
 
Posts: 29
Joined: Tue Aug 24, 2010 5:02 am

Dropshadow problems   

Postby s1l3nc0r » Mon Dec 13, 2010 2:03 pm

I have been working on some templates the last few days and they are done.

They can be downloaded here: http://www.wdtvlive.net/showthread.php?352-quot-Plastified-quot&p=2607#post2607

I only have one problem, on some elements in the xml script, I can't seem to get a dropshadow.

The places I would like to have the dropshadows set are:

IMDB rating right from starmask (TextElement)
Audiocodec1 Logo (ImageElement)
Audiocodec2 Logo (ImageElement)
AspectRatio Logo (ImagElement)
Language1 text (TextElement)
Language2 text (TextElement)

As soon as I set the dropshadow command the way it usually should be done Thumbgen gives the following error:

attribuut-en naamruimtekoppelingen kunnen niet worden
toegevoegd aan het bovenliggende element nadat al een tekst-,
opmerkings-, pi- ofsubelementknooppunt is toegevoegd.



The Thumbgen log shows this about that particular movie:
Code: Select all
1: 2010-12-13 20:56:00.0301 [?] Processing Assault on Precinct 13 Bluray.mkv keywords= imdbid=
1: 2010-12-13 20:56:00.0301 [?] IMDb Id from nfo: tt0398712
1: 2010-12-13 20:56:04.2654 [?] Execute search: assault on precinct 13 [tt0398712]
9: 2010-12-13 20:56:04.5214 [?] Collector: TheMovieDB.org Search time: 00:00:00.23
1: 2010-12-13 20:56:04.5434 [?] Search done
1: 2010-12-13 20:56:05.4534 [?] ResultsPage loaded
1: 2010-12-13 20:56:05.4834 [LoadMyData] nfo loaded for J:\Bluray Movies\Assault on Precinct 13\Assault on Precinct 13 Bluray.mkv
1: 2010-12-13 20:56:05.7535 [<_form_Loaded>b__6] Deferred processing started
1: 2010-12-13 20:56:06.1095 [<_form_Loaded>b__6] Selected cover by pref collector
1: 2010-12-13 20:56:06.1825 [<_form_Loaded>b__6] IMDb query sent
1: 2010-12-13 20:56:06.2005 [<_form_Loaded>b__6] Pref info collector sent
1: 2010-12-13 20:56:06.2185 [<_form_Loaded>b__6] Selected info by priority
1: 2010-12-13 20:56:06.2185 [<_form_Loaded>b__6] Subtitles refreshed
1: 2010-12-13 20:56:06.2185 [<_form_Loaded>b__6] Languages refreshed
1: 2010-12-13 20:56:06.3935 [<_form_Loaded>b__6] Existing sheets refreshed
1: 2010-12-13 20:56:06.8305 [<_form_Loaded>b__6] Available templates refreshed
1: 2010-12-13 20:56:06.8305 [<_form_Loaded>b__6] Backdrops by movie refreshed
1: 2010-12-13 20:56:06.8305 [ImportImages] AutoTakeScreenshots off
1: 2010-12-13 20:56:06.8305 [ImportImages] Importing cover
1: 2010-12-13 20:56:06.8395 [ImportImages] Importing cover done
1: 2010-12-13 20:56:06.8395 [ImportImages] Importing background
1: 2010-12-13 20:56:06.9135 [ImportImages] Importing background done
1: 2010-12-13 20:56:06.9135 [ImportImages] Importing fanarts
1: 2010-12-13 20:56:07.0195 [ImportImages] Importing fanarts done
1: 2010-12-13 20:56:07.0195 [<_form_Loaded>b__6] Autoselected images loaded
1: 2010-12-13 20:56:07.0275 [<_form_Loaded>b__6] Backdrops list updated
1: 2010-12-13 20:56:07.0275 [<_form_Loaded>b__6] Images processor disposed
1: 2010-12-13 20:56:07.0275 [RenderMoviesheet] Entering rendermoviesheet
1: 2010-12-13 20:56:07.0275 [RenderMoviesheet] Needs render
1: 2010-12-13 20:56:07.0275 [RenderMoviesheet] Start analyze template
1: 2010-12-13 20:56:07.1105 [RenderMoviesheet] End analyze template
1: 2010-12-13 20:56:07.1105 [RenderMoviesheet] XSL Found
1: 2010-12-13 20:56:09.2567 [RenderMoviesheet] render System.Xml.Xsl.XslTransformException: Attribuut- en naamruimteknooppunten kunnen niet worden toegevoegd aan het bovenliggende element nadat al een tekst-, opmerkings-, pi- of subelementknooppunt is toegevoegd.
   bij System.Xml.Xsl.Runtime.XmlQueryOutput.ThrowInvalidStateError(XPathNodeType constructorType)
   bij System.Xml.Xsl.Runtime.XmlQueryOutput.ConstructInEnumAttrs(XPathNodeType rootType)
   bij System.Xml.Xsl.Runtime.XmlQueryOutput.WriteStartAttribute(String prefix, String localName, String ns)
   bij System.Xml.Xsl.Runtime.XmlQueryOutput.WriteStartAttributeLocalName(String localName)
   bij System.Xml.Xsl.CompiledQuery.Query.<xsl:template match="TextElement[@Name='Language2']">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current, Double {urn:schemas-microsoft-com:xslt-debug}position, Double {urn:schemas-microsoft-com:xslt-debug}last, IList`1 {urn:schemas-microsoft-com:xslt-debug}namespaces) in D:\TG1.2.2.1\Templates\Movie Sheet S1l3nc0r\Movie Sheet S1l3nc0r\template.xslt:regel 1018
   bij System.Xml.Xsl.CompiledQuery.Query.<xsl:apply-templates>(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator , Double , Double )
   bij System.Xml.Xsl.CompiledQuery.Query.<xsl:template match="//Elements">(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current, Double {urn:schemas-microsoft-com:xslt-debug}position, Double {urn:schemas-microsoft-com:xslt-debug}last, IList`1 {urn:schemas-microsoft-com:xslt-debug}namespaces) in D:\TG1.2.2.1\Templates\Movie Sheet S1l3nc0r\Movie Sheet S1l3nc0r\template.xslt:regel 998
   bij System.Xml.Xsl.CompiledQuery.Query.<xsl:apply-templates>(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator , Double , Double )
   bij System.Xml.Xsl.CompiledQuery.Query.<xsl:template match="@*|node()"> (2)(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator {urn:schemas-microsoft-com:xslt-debug}current, Double {urn:schemas-microsoft-com:xslt-debug}position, Double {urn:schemas-microsoft-com:xslt-debug}last, IList`1 {urn:schemas-microsoft-com:xslt-debug}namespaces) in D:\TG1.2.2.1\Templates\Movie Sheet S1l3nc0r\Movie Sheet S1l3nc0r\template.xslt:regel 983
   bij System.Xml.Xsl.CompiledQuery.Query.<xsl:apply-templates>(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator , Double , Double )
   bij System.Xml.Xsl.CompiledQuery.Query.<xsl:apply-templates>(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime, XPathNavigator , Double , Double )
   bij System.Xml.Xsl.CompiledQuery.Query.Root(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
   bij System.Xml.Xsl.CompiledQuery.Query.Execute(XmlQueryRuntime {urn:schemas-microsoft-com:xslt-debug}runtime)
   bij System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlSequenceWriter results)
   bij System.Xml.Xsl.XmlILCommand.Execute(Object defaultDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter writer, Boolean closeWriter)
   bij System.Xml.Xsl.XmlILCommand.Execute(IXPathNavigable contextDocument, XmlResolver dataSources, XsltArgumentList argumentList, XmlWriter results)
   bij System.Xml.Xsl.XmlILCommand.Execute(IXPathNavigable contextDocument, XmlResolver dataSources, XsltArgumentList argumentList, Stream results)
   bij System.Xml.Xsl.XslCompiledTransform.Transform(IXPathNavigable input, XsltArgumentList arguments, Stream results)
   bij ThumbGen.MovieSheets.MovieSheetsGenerator.?(String ?, Stream ?, Dictionary`2 ?)
   bij ThumbGen.MovieSheets.MovieSheetsGenerator.RenderMoviesheet(Boolean getThumbnail)


This tells me the problem lies in the xslt transfer for these objects, but that's all I get out of it ??

Any ideas ? (I am starting to get pretty annoyed by this)
Last edited by s1l3nc0r on Wed Dec 15, 2010 12:29 am, edited 1 time in total.
s1l3nc0r
WDTVer
 
Posts: 29
Joined: Tue Aug 24, 2010 5:02 am

Re: XSL Support for templates   

Postby Buhric » Tue Dec 14, 2010 7:42 pm

not sure what your problem is... I just downloaded you templates... added a drop shadow on ImageElement named "Studio"
and its working fine...


can you post the XML and XSLT here that are giving you the error ?
Buhric
Global Moderator
 
Posts: 616
Joined: Thu Apr 15, 2010 2:49 pm

Re: XSL Support for templates   

Postby s1l3nc0r » Wed Dec 15, 2010 12:41 am

I took a look at the template again, you're right. I added a dropshadow on the Studio Logo as well as the Certification Logo.

I started creating dropshadows on the rest of the media icons and such, but the following create the error mentioned above:

IMDB rating right from starmask (TextElement Name="IMDB Rating")
Audiocodec1 Logo (ImageElement Name="Test00")
Audiocodec2 Logo (ImageElement Name="Test01")
AspectRatio Logo (ImageElement Name="Aspect Icon")
Language1 text (TextElement Name="Language1")
Language2 text (TextElement Name="Language2")

Image

The other thing I can't seem to get fixed is to have the runtime display make the word hours just as wide as the word hour, as you can see when runtime is 2 hours or more, the word hours uses more width as the word hour does (probably because I added the dropshadow to it)



when I change this in the xml
Code: Select all
      <ImageElement Name="Test00" X="14" Y="526" Width="100" Height="74" Source="File" Offset="0" MultiPageIndex="-1" SourceData="" NullImageUrl="" />


to
Code: Select all
      <ImageElement Name="Test00" X="14" Y="526" Width="100" Height="74" Source="File" Offset="0" MultiPageIndex="-1" SourceData="" NullImageUrl="">
        <Actions>
          <DropShadow Angle="315" Color="-16777216" Distance="3" Opacity="100" Softness="1" />
        </Actions>
      </ImageElement>


I get the error message I mentioned

The xslt is the same as in the pack you downloaded

Here is the xml (with all dropshadows placed that didn't cause error's):
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<Template>
  <Settings>
    <Directors Separator=", " MaximumValues="1" />
    <Writers Separator=", " MaximumValues="1" />
    <Actors Separator=", " MaximumValues="10" />
    <Genres Separator=" / " MaximumValues="2" />
    <Countries Separator=", " MaximumValues="1" />
    <Rating FileName="%PATH%\star_1_18x18.png" />
    <Studios Separator=", " MaximumValues="4" />
    <ALLSUBTITLES Separator=" / " MaximumValues="6" />
    <Languages Separator=", " MaximumValues="6" />
    <GuestStars Separator=", " MaximumValues="13" />
    <Subtitles Separator=" / " MaximumValues="5" />
    <Episodes Separator=", " MaximumValues="25" />
    <EpisodesNames Separator=", " MaximumValues="25" />
    <LanguageCodes Separator=", " MaximumValues="5" />
   </Settings>
  <MediaFormats>
    <MediaFormat Name="AVCHD" Text="AVCHD" Image="%PATH%\..\Common\media_format\avchd.png" />
    <MediaFormat Name="BLURAY" Text="Blu-Ray" Image="%PATH%\..\Common\media_format\bluray.png" />
    <MediaFormat Name="DVD" Text="DVD" Image="%PATH%\..\Common\media_format\dvd.png" />
    <MediaFormat Name="flv" Text="FLV" Image="%PATH%\..\Common\video_format\flv.png" />
    <MediaFormat Name="HDDVD" Text="HD DVD" Image="%PATH%\..\Common\media_format\hddvd.png" />
    <MediaFormat Name="mov" Text="MOV" Image="%PATH%\..\Common\video_format\mov.png" />
    <MediaFormat Name="m2ts" Text="M2TS" Image="%PATH%\..\Common\media_format\m2ts.png" />
    <MediaFormat Name="mpeg" Text="MPEG" Image="%PATH%\..\Common\media_format\mpeg.png" />
    <MediaFormat Name="mpeg2" Text="MPEG-2" Image="%PATH%\..\Common\media_format\mpeg.png" />
    <MediaFormat Name="mpeg4" Text="MPEG-4" Image="%PATH%\..\Common\media_format\mpeg.png" />
    <MediaFormat Name="MKV" Text="MKV" Image="%PATH%\..\Common\media_format\mkv.png" />
    <MediaFormat Name="rm" Text="RM" Image="%PATH%\..\Common\video_format\rm.png" />
    <MediaFormat Name="rmvb" Text="RMVB" Image="%PATH%\..\Common\video_format\rmvb.png" />
    <MediaFormat Name="vc-1" Text="VC-1" Image="%PATH%\..\Common\video_format\wmvhd.png" />
  </MediaFormats>
  <SoundFormats>
    <SoundFormat Name="AAC" Text="AAC Unknown" Image="%PATH%\..\Common\sound_format\aac.png" />
    <SoundFormat Name="AAC10" Text="AAC 1.0" Image="%PATH%\..\Common\sound_format\aac10.png" />
    <SoundFormat Name="AAC20" Text="AAC 2.0" Image="%PATH%\..\Common\sound_format\aac20.png" />
    <SoundFormat Name="AAC21" Text="AAC 2.1" Image="%PATH%\..\Common\sound_format\aac21.png" />
    <SoundFormat Name="AAC40" Text="AAC 4.0" Image="%PATH%\..\Common\sound_format\aac40.png" />
    <SoundFormat Name="AAC41" Text="AAC 4.1" Image="%PATH%\..\Common\sound_format\aac41.png" />
    <SoundFormat Name="AAC51" Text="AAC 5.1" Image="%PATH%\..\Common\sound_format\aac51.png" />
    <SoundFormat Name="AAC70" Text="AAC 7.0" Image="%PATH%\..\Common\sound_format\aac70.png" />
    <SoundFormat Name="AAC71" Text="AAC 7.1" Image="%PATH%\..\Common\sound_format\aac71.png" />
    <SoundFormat Name="DD" Text="DD Unknown" Image="%PATH%\..\Common\sound_format\dd.png" />
    <SoundFormat Name="DD20" Text="Dolby Digital 2.0" Image="%PATH%\..\Common\sound_format\dd20.png" />
    <SoundFormat Name="DD21" Text="Dolby Digital 2.1" Image="%PATH%\..\Common\sound_format\dd21.png" />
    <SoundFormat Name="DD40" Text="Dolby Digital 4.0" Image="%PATH%\..\Common\sound_format\dd40.png" />
    <SoundFormat Name="DD41" Text="Dolby Digital 4.1" Image="%PATH%\..\Common\sound_format\dd41.png" />
    <SoundFormat Name="DD51" Text="Dolby Digital 5.1" Image="%PATH%\..\Common\sound_format\dd51.png" />
    <SoundFormat Name="DD70" Text="Dolby Digital 7.0" Image="%PATH%\..\Common\sound_format\dd70.png" />
    <SoundFormat Name="DD71" Text="Dolby Digital 7.1" Image="%PATH%\..\Common\sound_format\dd71.png" />
    <SoundFormat Name="DDPLUS" Text="Dolby Digital Plus" Image="%PATH%\..\Common\sound_format\ddplus.png" />
    <SoundFormat Name="DTRUEHD" Text="Dolby True HD" Image="%PATH%\..\Common\sound_format\dtruehd.png" />
    <SoundFormat Name="DTS" Text="DTS Unknown" Image="%PATH%\..\Common\sound_format\dts.png" />
    <SoundFormat Name="DTS20" Text="DTS 2.0" Image="%PATH%\..\Common\sound_format\dts20.png" />
    <SoundFormat Name="DTS21" Text="DTS 2.1" Image="%PATH%\..\Common\sound_format\dts21.png" />
    <SoundFormat Name="DTS40" Text="DTS 4.0" Image="%PATH%\..\Common\sound_format\dts40.png" />
    <SoundFormat Name="DTS41" Text="DTS 4.1" Image="%PATH%\..\Common\sound_format\dts41.png" />
    <SoundFormat Name="DTS51" Text="DTS 5.1" Image="%PATH%\..\Common\sound_format\dts51.png" />
    <SoundFormat Name="DTS70" Text="DTS 7.0" Image="%PATH%\..\Common\sound_format\dts70.png" />
    <SoundFormat Name="DTS71" Text="DTS 7.1" Image="%PATH%\..\Common\sound_format\dts71.png" />
    <SoundFormat Name="DTSES" Text="DTS ES" Image="%PATH%\..\Common\sound_format\dtses.png" />
    <SoundFormat Name="DTSHD" Text="DTS HD" Image="%PATH%\..\Common\sound_format\dtshd.png" />
    <SoundFormat Name="FLAC" Text="Flac" Image="%PATH%\..\Common\sound_format\flac.png" />
    <SoundFormat Name="FLAC20" Text="Flac 2.0" Image="%PATH%\..\Common\sound_format\flac20.png" />
    <SoundFormat Name="FLAC21" Text="Flac 2.1" Image="%PATH%\..\Common\sound_format\flac21.png" />
    <SoundFormat Name="FLAC40" Text="Flac 4.0" Image="%PATH%\..\Common\sound_format\flac40.png" />
    <SoundFormat Name="FLAC41" Text="Flac 4.1" Image="%PATH%\..\Common\sound_format\flac41.png" />
    <SoundFormat Name="FLAC51" Text="Flac 5.1" Image="%PATH%\..\Common\sound_format\flac51.png" />
    <SoundFormat Name="FLAC70" Text="Flac 7.0" Image="%PATH%\..\Common\sound_format\flac70.png" />
    <SoundFormat Name="FLAC71" Text="Flac 7.1" Image="%PATH%\..\Common\sound_format\flac71.png" />
    <SoundFormat Name="MLP" Text="MLP" Image="%PATH%\..\Common\sound_format\mlp.png" />
    <SoundFormat Name="MP3" Text="All Mpeg" Image="%PATH%\..\Common\sound_format\mp3.png" />
    <SoundFormat Name="MP310" Text="MP3 1.0" Image="%PATH%\..\Common\sound_format\mp310.png" />
    <SoundFormat Name="MP320" Text="MP3 2.0" Image="%PATH%\..\Common\sound_format\mp320.png" />
    <SoundFormat Name="OGG" Text="Ogg" Image="%PATH%\..\Common\sound_format\ogg.png" />
    <SoundFormat Name="OGG20" Text="Ogg 2.0" Image="%PATH%\..\Common\sound_format\ogg20.png" />
    <SoundFormat Name="OGG21" Text="Ogg 2.1" Image="%PATH%\..\Common\sound_format\ogg21.png" />
    <SoundFormat Name="OGG40" Text="Ogg 4.0" Image="%PATH%\..\Common\sound_format\ogg40.png" />
    <SoundFormat Name="OGG41" Text="Ogg 4.1" Image="%PATH%\..\Common\sound_format\ogg41.png" />
    <SoundFormat Name="OGG51" Text="Ogg 5.1" Image="%PATH%\..\Common\sound_format\ogg51.png" />
    <SoundFormat Name="OGG70" Text="Ogg 7.0" Image="%PATH%\..\Common\sound_format\ogg70.png" />
    <SoundFormat Name="OGG71" Text="Ogg 7.1" Image="%PATH%\..\Common\sound_format\ogg71.png" />
  </SoundFormats>
  <Resolutions>
    <Resolution Name="288P" Text="288p" Image="%PATH%\..\Common\image_resolution\288p.png" />
    <Resolution Name="480I" Text="480I" Image="%PATH%\..\Common\image_resolution\480i.png" />
    <Resolution Name="480P" Text="480p" Image="%PATH%\..\Common\image_resolution\480.png" />
    <Resolution Name="576I" Text="576I" Image="%PATH%\..\Common\image_resolution\576i.png" />
    <Resolution Name="576P" Text="576p" Image="%PATH%\..\Common\image_resolution\576.png" />
    <Resolution Name="720I" Text="720I" Image="%PATH%\..\Common\image_resolution\720i.png" />
    <Resolution Name="720P" Text="720p" Image="%PATH%\..\Common\image_resolution\720.png" />
    <Resolution Name="1080I" Text="1080I" Image="%PATH%\..\Common\image_resolution\1080i.png" />
    <Resolution Name="1080P" Text="1080p" Image="%PATH%\..\Common\image_resolution\1080.png" />
  </Resolutions>
  <VideoFormats>
    <VideoFormat Name="avc" Text="AVC" Image="%PATH%\..\Common\video_format\h264.png" />
    <VideoFormat Name="divx" Text="Divx" Image="%PATH%\..\Common\video_format\divx.png" />
    <VideoFormat Name="mpeg" Text="mpeg" Image="%PATH%\..\Common\video_format\mpeg.png" />
    <VideoFormat Name="vc-1" Text="VC-1" Image="%PATH%\..\Common\video_format\wmvhd.png" />
    <VideoFormat Name="wvc1" Text="wvc1" Image="%PATH%\..\Common\video_format\wmvhd.png" />
    <VideoFormat Name="wmv" Text="WMV" Image="%PATH%\..\Common\video_format\wmv.png" />
    <VideoFormat Name="xvid" Text="XviD" Image="%PATH%\..\Common\video_format\xvid.png" />
  </VideoFormats>
  <ImageDrawTemplate SDKVersion="2.0">
    <OutputImageSettings ColorDepth="Format32bppAlpha" ImageFormat="Jpeg" JpegCompressionLevel="80" Dpi="96" />
    <Canvas AutoSize="False" CenterElements="False" Height="720" Width="1280" Fill="Solid,16777215,-16777216,BackwardDiagonal,-1,-16777216,0,,Tile,None,50,100,,,,0,0,0,0,Line,True" />
    <Elements>
      <ImageElement Name="Fanback" X="0" Y="0" Width="1280" Height="720" Source="File" Offset="0" MultiPageIndex="-1" SourceData="%BACKGROUND%" NullImageUrl="">
        <Actions>
          <RoundCorners BorderColor="-13092808" BorderWidth="1" Roundness="12" Corners="All" />
        </Actions>
      </ImageElement>
      <ImageElement Name="Background" X="0" Y="0" Width="1280" Height="720" Source="File" Offset="0" MultiPageIndex="-1" SourceData="%PATH%\Background7.png" NullImageUrl="">
        <Actions>
          <RoundCorners BorderColor="-13092808" BorderWidth="1" Roundness="12" Corners="All" />
        </Actions>
      </ImageElement>
      <ImageElement Name="Screenshot1" X="155" Y="95" Width="230" Height="135" Source="File" Offset="0" MultiPageIndex="-1" SourceData="%FANART1%" NullImageUrl="">
        <Actions>
          <RoundCorners BorderColor="-13092808" BorderWidth="1" Roundness="3" Corners="All" />
        </Actions>
      </ImageElement>
      <ImageElement Name="Screenshot2" X="1026" Y="95" Width="230" Height="135" Source="File" Offset="0" MultiPageIndex="-1" SourceData="%FANART2%" NullImageUrl="">
        <Actions>
          <RoundCorners BorderColor="-13092808" BorderWidth="1" Roundness="3" Corners="All" />
        </Actions>
      </ImageElement>
      <ImageElement Name="Brandlogo" X="20" Y="22" Width="90" Height="24" Source="File" Offset="0" MultiPageIndex="-1" SourceData="%PATH%\acryan.png" NullImageUrl="">
        <Actions>
          <DropShadow Angle="315" Color="-16777216" Distance="3" Opacity="100" Softness="1" />
        </Actions>
      </ImageElement>
      <ImageElement Name="Starmask" X="190" Y="28" Width="177" Height="18" Source="File" Offset="0" MultiPageIndex="-1" SourceData="%PATH%\starmask.png" NullImageUrl="">
        <Actions>
          <DropShadow Angle="315" Color="-16777216" Distance="3" Opacity="100" Softness="1" />
        </Actions>
      </ImageElement>
      <ImageElement Name="Stars" X="190" Y="28" Width="177" Height="18" Source="Base64String" Offset="0" MultiPageIndex="-1" SourceData="%RATINGSTARS%" NullImageUrl="" />
      <TextElement Name="IMDBTEXT" X="147" Y="32" Width="0" Height="0" AutoSize="True" Multiline="False" Font="Adobe Fan Heiti Std,10,True,False,False,False,Point,,0" ForeColor="-1" StrokeColor="-16777216" StrokeWidth="0" Text="IMDB" TextAlignment="TopLeft" TextQuality="AntiAlias">
        <Actions>
          <DropShadow Angle="315" Color="-16777216" Distance="3" Opacity="100" Softness="1" />
        </Actions>
      </TextElement>
      <TextElement Name="IMDB Rating" X="375" Y="32" Width="0" Height="0" AutoSize="True" Multiline="False" Font="Adobe Fan Heiti Std,10,True,False,False,False,Point,,0" ForeColor="-1" StrokeColor="-16777216" StrokeWidth="0" Text="%RATING%" TextAlignment="TopLeft" TextQuality="AntiAlias" />
      <TextElement Name="Title" X="405" Y="24" Width="600" Height="28" AutoSize="False" Multiline="False" Font="Adobe Fan Heiti Std,18,True,False,False,False,Point,,0" ForeColor="-1" StrokeColor="-16777216" StrokeWidth="0" Text="%TITLE% (%YEAR%)" TextAlignment="MiddleCenter" TextQuality="AntiAlias">
        <Actions>
          <DropShadow Angle="315" Color="-16777216" Distance="3" Opacity="100" Softness="1" />
        </Actions>
      </TextElement>
      <ImageElement Name="Studio" X="995" Y="12" Width="72" Height="48" Source="File" Offset="0" MultiPageIndex="-1" SourceData="%PATH%\..\Common\studios\%STUDIOS%.png" NullImageUrl="%PATH%\..\Common\studios\Unknown Studio.png">
        <Actions>
          <DropShadow Angle="315" Color="-16777216" Distance="3" Opacity="100" Softness="1" />
        </Actions>
      </ImageElement>
      <TextElement Name="HourNumber" X="1056" Y="20" Width="50" Height="40" AutoSize="False" Multiline="False" Font="Aeon Player CAPS,30,Point,,0" ForeColor="-1" StrokeColor="-16777216" StrokeWidth="0" Text="23" TextAlignment="MiddleRight" TextQuality="AntiAlias">
        <Actions>
          <DropShadow Angle="315" Color="-16777216" Distance="3" Opacity="100" Softness="1" />
        </Actions>
      </TextElement>
      <TextElement Name="TextBelow" X="1096" Y="34" Width="81" Height="18" AutoSize="False" Multiline="False" Font="Aeon Player CAPS,15,Point,,0" ForeColor="-1" StrokeColor="-16777216" StrokeWidth="0" Text="24 MINUTES" TextAlignment="TopLeft" TextQuality="AntiAlias">
        <Actions>
          <DropShadow Angle="315" Color="-16777216" Distance="3" Opacity="100" Softness="1" />
        </Actions>
      </TextElement>
      <TextElement Name="TextAbove" X="1100" Y="22" Width="95" Height="18" AutoSize="True" Multiline="False" Font="Square721 BdEx BT,13,Point,,0" ForeColor="-1" StrokeColor="-16777216" StrokeWidth="0" Text="HOUR" TextAlignment="TopLeft" TextQuality="AntiAlias">
        <Actions>
          <DropShadow Angle="315" Color="-16777216" Distance="3" Opacity="100" Softness="1" />
        </Actions>
      </TextElement>
      <ImageElement Name="Certification" X="1200" Y="20" Width="40" Height="32" Source="File" Offset="0" MultiPageIndex="-1" SourceData="%PATH%\..\common\certifications\%CERTIFICATION%.png" NullImageUrl="%PATH%\..\common\certifications\NR.png">
        <Actions>
          <DropShadow Angle="315" Color="-16777216" Distance="3" Opacity="100" Softness="1" />
        </Actions>
      </ImageElement>
      <TextElement Name="Generaltext" X="20" Y="80" Width="90" Height="17" AutoSize="False" Multiline="False" Font="Adobe Fan Heiti Std,12,Point,,0" ForeColor="-1" StrokeColor="-16777216" StrokeWidth="0" Text="GENERAL" TextAlignment="MiddleCenter" TextQuality="AntiAlias">
        <Actions>
          <DropShadow Angle="315" Color="-16777216" Distance="3" Opacity="100" Softness="1" />
        </Actions>
      </TextElement>
      <ImageElement Name="SourceFlags" X="14" Y="92" Width="100" Height="74" Source="File" Offset="0" MultiPageIndex="-1" SourceData="" NullImageUrl="%PATH%\..\Common\SourceFlags\bluray.png">
        <Actions>
          <DropShadow Angle="315" Color="-16777216" Distance="3" Opacity="100" Softness="1" />
        </Actions>
      </ImageElement>
      <ImageElement Name="Resolution" X="14" Y="167" Width="100" Height="74" Source="Base64String" Offset="0" MultiPageIndex="-1" SourceData="%RESOLUTION%" NullImageUrl="">
        <Actions>
          <DropShadow Angle="315" Color="-16777216" Distance="3" Opacity="100" Softness="1" />
        </Actions>
      </ImageElement>
      <ImageElement Name="Media" X="14" Y="242" Width="100" Height="74" Source="Base64String" Offset="0" MultiPageIndex="-1" SourceData="%MEDIAFORMAT%" NullImageUrl="">
        <Actions>
          <DropShadow Angle="315" Color="-16777216" Distance="3" Opacity="100" Softness="1" />
        </Actions>
      </ImageElement>
      <TextElement Name="Videotext" X="20" Y="337" Width="90" Height="17" AutoSize="False" Multiline="False" Font="Adobe Fan Heiti Std,12,Point,,0" ForeColor="-1" StrokeColor="-16777216" StrokeWidth="0" Text="VIDEO" TextAlignment="MiddleCenter" TextQuality="AntiAlias">
        <Actions>
          <DropShadow Angle="315" Color="-16777216" Distance="3" Opacity="100" Softness="1" />
        </Actions>
      </TextElement>
      <ImageElement Name="VCodec" X="14" Y="349" Width="100" Height="74" Source="Base64String" Offset="0" MultiPageIndex="-1" SourceData="%VIDEOFORMAT%" NullImageUrl="">
        <Actions>
          <DropShadow Angle="315" Color="-16777216" Distance="3" Opacity="100" Softness="1" />
        </Actions>
      </ImageElement>
      <ImageElement Name="Aspect Icon" X="14" Y="424" Width="100" Height="74" Source="File" Offset="0" MultiPageIndex="-1" SourceData="" NullImageUrl="" />
      <TextElement Name="Audiotext" X="20" Y="514" Width="90" Height="17" AutoSize="False" Multiline="False" Font="Adobe Fan Heiti Std,12,Point,,0" ForeColor="-1" StrokeColor="-16777216" StrokeWidth="0" Text="AUDIO" TextAlignment="MiddleCenter" TextQuality="AntiAlias">
        <Actions>
          <DropShadow Angle="315" Color="-16777216" Distance="3" Opacity="100" Softness="1" />
        </Actions>
      </TextElement>
      <ImageElement Name="Test00" X="14" Y="526" Width="100" Height="74" Source="File" Offset="0" MultiPageIndex="-1" SourceData="" NullImageUrl="" />
      <TextElement Name="Language1" X="20" Y="593" Width="90" Height="17" AutoSize="False" Multiline="False" Font="Adobe Fan Heiti Std,10,Point,,0" ForeColor="-1" StrokeColor="-16777216" StrokeWidth="0" Text="%LANGUAGE%" TextAlignment="MiddleCenter" TextQuality="AntiAlias" />
      <ImageElement Name="Test01" X="14" Y="601" Width="100" Height="74" Source="File" Offset="0" MultiPageIndex="-1" SourceData="" NullImageUrl="%PATH%\..\common\sound_format\NOAUDIO.png" />
      <TextElement Name="Language2" X="20" Y="668" Width="90" Height="17" AutoSize="False" Multiline="False" Font="Adobe Fan Heiti Std,10,Point,,0" ForeColor="-1" StrokeColor="-16777216" StrokeWidth="0" Text="" TextAlignment="MiddleCenter" TextQuality="AntiAlias" />
      <TextElement Name="Tagline" X="410" Y="100" Width="590" Height="15" AutoSize="False" Multiline="False" Font="Adobe Fan Heiti Std,11,True,False,False,False,Point,,0" ForeColor="-1" StrokeColor="-16777216" StrokeWidth="0" Text="- %TAGLINE% -" TextAlignment="MiddleCenter" TextQuality="AntiAlias">
        <Actions>
          <DropShadow Angle="315" Color="-16777216" Distance="3" Opacity="100" Softness="1" />
        </Actions>
      </TextElement>
      <TextElement Name="Plot" X="420" Y="139" Width="570" Height="200" AutoSize="False" Multiline="True" Font="Adobe Fan Heiti Std,12,True,False,False,False,Point,,0" ForeColor="-1" StrokeColor="-16777216" StrokeWidth="0" Text="%PLOT%" TextAlignment="TopLeft" TextQuality="AntiAlias">
        <Actions>
          <DropShadow Angle="315" Color="-16777216" Distance="3" Opacity="100" Softness="1" />
        </Actions>
      </TextElement>
      <TextElement Name="Cast" X="152" Y="235" Width="236" Height="85" AutoSize="False" Multiline="True" Font="Adobe Fan Heiti Std,11,True,False,False,False,Point,,0" ForeColor="-1" StrokeColor="-16777216" StrokeWidth="0" Text="Starring: %ACTORS%" TextAlignment="TopLeft" TextQuality="AntiAlias">
        <Actions>
          <DropShadow Angle="315" Color="-16777216" Distance="3" Opacity="100" Softness="1" />
        </Actions>
      </TextElement>
      <TextElement Name="Director" X="1023" Y="235" Width="236" Height="14" AutoSize="False" Multiline="False" Font="Adobe Fan Heiti Std,11,True,False,False,False,Point,,0" ForeColor="-1" StrokeColor="-16777216" StrokeWidth="0" Text="Director: %DIRECTORS%" TextAlignment="TopLeft" TextQuality="AntiAlias">
        <Actions>
          <DropShadow Angle="315" Color="-16777216" Distance="3" Opacity="100" Softness="1" />
        </Actions>
      </TextElement>
      <TextElement Name="Genre" X="1023" Y="260" Width="236" Height="20" AutoSize="False" Multiline="False" Font="Adobe Fan Heiti Std,11,True,False,False,False,Point,,0" ForeColor="-1" StrokeColor="-16777216" StrokeWidth="0" Text="Genre: %GENRES%" TextAlignment="TopLeft" TextQuality="AntiAlias">
        <Actions>
          <DropShadow Angle="315" Color="-16777216" Distance="3" Opacity="100" Softness="1" />
        </Actions>
      </TextElement>
      <TextElement Name="SubtitlesTEXT" X="1023" Y="285" Width="236" Height="28" AutoSize="False" Multiline="True" Font="Adobe Fan Heiti Std,11,True,False,False,False,Point,,0" ForeColor="-1" StrokeColor="-16777216" StrokeWidth="0" Text="%ALLSUBTITLES% Subtitled" TextAlignment="TopLeft" TextQuality="AntiAlias">
        <Actions>
          <DropShadow Angle="315" Color="-16777216" Distance="3" Opacity="100" Softness="1" />
        </Actions>
      </TextElement>
      <ImageElement Name="Folder-2" X="186" Y="428" Width="127" Height="180" Source="File" Offset="0" MultiPageIndex="-1" SourceData="" NullImageUrl="">
        <Actions>
          <RoundCorners BorderColor="-13092808" BorderWidth="1" Roundness="9" Corners="All" />
          <PerspectiveView Angle="30" Orientation="LeftToRight" />
        </Actions>
      </ImageElement>
      <ImageElement Name="Folder-1" X="361" Y="384" Width="180" Height="256" Source="File" Offset="0" MultiPageIndex="-1" SourceData="" NullImageUrl="">
        <Actions>
          <RoundCorners BorderColor="-13092808" BorderWidth="1" Roundness="9" Corners="All" />
          <PerspectiveView Angle="30" Orientation="LeftToRight" />
        </Actions>
      </ImageElement>
      <ImageElement Name="Folder0" X="592" Y="360" Width="225" Height="320" Source="File" Offset="0" MultiPageIndex="-1" SourceData="" NullImageUrl="">
        <Actions>
          <RoundCorners BorderColor="-13092808" BorderWidth="1" Roundness="9" Corners="All" />
        </Actions>
      </ImageElement>
      <ImageElement Name="Folder1" X="898" Y="384" Width="180" Height="256" Source="File" Offset="0" MultiPageIndex="-1" SourceData="" NullImageUrl="">
        <Actions>
          <RoundCorners BorderColor="-13092808" BorderWidth="1" Roundness="9" Corners="All" />
          <PerspectiveView Angle="30" Orientation="RightToLeft" />
        </Actions>
      </ImageElement>
      <ImageElement Name="Folder2" X="1119" Y="428" Width="127" Height="180" Source="File" Offset="0" MultiPageIndex="-1" SourceData="" NullImageUrl="">
        <Actions>
          <RoundCorners BorderColor="-13092808" BorderWidth="1" Roundness="9" Corners="All" />
          <PerspectiveView Angle="30" Orientation="RightToLeft" />
        </Actions>
      </ImageElement>
   </Elements>
  </ImageDrawTemplate>
</Template>
s1l3nc0r
WDTVer
 
Posts: 29
Joined: Tue Aug 24, 2010 5:02 am

Re: XSL Support for templates   

Postby Buhric » Wed Dec 15, 2010 4:48 pm

k I found your problem

its the same reason for all of those items

here it is.... in XLST when you call
Code: Select all
<xsl:apply-templates select="@*|node()"/>
inside a <xsl:copy>
you are basicaly saying "copy anything that are Attributes or Nodes from the original XML file"
then you go on and try to modify the attributes of the Node refered in the
Code: Select all
<xsl:template match="//TextElement[@Name='XXXXXXXXXX']">
which you CAN NOT do since you already copied the "Actions" node of the current element.... an easy fixe will be to do this:

Code: Select all
<xsl:template match="//TextElement[@Name='IMDB Rating']">
  <xsl:copy>
    <xsl:apply-templates select="@*"/>
    <xsl:choose>
      <xsl:when test="myjs:getRatingPercent($RATING) >= 80">
        <xsl:attribute name="StrokeColor">-256</xsl:attribute>
        <xsl:attribute name="ForeColor">-256</xsl:attribute>
      </xsl:when>
      <xsl:when test="myjs:getRatingPercent($RATING) >= 50">
        <xsl:attribute name="StrokeColor">-16777216</xsl:attribute>
        <xsl:attribute name="ForeColor">-2500135</xsl:attribute>
      </xsl:when>
      <xsl:when test="myjs:getRatingPercent($RATING) >= 0">
        <xsl:attribute name="StrokeColor">-1</xsl:attribute>
        <xsl:attribute name="ForeColor">-65536</xsl:attribute>
      </xsl:when>
    </xsl:choose>
    <xsl:apply-templates select="node()"/>
  </xsl:copy>
</xsl:template>
which will do the following:
copy the attribute of the current node, then apply any modifucation to those attributes, then copy the rest of the Nodes inside the current Node
You can apply this fix to the other "problematic" Elements....

So instead of having
Code: Select all
<xsl:apply-templates select="@*|node()"/>

I divided it in 2 parts...
Code: Select all
<xsl:apply-templates select="@*"/>
.....
<xsl:apply-templates select="node()"/>



As for the time not showing alligned... looks like you are using Alucards code....
the reason it might not work is because the code was writen for TextElements that had no "Actions" nodes in them....
by adding the drop shadow, you added a "Actions" node in the XML, and if you look at the XSLT, you are adding another "Actions" node
so the one from the XSLT will get ignored...
to fix this modify them to look like the following:
Code: Select all
  <xsl:template match="TextElement[@Name='TextAbove']/Actions">
    <xsl:variable name="hours" select="myjs:getTime($DurationSec, $Runtime,'hours')"/>
    <xsl:variable name="minutes" select="myjs:getTime($DurationSec, $Runtime,'minutes')"/>
    <xsl:variable name="seconds" select="myjs:getTime($DurationSec, $Runtime,'seconds')"/>
    <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
      <xsl:choose>
        <xsl:when test="($hours = 1)">
          <Stretch Height="13" Width="74" />
        </xsl:when>
        <xsl:when test="($hours > 1)">
          <Stretch Height="13" Width="74" />
        </xsl:when>
        <xsl:when test="($minutes > 0)">
          <Stretch Height="13" Width="75" />
        </xsl:when>
      </xsl:choose>
    </xsl:copy>
  </xsl:template>
Make it stop at the "Actions" node by adding the "/Actions" on the "<xsl:template match" line
remote the "<Actions> </Actions>" delimeters, leave just the "<Streach " line untouched
and it should work
Buhric
Global Moderator
 
Posts: 616
Joined: Thu Apr 15, 2010 2:49 pm

Re: XSL Support for templates   

Postby s1l3nc0r » Thu Dec 16, 2010 1:22 pm

Thanks a lot Buhric, really appreciate it.
s1l3nc0r
WDTVer
 
Posts: 29
Joined: Tue Aug 24, 2010 5:02 am

Re: XSL Support for templates   

Postby carmatana » Sun Jan 16, 2011 10:19 pm

Hi,

Is there a way to count the number of characters in a field, ie Title.

I would like to resize the Title font to a smaller one if say numchar > 40.

Thanks in advance

EDIT, Apologies, I found the solution in page 3. :oops:
carmatana
n00b
 
Posts: 4
Joined: Sun Jan 16, 2011 10:14 pm

Re: XSL Support for templates   

Postby Dutchee » Thu Feb 03, 2011 4:13 pm

Hi All,

Thanks to s1l3nc0r I'm starting to get the hang of the movie sheets with cover trickle, however:
the first movie where I have a VIDEO_TS folder doesn't provide me with the previous/current/next covers at the lower half.

Image

The other films don't have that problem.

All films have their own folder.
The VIDEO_TS folder is inside "Z:\Films\An American Tail The Mystery of the Night Monster [1999]" where Z: is a mapped drive to the POHD. The TG generated files are at the same level as the VIDEO_TS dir.
I'm thinking it's got something to do with it being a DVD folder, but as it happens to be the only one there is, I can't verify just now if that really is the problem or whether it's something else.

Am using sheets by s1l3nc0r: http://rapidshare.com/files/442849343/Monochromised.rar

Anyone any ideas? Buhric?

Thanks in advance.
Dutchee
n00b
 
Posts: 3
Joined: Thu Feb 03, 2011 4:05 pm

PreviousNext

Return to ThumbGen

Who is online

Users browsing this forum: No registered users and 2 guests