[Qooxdoo-commit] qooxdoo/tools compileng_structure.xsl,1.1.2.2,1.1.2.3
Brought to you by:
ecker,
martinwittemann
|
From: Sebastian W. <wp...@us...> - 2006-01-22 18:26:46
|
Update of /cvsroot/qooxdoo/qooxdoo/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1732/tools Modified Files: Tag: renderer compileng_structure.xsl Log Message: Enhanced namegroup handling for properties Index: compileng_structure.xsl =================================================================== RCS file: /cvsroot/qooxdoo/qooxdoo/tools/Attic/compileng_structure.xsl,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -d -r1.1.2.2 -r1.1.2.3 --- compileng_structure.xsl 16 Jan 2006 17:04:18 -0000 1.1.2.2 +++ compileng_structure.xsl 22 Jan 2006 18:26:38 -0000 1.1.2.3 @@ -3,6 +3,12 @@ <xsl:output method="xml" indent="yes" version="1.0" encoding="iso-8859-1"/> + + + + +<!-- ******** CORE ******** --> + <xsl:template match="/"> <result> <properties> @@ -16,6 +22,13 @@ <xsl:template match="text()"/> + + + + + +<!-- ******** UTILITIES ******** --> + <xsl:template name="tolower"> <xsl:param name="in"/> @@ -34,16 +47,42 @@ <xsl:value-of select="substring($in, 2)"/> </xsl:template> + + + + + + +<!-- ******** PROPERTIES ******** --> + <xsl:template match="name[text()='addProperty']"> <property> <xsl:for-each select="../following-sibling::argumentgroup/commandgroup/block/namegroup[following-sibling::token[position()=1 and @detail='COLON']]"> <xsl:attribute name="{name/text()}"> - <xsl:value-of select="following-sibling::*[position()=2]/text()"/> + <xsl:choose> + <xsl:when test="following-sibling::*[position()=2 and name()='namegroup']"> + <xsl:for-each select="following-sibling::*[position()=2 and name()='namegroup']/*"> + <xsl:value-of select="."/> + <xsl:if test="position()!=last()">.</xsl:if> + </xsl:for-each> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="following-sibling::*[position()=2]/text()"/> + </xsl:otherwise> + </xsl:choose> </xsl:attribute> </xsl:for-each> </property> </xsl:template> + + + + + + +<!-- ******** FUNCTIONS ******** --> + <xsl:template match="function"> <function> <xsl:attribute name="modifier">false</xsl:attribute> @@ -53,17 +92,17 @@ <xsl:choose> <xsl:when test="namegroup"> <xsl:attribute name="anonymous">false</xsl:attribute> - + <xsl:for-each select="namegroup/*[position()=last()]"> <xsl:value-of select="text()"/> - </xsl:for-each> + </xsl:for-each> </xsl:when> <xsl:otherwise> <xsl:attribute name="anonymous">true</xsl:attribute> - + <xsl:for-each select="preceding-sibling::namegroup/*[position()=last()]"> <xsl:value-of select="text()"/> - </xsl:for-each> + </xsl:for-each> </xsl:otherwise> </xsl:choose> </xsl:variable> @@ -71,7 +110,7 @@ <xsl:attribute name="name"> <xsl:value-of select="$name"/> </xsl:attribute> - + <xsl:if test="starts-with($name, '_')"> <xsl:attribute name="private">true</xsl:attribute> |