<?xml version='1.0' encoding='utf-8' ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:variable name = "upper" select = "'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
	<xsl:variable name = "lower" select = "'abcdefghijklmnopqrstuvwxyz'" />
	<xsl:param name="sysid" select="'dev'"/>
	<xsl:output method="text"/>
	<xsl:template name="ResolvePath">
		<xsl:param name="PathNodes"/>
		<xsl:param name="PathID"/>
		<xsl:param name="PathType"/>
		<xsl:variable name="CurrentPath" select="$PathNodes[ (string-length($PathID) != 0 and string(@id)=string($PathID)) or (string-length($PathID) = 0 and string(@type)=string($PathType))]"/>
		<xsl:choose>
			<xsl:when test="$CurrentPath/@rpathtype">
				<xsl:call-template name="ResolvePath">
					<xsl:with-param name="PathNodes" select="$PathNodes"/>
					<xsl:with-param name="PathType" select="$CurrentPath/@rpathtype"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:when test="$CurrentPath/@rpathid">
				<xsl:call-template name="ResolvePath">
					<xsl:with-param name="PathNodes" select="$PathNodes"/>
					<xsl:with-param name="PathID" select="$CurrentPath/@rpathid"/>
				</xsl:call-template>
			</xsl:when>
		</xsl:choose>
		<xsl:call-template name="FormatJSString">
<!--			<xsl:with-param name="content" select="normalize-space($CurrentPath)"/> -->
			<xsl:with-param name="content" select="$CurrentPath"/>
		</xsl:call-template>
	</xsl:template>
	<xsl:template name="GenerateNavigationNodeID">
		<xsl:param name="NavigationNode"/>
		<xsl:value-of select="count(ancestor-or-self::*/preceding::node|ancestor-or-self::node)"/>
	</xsl:template>
	<xsl:template name="FormatJSString">
		<xsl:param name="content"/>
		<xsl:variable name="ta"><![CDATA[&#9;]]></xsl:variable>
		<xsl:variable name="lf"><![CDATA[&#10;]]></xsl:variable>
		<xsl:variable name="cr"><![CDATA[&#13;]]></xsl:variable>
		<xsl:variable name="dq">&quot;</xsl:variable>
		<xsl:variable name="sq">&apos;</xsl:variable>
		<xsl:variable name="bsl">\</xsl:variable>

		<xsl:variable name="aTest" select="contains($content,$ta)"/>
		<xsl:variable name="bTest" select="substring-before($content,$ta)"/>
		<xsl:variable name="cTest" select="string-length(substring-before($content,$ta))"/>
		<xsl:choose>
			<xsl:when test="contains($content,$ta)">
				<xsl:call-template name="FormatJSString">
					<xsl:with-param name="content" select="substring-before($content,$ta)"/>
				</xsl:call-template>
				<xsl:text disable-output-escaping="yes">\t</xsl:text>
				<xsl:call-template name="FormatJSString">
					<xsl:with-param name="content" select="substring-after($content,$ta)"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:when test="contains($content,$lf)">
				<xsl:call-template name="FormatJSString">
					<xsl:with-param name="content" select="substring-before($content,$lf)"/>
				</xsl:call-template>
				<xsl:text disable-output-escaping="yes">\n</xsl:text>
				<xsl:call-template name="FormatJSString">
					<xsl:with-param name="content" select="substring-after($content,$lf)"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:when test="contains($content,$cr)">
				<xsl:call-template name="FormatJSString">
					<xsl:with-param name="content" select="substring-before($content,$cr)"/>
				</xsl:call-template>
				<xsl:text disable-output-escaping="yes">\r</xsl:text>
				<xsl:call-template name="FormatJSString">
					<xsl:with-param name="content" select="substring-after($content,$cr)"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:when test="contains($content,$dq)">
				<xsl:call-template name="FormatJSString">
					<xsl:with-param name="content" select="substring-before($content,$dq)"/>
				</xsl:call-template>
				<xsl:text disable-output-escaping="yes">\&quot;</xsl:text>
				<xsl:call-template name="FormatJSString">
					<xsl:with-param name="content" select="substring-after($content,$dq)"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:when test="contains($content,$sq)">
				<xsl:call-template name="FormatJSString">
					<xsl:with-param name="content" select="substring-before($content,$sq)"/>
				</xsl:call-template>
				<xsl:text disable-output-escaping="yes">\&apos;</xsl:text>
				<xsl:call-template name="FormatJSString">
					<xsl:with-param name="content" select="substring-after($content,$sq)"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:when test="contains($content,$bsl)">
				<xsl:call-template name="FormatJSString">
					<xsl:with-param name="content" select="substring-before($content,$bsl)"/>
				</xsl:call-template>
				<xsl:text disable-output-escaping="yes">\\</xsl:text>
				<xsl:call-template name="FormatJSString">
					<xsl:with-param name="content" select="substring-after($content,$bsl)"/>
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$content"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
</xsl:stylesheet>






<!-- Stylus Studio meta-information - (c)1998-2001 eXcelon Corp.
<metaInformation>
<scenarios ><scenario default="yes" name="Scenario1" userelativepaths="no" url="file://d:\bzProjects\MobileBZ\MobileBZ\Config\Config.xml" htmlbaseurl="" processortype="internal" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/></scenarios><MapperInfo  srcSchemaPath="" srcSchemaRoot="" srcSchemaPathIsRelative="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="no" />
</metaInformation>
-->
