<?xml version="1.0" encoding="UTF-8"?>
<!-- xsltlib complains about the xsl: namespace prefix... 
<!DOCTYPE stylesheet
[
<!ENTITY t "<xsl:text>	</xsl:text>">
<!ENTITY n "<xsl:text>
</xsl:text>">
]>
-->
<?altova_samplexml Z:\resources\templates\01default_st\styles\05darkroom.xml?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:amg_gs="http://ns.adobe.com/AMG/1.2/" xmlns:amg_a="http://ns.adobe.com/AMG/FlashGallery/style/1.0/">
	<xsl:output method="text" version="1.0" encoding="UTF-8" indent="yes"/>
	<xsl:variable name="empty_string" />

	<xsl:template match="/amg_gs:galleryStyle">
		<xsl:text>// rendered by styleFlash.xslt
if(AOM.AmgGalleryMaker.currentDocument.aomJsFuncs.amgGalleryMakerData == undefined)
    AOM.AmgGalleryMaker.currentDocument.amgGalleryMakerData = {};
AOM.AmgGalleryMakerData = AOM.AmgGalleryMaker.currentDocument.aomJsFuncs.amgGalleryMakerData;
</xsl:text>
		<xsl:call-template name="identifier" />
		<xsl:call-template name="appearance" />
	</xsl:template>

	<xsl:template name="identifier">
AOM.AmgGalleryMakerData.models.styleName = <xsl:value-of select="amg_gs:styleInfo/amg_gs:styleName/." />;<xsl:text>
</xsl:text>
	</xsl:template>

	<xsl:template name="appearance">
AOM.AmgGalleryMakerData.models.style = [<xsl:text />
		<xsl:for-each select="amg_a:appearance">
			<xsl:call-template name="items">
				<xsl:with-param name="path"><xsl:value-of select="name()" /></xsl:with-param>
			</xsl:call-template>
		</xsl:for-each>
];
	</xsl:template>
	
	<xsl:template name="items">
		<xsl:param name="path">undefined</xsl:param>
		<xsl:for-each select="node()">
			<xsl:variable name="parent"><xsl:value-of select="name()" /></xsl:variable>
			<xsl:variable name="new_path"><xsl:value-of select="concat($path, '.', $parent)" /></xsl:variable>
			<xsl:call-template name="items">
				<xsl:with-param name="path" select="$new_path" />
			</xsl:call-template>
			<xsl:call-template name="item_properties">
				<xsl:with-param name="path" select="$new_path" />
			</xsl:call-template>
		</xsl:for-each>
	</xsl:template>
	
	<xsl:template name="item_properties">
		<xsl:param name="path">undefined</xsl:param>
		<xsl:for-each select="@*">
			{path:"<xsl:value-of select="$path" />.<xsl:value-of select="name()" />", value:"<xsl:value-of select="." />"},<xsl:text />
		</xsl:for-each>
	</xsl:template>
</xsl:stylesheet>

<!--
-->
