[GME-commit] GMESRC/Tools/ModelMigrate/FrontEnd/res FrontEnd.ico,NONE,1.1 FrontEnd.manifest,NONE,1.1 FrontEnd.rc2,NONE,1.1 TAttrNameChange.xsl,NONE,1.1 TAttrTypeChange.xsl,NONE,1.1 TAttrTypeCheck2Text.xsl,NONE,1.1 TEnumAttrValueChange.xsl,NONE,1.1 TKindNameChange.xsl,NONE,1.1 TRemoveGlobalAttr.xsl,NONE,1.1 TRemoveKind.xsl,NONE,1.1 TRemoveLocalAttr.xsl,NONE,1.1 header.xsl,NONE,1.1 tail.xsl,NONE,1.1

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Wed Nov 16 16:01:19 CST 2005


Update of /project/gme-repository/GMESRC/Tools/ModelMigrate/FrontEnd/res
In directory escher:/tmp/cvs-serv27879/ModelMigrate/FrontEnd/res

Added Files:
	FrontEnd.ico FrontEnd.manifest FrontEnd.rc2 
	TAttrNameChange.xsl TAttrTypeChange.xsl 
	TAttrTypeCheck2Text.xsl TEnumAttrValueChange.xsl 
	TKindNameChange.xsl TRemoveGlobalAttr.xsl TRemoveKind.xsl 
	TRemoveLocalAttr.xsl header.xsl tail.xsl 
Log Message:
ModelMigrate tool checked in.


CVS User: Zoltan Molnar, ISIS (zolmol)

--- NEW FILE: TRemoveLocalAttr.xsl ---
<!-- =============================================================================== -->
<!--         This template rule will remove an attribute owned by a certain kind     -->
<!-- =============================================================================== -->

<xsl:template match="attribute[@kind='##|par1|##' and ../@kind='##|par2|##']"/>

--- NEW FILE: TRemoveGlobalAttr.xsl ---
<!-- =============================================================================== -->
<!--                  This template rule will remove a certain attribute             -->
<!-- =============================================================================== -->

<xsl:template match="attribute[@kind='##|par1|##'/>

--- NEW FILE: FrontEnd.ico ---
(This appears to be a binary file; contents omitted.)

--- NEW FILE: TAttrNameChange.xsl ---
<!-- =============================================================================== -->
<!--                    This template rule will rename an attribute                  -->
<!-- =============================================================================== -->

<xsl:template match="attribute[@kind='##|par1|##'##|OPTIONALLOCALCONDITION|##]">
	<attribute kind="##|par2|##">
	<xsl:apply-templates/>
	</attribute>
</xsl:template>

--- NEW FILE: TKindNameChange.xsl ---
<!-- =============================================================================== -->
<!--                  This template rule will alter a kind's name                    -->
<!-- =============================================================================== -->


<xsl:template match="*[@kind='##|par1|##']">

	<xsl:element name="{name()}">                          <!-- element name is not hardcoded -->

		<xsl:for-each select="@*">
			<xsl:choose>
				<xsl:when test="name()='kind'">        <!-- treat its kind attribute specially -->
					<xsl:attribute name="kind">##|par2|##</xsl:attribute>
				</xsl:when>
				<xsl:otherwise>
					<xsl:copy/>                    <!-- other attributes are just copied-->
				</xsl:otherwise>
			</xsl:choose>
		</xsl:for-each>
	
		<xsl:apply-templates/>

	</xsl:element>

</xsl:template>

--- NEW FILE: FrontEnd.rc2 ---
//
// FrontEnd.RC2 - resources Microsoft Visual C++ does not edit directly
//

#ifdef APSTUDIO_INVOKED
#error this file is not editable by Microsoft Visual C++
#endif //APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
// Add manually edited resources here...

/////////////////////////////////////////////////////////////////////////////

--- NEW FILE: TAttrTypeCheck2Text.xsl ---
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method="text"/>

<xsl:template match="/">Attribute value conversion test started.
<xsl:apply-templates/>
Attribute value conversion test ended.
</xsl:template>

<!-- =============================================================================== -->
<!--        This template rule produces a short listing of the non-convertible       -->
<!--           attribute values from the whole input file into a text file           -->
<!-- =============================================================================== -->

<xsl:template match="attribute[@kind='##|par1|##'##|OPTIONALLOCALCONDITION|##]/value">
	<xsl:if test="string(number(text())) = 'NaN'">[CONVERROR] Error during conversion to number: '<xsl:value-of select="."/>' in '<xsl:value-of select="../@kind"/>' attribute of <xsl:value-of select="name(../../)"/> '<xsl:value-of select="../../name"/>' with '<xsl:value-of select="../../@id"/>' id.
<xsl:message terminate="no">[CONVERROR]s found. Check the target file for details.</xsl:message>
</xsl:if>
</xsl:template>

<!--prevent other stuff getting into the output -->
<xsl:template match="text()">
</xsl:template>

<xsl:template match="*|@*">
	<xsl:copy>
	<xsl:apply-templates select="@*"/>
	<xsl:apply-templates/>
	</xsl:copy>
</xsl:template>

</xsl:stylesheet>
--- NEW FILE: tail.xsl ---
<!-- tail begins -->

<xsl:template match="*|@*">
	<xsl:copy>
	<xsl:apply-templates select="@*"/>
	<xsl:apply-templates/>
	</xsl:copy>
</xsl:template>

</xsl:stylesheet>

--- NEW FILE: TRemoveKind.xsl ---
<!-- =============================================================================== -->
<!--        This template rule will ignore a certain kind                            -->
<!-- =============================================================================== -->

<xsl:template match="*[@kind='##|par1|##']"/>
--- NEW FILE: header.xsl ---
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

<xsl:output method="xml" omit-xml-declaration="no" doctype-system="mga.dtd" indent="yes"/>

<xsl:template match="/">
		<xsl:apply-templates/>
</xsl:template>

<!-- end header -->
--- NEW FILE: FrontEnd.manifest ---
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> 
<assemblyIdentity 
    version="1.0.0.0" 
    processorArchitecture="X86" 
    name="Microsoft.Windows.FrontEnd"
    type="win32" 
/> 
<description>Your app description here</description> 
<dependency> 
    <dependentAssembly> 
        <assemblyIdentity 
            type="win32" 
            name="Microsoft.Windows.Common-Controls" 
            version="6.0.0.0" 
            processorArchitecture="X86" 
            publicKeyToken="6595b64144ccf1df" 
            language="*" 
        /> 
    </dependentAssembly> 
</dependency> 
</assembly>

--- NEW FILE: TEnumAttrValueChange.xsl ---
<!-- =============================================================================== -->
<!--       This template rule will rename an EnumAttribute's enumeration item        -->
<!-- =============================================================================== -->

<xsl:template match="attribute[@kind='##|par1|##'##|OPTIONALLOCALCONDITION|##]/value[./text() = '##|par2|##']">
	<value>##|par3|##</value>
</xsl:template>

--- NEW FILE: TAttrTypeChange.xsl ---
<!-- ================================================================================== -->
<!--  This template checks whether an attribute value can be interpreted as a number    -->
<!--  When the 2nd if test has the form "1=1", terminates the conversion process with   -->
<!--  an error message containing only the first occurence of a conversion failure      -->
<!--  When it has the form "1=0", it continues processing, placing a [CONVERROR] notice -->
<!--  into the target file, where the conversion check failed (a non-number was met)    -->
<!-- ================================================================================== -->

<xsl:template match="attribute[@kind='##|par1|##'##|OPTIONALLOCALCONDITION|##]/value">
	<xsl:if test="string(number(text())) = 'NaN'">
		<xsl:if test="1=##|par2|##">
			<xsl:message terminate="yes">Error during conversion to number: '<xsl:value-of select="."/>' in '<xsl:value-of select="../@kind"/>' attribute of <xsl:value-of select="name(../../)"/> '<xsl:value-of select="../../name"/>' with '<xsl:value-of select="../../@id"/>' id.</xsl:message>
		</xsl:if>
		<xsl:comment>[CONVERROR] Error during conversion to number: '<xsl:value-of select="."/>' in '<xsl:value-of select="../@kind"/>' attribute of <xsl:value-of select="name(../../)"/> '<xsl:value-of select="../../name"/>' with '<xsl:value-of select="../../@id"/>' id.
</xsl:comment>
	</xsl:if>

	<xsl:copy>
	<xsl:apply-templates select = "@*"/>
	<xsl:apply-templates/>
	</xsl:copy>

</xsl:template>



More information about the GME-commit mailing list