[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4326: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3501)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4328: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3501)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4329: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3501)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4330: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3501)
XSL Support for templates
Sign up here and you can log into the forum!

XSL Support for templates

Support forum for the great ThumbGen software

XSL to split %LANGUAGES%   

Postby s1l3nc0r » Thu Nov 04, 2010 8:58 am

I am not that experienced in xsl but i am looking for a way to generate new tokens that will split %LANGUAGES% into %LANGUAGE1%, %LANGUAGE2%, etc.

This because Thumbgen and Mediainfo both seem to have trouble extracting the Language from a stream that doesn't have an ID...
s1l3nc0r
WDTVer
 
Posts: 29
Joined: Tue Aug 24, 2010 5:02 am

Re: XSL Support for templates   

Postby Buhric » Thu Nov 04, 2010 1:15 pm

Movie Sheets: -
Buhric
Global Moderator
 
Posts: 616
Joined: Thu Apr 15, 2010 2:49 pm

Re: XSL Support for templates   

Postby thumbgen » Thu Nov 04, 2010 2:03 pm

I just published here: http://www.wdtvlive.net/showthread.php?295-yaDIS-Template a demo-template that is using C# code inside the .xslt file (maybe it is useful for the guys who prefer writing C# code instead of JS).

If you like ThumbGen then buy me a coffee
User avatar
thumbgen
Developer
 
Posts: 1094
Joined: Mon Apr 05, 2010 10:04 pm

Re: XSL Support for templates   

Postby s1l3nc0r » Thu Nov 04, 2010 4:42 pm

Buhric, how would I call the "Name='Country'" in a template.xml file to show a countryflag?
s1l3nc0r
WDTVer
 
Posts: 29
Joined: Tue Aug 24, 2010 5:02 am

Re: XSL Support for templates   

Postby Buhric » Thu Nov 04, 2010 6:18 pm

Movie Sheets: -
Buhric
Global Moderator
 
Posts: 616
Joined: Thu Apr 15, 2010 2:49 pm

Re: XSL Support for templates   

Postby s1l3nc0r » Fri Nov 05, 2010 12:04 am

Works almost perfectly.
There was a small error in your last bit of code:
<xsl:template match="//ImageElement[@Name='Language']/@SourceData">
<xsl:attribute name="SourceData">
<xsl:value-of select="concat($PATH,'\..\common\COUNTRIES\',string(myjs:getLanguages($LANGUAGES,0),'.png')"/>
</xsl:attribute>
</xsl:template>

should be
<xsl:template match="//ImageElement[@Name='Language']/@SourceData">
<xsl:attribute name="SourceData">
<xsl:value-of select="concat($PATH,'\..\common\COUNTRIES\',string(myjs:getLanguages($LANGUAGES,0)),'.png')"/>
</xsl:attribute>
</xsl:template>
[quote]
<ImageElement Name="Language" X="410" Y="325" Width="20" Height="17" Source="File" Offset="0" MultiPageIndex="-1" SourceData="%PATH%/../Common/COUNTRIES/%LANGUAGE%.png" NullImageUrl="" />
<ImageElement Name="Language1" X="433" Y="325" Width="20" Height="17" Source="File" Offset="0" MultiPageIndex="-1" SourceData="%PATH%/../Common/COUNTRIES/%LANGUAGE1%.png" NullImageUrl="" />
<ImageElement Name="Language2" X="456" Y="325" Width="20" Height="17" Source="File" Offset="0" MultiPageIndex="-1"
SourceData="%PATH%/../Common/COUNTRIES/%LANGUAGE2%.png" NullImageUrl="" />
<ImageElement Name="Language3" X="479" Y="325" Width="20" Height="17" Source="File" Offset="0" MultiPageIndex="-1" SourceData="%PATH%/../Common/COUNTRIES/%LANGUAGE3%.png" NullImageUrl="" />
<ImageElement Name="Language4" X="502" Y="325" Width="20" Height="17" Source="File" Offset="0" MultiPageIndex="-1" SourceData="%PATH%/../Common/COUNTRIES/%LANGUAGE4%.png" NullImageUrl="" />

Only disadvantage is when there are less audio streams than the number of streams set in the template, it expects an object ? (Like it tries to generate a flag for a non existing audio stream)
s1l3nc0r
WDTVer
 
Posts: 29
Joined: Tue Aug 24, 2010 5:02 am

Re: XSL Support for templates   

Postby Buhric » Fri Nov 05, 2010 2:52 am

My bad you are right, I missed a ")" at the end...

Well yes and no.. since it return's an empty string, the "SourceData" will be pointing to an non-existent file
thus the ImageElement will be a "tranparent" place holder...

PS I correct my code in the previous posts...
Movie Sheets: -
Buhric
Global Moderator
 
Posts: 616
Joined: Thu Apr 15, 2010 2:49 pm

Re: XSL Support for templates   

Postby s1l3nc0r » Fri Nov 05, 2010 4:37 am

sadly it doesn't seem to work that way...
I just tried it on a movie with 2 audio tracks
When having 5 languages in the xml template, it says object required and does not generate a sheet.
when removing the last 3, it does generate the sheet properly.
s1l3nc0r
WDTVer
 
Posts: 29
Joined: Tue Aug 24, 2010 5:02 am

Re: XSL Support for templates   

Postby chaunspecial » Fri Nov 05, 2010 11:48 am

chaunspecial
WDTVer
 
Posts: 23
Joined: Thu Sep 09, 2010 1:00 pm

Re: XSL Support for templates   

Postby thumbgen » Fri Nov 05, 2010 12:30 pm


If you like ThumbGen then buy me a coffee
User avatar
thumbgen
Developer
 
Posts: 1094
Joined: Mon Apr 05, 2010 10:04 pm

PreviousNext

Return to ThumbGen

Who is online

Users browsing this forum: No registered users and 2 guests