Commit 04521a9c authored by Fabien Triolet's avatar Fabien Triolet
Browse files

Process file of the music sample

parent 00ff37c7
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE transmorpher SYSTEM "../../dtd/transmorpher.dtd">
<transmorpher name="Music" version="1.0" xmlns:tm="http://transmorpher.fluxmedia.fr/">
<!-- select an artist -->
<query name="artist" type="tmq" root="music-collection">
<param name="artist" select="TEST"/>
<select match="music-collection/owner"/>
<select match="music-collection/artist[name=$artist]"/>
</query>
<!-- removes all tag <time></time> -->
<ruleset name="stripTime">
<remtag match="time" context="track"/>
</ruleset>
<!-- ######################################### -->
<main name="Collection">
<param name="artist">No Doubt</param>
<param name="filename">Music-collection</param>
<!-- ######################################### -->
<generate id="generateXML" type="readfile" out="o">
<with-param name="file">../samples/music/input/${filename}.xml</with-param>
</generate>
<dispatch id="disp" type="broadcast" in="o" out="o1 o2"/>
<apply-ruleset ref="stripTime" id="Strip" in="o1" out="o11"/>
<apply-external id="xml2html" in="o11" out="o12" type="xslt">
<with-param name="file">../samples/music/xslt/${filename}.xsl</with-param>
</apply-external>
<serialize id="FormHTML" type="writefile" in="o12">
<with-param name="file">../samples/music/results/${filename}.html</with-param>
<with-param name="indent">yes</with-param>
</serialize>
<apply-query type="tmq" ref="artist" id="query" in="o2" out="o22">
<with-param name="artist">${artist}</with-param>
</apply-query>
<apply-external id="xml2html" in="o22" out="o23" type="xslt">
<with-param name="file">../samples/music/xslt/${filename}.xsl</with-param>
<with-param name="artist">${artist}</with-param>
</apply-external>
<serialize id="FormArtistHTML" type="writefile" in="OUT">
<with-param name="file">../samples/music/results/${artist}.html</with-param>
<with-param name="indent">yes</with-param>
<with-param name="method">xhtml</with-param>
</serialize>
<!-- ######################################### -->
<generate id="generateXML" type="readfile" out="a1">
<with-param name="file">../samples/music/input/${artist}-cal.xml</with-param>
<!-- <with-param name="type">vcal</with-param> -->
</generate>
<dispatch id="disp" type="broadcast" in="a1" out="a11 a12"/>
<apply-external id="xml2cal" in="a11" out="a21" type="xslt">
<with-param name="file">../samples/music/xslt/form-xvcs.xsl</with-param>
</apply-external>
<serialize id="FormCAL" type="writefile" in="a21">
<with-param name="file">../samples/music/results/${artist}.vcs</with-param>
<with-param name="indent">yes</with-param>
<with-param name="method">text</with-param>
</serialize>
<apply-external id="xml2cal" in="a12" out="a22" type="xslt">
<with-param name="file">../samples/music/xslt/artist-cal.xsl</with-param>
<with-param name="artist">${artist}</with-param>
</apply-external>
<merge id="merger" type="concat" in="o23 a22" out="OUT"/>
</main>
</transmorpher>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment