Author: rahul Date: Fri Aug 28 03:24:58 2009 New Revision: 808743 URL: http://svn.apache.org/viewvc?rev=808743&view=rev Log: Simplify namespaces.
Modified: commons/proper/scxml/branches/J6/extras/xmi2scxml.xsl Modified: commons/proper/scxml/branches/J6/extras/xmi2scxml.xsl URL: http://svn.apache.org/viewvc/commons/proper/scxml/branches/J6/extras/xmi2scxml.xsl?rev=808743&r1=808742&r2=808743&view=diff ============================================================================== --- commons/proper/scxml/branches/J6/extras/xmi2scxml.xsl (original) +++ commons/proper/scxml/branches/J6/extras/xmi2scxml.xsl Fri Aug 28 03:24:58 2009 @@ -15,7 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. --> -<xsl:stylesheet version="2.0" +<xsl:stylesheet version="2.0" xmlns="http://www.w3.org/2005/07/scxml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xmi="http://schema.omg.org/spec/XMI/2.1" xmlns:uml="http://www.eclipse.org/uml2/3.0.0/UML" xmlns:scxml="http://www.w3.org/2005/07/scxml"> @@ -42,7 +42,7 @@ This file was generated by a stylesheet from the Apache Commons SCXML project: http://commons.apache.org/scxml </xsl:comment><xsl:text>
</xsl:text> - <scxmlfiles> + <scxmlfiles xmlns=""> <xsl:apply-templates select="packagedElement" /> </scxmlfiles><xsl:text>
</xsl:text> </xsl:template> @@ -51,7 +51,7 @@ <xsl:variable name="type" select="@xmi:type" /> <xsl:variable name="name" select="@name" /> <xsl:variable name="filename" select="concat($name,'.xml')" /> - <file uml2name="{$name}" scxmlfile="{$filename}" /> + <file xmlns="" uml2name="{$name}" scxmlfile="{$filename}" /> <xsl:result-document href="{$filename}" method="xml"> <xsl:comment> Licensed to the Apache Software Foundation (ASF) under one or more @@ -75,9 +75,9 @@ </xsl:comment><xsl:text>
</xsl:text> <xsl:choose> <xsl:when test="count(child::region) > 1"> - <scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" + <scxml version="1.0" initial="__root"> - <parallel xmlns="http://www.w3.org/2005/07/scxml" id="__root"> + <parallel id="__root"> <xsl:apply-templates select="region"> <xsl:with-param name="orth" select="true()"/> </xsl:apply-templates> @@ -85,7 +85,7 @@ </scxml><xsl:text>
</xsl:text> </xsl:when> <xsl:otherwise> - <scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" + <scxml version="1.0" initial="{region/subvert...@xmi:type='uml:Pseudostate'][empty(@kind)]/@xmi:id}"> <xsl:apply-templates select="region"> <xsl:with-param name="orth" select="false()"/> @@ -100,7 +100,7 @@ <xsl:param name="orth" /> <xsl:choose> <xsl:when test="$orth"> - <state xmlns="http://www.w3.org/2005/07/scxml" id="{concat('__region',position())}" initial="{subvert...@xmi:type='uml:Pseudostate'][empty(@kind)]/@xmi:id}"> + <state id="{concat('__region',position())}" initial="{subvert...@xmi:type='uml:Pseudostate'][empty(@kind)]/@xmi:id}"> <xsl:apply-templates select="subvertex" /> </state> </xsl:when> @@ -119,29 +119,29 @@ <xsl:when test="$type='uml:Pseudostate'"> <xsl:choose> <xsl:when test="@kind='deepHistory'"> - <history xmlns="http://www.w3.org/2005/07/scxml" type="deep" id="{$id}"> + <history type="deep" id="{$id}"> <xsl:apply-templates select="../transiti...@source=$xmiid]" /> </history> </xsl:when> <xsl:when test="@kind='shallowHistory'"> - <history xmlns="http://www.w3.org/2005/07/scxml" type="shallow" id="{$id}"> + <history type="shallow" id="{$id}"> <xsl:apply-templates select="../transiti...@source=$xmiid]" /> </history> </xsl:when> <xsl:otherwise> - <state xmlns="http://www.w3.org/2005/07/scxml" id="{$id}"> + <state id="{$id}"> <xsl:apply-templates select="../transiti...@source=$xmiid]" /> </state> </xsl:otherwise> </xsl:choose> </xsl:when> <xsl:when test="$type='uml:State'"> - <state xmlns="http://www.w3.org/2005/07/scxml" id="{$id}"> + <state id="{$id}"> <xsl:apply-templates select="../transiti...@source=$xmiid]" /> </state> </xsl:when> <xsl:when test="$type='uml:FinalState'"> - <final xmlns="http://www.w3.org/2005/07/scxml" id="{$id}" /> + <final id="{$id}" /> </xsl:when> <xsl:otherwise> <xsl:apply-templates /> @@ -154,10 +154,10 @@ <xsl:variable name="tname" select="if (empty(../subvert...@xmi:id=$target]/@name)) then ../subvert...@xmi:id=$target]/@xmi:id else ../subvert...@xmi:id=$target]/@name" /> <xsl:choose> <xsl:when test="empty(@name)"> - <transition xmlns="http://www.w3.org/2005/07/scxml" target="{$tname}" /> + <transition target="{$tname}" /> </xsl:when> <xsl:otherwise> - <transition xmlns="http://www.w3.org/2005/07/scxml" event="{...@name}" target="{$tname}" /> + <transition event="{...@name}" target="{$tname}" /> </xsl:otherwise> </xsl:choose> </xsl:template>