7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick<?xml version="1.0" encoding="UTF-8"?>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick<!--
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4NickCopyright (c) 2005-2007 Toine de Greef (a.degreef@chello.nl)
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4NickPermission is hereby granted, free of charge, to any person obtaining a copy
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nickof this software and associated documentation files (the "Software"), to deal
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nickin the Software without restriction, including without limitation the rights
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nickto use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nickcopies of the Software, and to permit persons to whom the Software is
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nickfurnished to do so, subject to the following conditions:
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4NickThe above copyright notice and this permission notice shall be included in
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nickall copies or substantial portions of the Software.
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4NickTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4NickIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4NickFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4NickAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4NickLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4NickOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4NickTHE SOFTWARE.
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick-->
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick<xsl:stylesheet version="1.0"
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nickxmlns:xsl="http://www.w3.org/1999/XSL/Transform"
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nickxmlns:xlink="http://www.w3.org/1999/xlink"
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nickxmlns:svg="http://www.w3.org/2000/svg"
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nickxmlns:def="Definition"
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nickexclude-result-prefixes="def">
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick<xsl:strip-space elements="*" />
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick<xsl:output method="xml" encoding="ISO-8859-1"/>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick<xsl:template name="template_animation">
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:if test="@From"><xsl:attribute name="from"><xsl:value-of select="@From" /></xsl:attribute></xsl:if>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:if test="@To"><xsl:attribute name="to"><xsl:value-of select="@To" /></xsl:attribute></xsl:if>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:if test="@Duration"><xsl:attribute name="dur"><xsl:value-of select="@Duration" /></xsl:attribute></xsl:if>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:if test="@RepeatDuration"><xsl:attribute name="repeatDur"><xsl:value-of select="translate(@RepeatDuration, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" /></xsl:attribute></xsl:if>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:if test="@RepeatCount"><xsl:attribute name="repeatCount"><xsl:value-of select="@RepeatCount" /></xsl:attribute></xsl:if>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:if test="@AutoReverse">
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:attribute name="fill">
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:choose>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:when test="@AutoReverse = 'True'">remove</xsl:when>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:otherwise>freeze</xsl:otherwise>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick </xsl:choose>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick </xsl:attribute>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick </xsl:if>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick</xsl:template>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick<xsl:template name="template_timeline_animations">
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:variable name="id" select="@ID" />
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:variable name="name" select="@Name" />
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:apply-templates select="//*[name(.) = 'SetterTimeline' and ($id = @TargetID or $name = @TargetName)]" />
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick</xsl:template>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick<xsl:template name="template_animation_path">
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:param name="target" />
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:choose>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:when test="$target = '(Line.X2)'">x2</xsl:when>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:when test="$target = '(Rectangle.Opacity)'">opacity</xsl:when>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick </xsl:choose>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick</xsl:template>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick<xsl:template match="*[name(.) = concat(name(..), '.Storyboards')]">
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <!--xsl:apply-templates /-->
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick</xsl:template>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick<xsl:template match="*[name(.) = 'ParallelTimeLine']">
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:apply-templates />
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick</xsl:template>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick<xsl:template match="*[name(.) = 'SetterTimeline']">
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:apply-templates />
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick</xsl:template>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick<xsl:template match="*[name(.) = 'ByteAnimationCollection' or name(.) = 'DecimalAnimationCollection' or name(.) = 'DoubleAnimationCollection' or name(.) = 'Int16AnimationCollection' or name(.) = 'Int32AnimationCollection' or name(.) = 'Int64AnimationCollection' or name(.) = 'LengthAnimationCollection' or name(.) = 'SingleAnimationCollection' or name(.) = 'SizeAnimationCollection' or name(.) = 'ThicknessAnimationCollection']">
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:apply-templates />
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick</xsl:template>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick<xsl:template match="*[name(.) = 'ByteAnimation' or name(.) = 'DecimalAnimation' or name(.) = 'DoubleAnimation' or name(.) = 'Int16Animation' or name(.) = 'Int32Animation' or name(.) = 'Int64Animation' or name(.) = 'LengthAnimation' or name(.) = 'SingleAnimation' or name(.) = 'SizeAnimation' or name(.) = 'ThicknessAnimation']">
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:choose>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:when test="../@Path">
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <animate>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:attribute name="attributeName"><xsl:call-template name="template_animation_path"><xsl:with-param name="target" select="../@Path" /></xsl:call-template></xsl:attribute>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:call-template name="template_animation" />
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick </animate>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick </xsl:when>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:when test="name(..) = concat(name(.), 'Collection')">
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <animate>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:attribute name="attributeName"><xsl:value-of select="translate(substring-after(name(../..), concat(name(../../..), '.')), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" /></xsl:attribute>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:call-template name="template_animation" />
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick </animate>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick </xsl:when>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:when test="name(..) = concat(name(../..), '.AngleAnimations')">
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <animateTransform attributeName="transform" type="rotate">
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:call-template name="template_animation" />
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick </animateTransform>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick </xsl:when>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick </xsl:choose>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick</xsl:template>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick<xsl:template match="*[name(.) = concat(name(..), '.ColorAnimations')]">
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:apply-templates />
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick</xsl:template>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick<xsl:template match="*[name(.) = concat(name(..), '.AngleAnimations')]">
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:apply-templates />
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick</xsl:template>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick<xsl:template match="*[name(.) = 'ColorAnimation']">
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <animateColor>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:if test="../@Path">
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:attribute name="attributeName"><xsl:call-template name="template_animation_path"><xsl:with-param name="target" select="../@Path" /></xsl:call-template></xsl:attribute>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick </xsl:if>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:if test="name(..) = concat(name(../..), '.ColorAnimations')">
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:choose>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:when test="name(../..) = 'SolidColorBrush'">
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:attribute name="attributeName">
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:value-of select="translate(substring-after(name(../../..), concat(name(../../../..), '.')), 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')" />
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick </xsl:attribute>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick </xsl:when>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick </xsl:choose>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick </xsl:if>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:call-template name="template_animation" />
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick </animateColor>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick</xsl:template>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick<xsl:template match="*[name(.) = 'PointAnimation']">
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <animateMotion>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:if test="../@Path">
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:attribute name="attributeName"><xsl:call-template name="template_animation_path"><xsl:with-param name="target" select="../@Path" /></xsl:call-template></xsl:attribute>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick </xsl:if>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick <xsl:call-template name="template_animation" />
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick </animateMotion>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick</xsl:template>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick<xsl:template match="*[name(.) = 'RectAnimation']">
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick<!-- -->
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick</xsl:template>
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick
7765ee8964c8ffd7faee9baa0412abeb1ef5b0a4Nick</xsl:stylesheet>