You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ey...@apache.org on 2011/10/18 04:04:29 UTC
svn commit: r1185457 - in /incubator/ambari/trunk: CHANGES.txt
controller/src/main/webapps/wadl.xsl
Author: eyang
Date: Tue Oct 18 02:04:29 2011
New Revision: 1185457
URL: http://svn.apache.org/viewvc?rev=1185457&view=rev
Log:
AMBARI-81. Updated xslt document to show human readable stylesheet. (Eric Yang)
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/controller/src/main/webapps/wadl.xsl
Modified: incubator/ambari/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1185457&r1=1185456&r2=1185457&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Tue Oct 18 02:04:29 2011
@@ -2,6 +2,8 @@ Ambari Change log
Release 0.1.0 - unreleased
+ AMBARI-81. Updated xslt document to show human readable stylesheet. (Eric Yang)
+
AMBARI-80. Implement blueprint get CLI
AMBARI-79. create default blueprint instance
Modified: incubator/ambari/trunk/controller/src/main/webapps/wadl.xsl
URL: http://svn.apache.org/viewvc/incubator/ambari/trunk/controller/src/main/webapps/wadl.xsl?rev=1185457&r1=1185456&r2=1185457&view=diff
==============================================================================
--- incubator/ambari/trunk/controller/src/main/webapps/wadl.xsl (original)
+++ incubator/ambari/trunk/controller/src/main/webapps/wadl.xsl Tue Oct 18 02:04:29 2011
@@ -376,12 +376,29 @@
<a href="{$url}"><xsl:value-of select="$url"/></a>
</xsl:when>
<xsl:otherwise>
- <xsl:value-of select="text()"/>
+ <xsl:choose>
+ <xsl:when test="node()[1]!=text()">
+ <xsl:apply-templates select="node()" mode="copy"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="text()"/>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:template>
+<xsl:template match="html:*" mode="copy">
+ <!-- remove the prefix on HTML elements -->
+ <xsl:element name="{local-name()}">
+ <xsl:for-each select="@*">
+ <xsl:attribute name="{local-name()}"><xsl:value-of select="."/></xsl:attribute>
+ </xsl:for-each>
+ <xsl:apply-templates select="node()" mode="copy"/>
+ </xsl:element>
+</xsl:template>
+
<xsl:template name="getId">
<xsl:choose>
<xsl:when test="@id"><xsl:value-of select="@id"/></xsl:when>