Hello List,
This stylesheet uses a static lookup table to define element attributes
that need to be updated. search-local-classes-first="ORANGES" and
include-war-manifest-class-path="APPLES" out output as attributes of the
orion-web-app element AND the web-app-classloader element. They are
attributes of the web-app-class-loader element and should only be output
in the result tree for that element.
How do I get this to work?
thanks,
Ann Marie
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:lookup="my:lookup"
exclude-result-prefixes="lookup">
<lookup:element>
<orion-web-app temporary-directory="/var/temp"
deployment-version="10.0"
ROSE="RED"/>
<web-app-class-loader search-local-classes-first="ORANGES"
include-war-manifest-class-path="APPLES"/>
</lookup:element>
<xsl:template match="node()">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="@*">
<xsl:copy-of select="."/>
<xsl:choose>
<xsl:when test="'orion-web-app'=name(parent::*)">
<xsl:copy-of select="document('')/*/lookup:element/orion-web-app/@*
[name() = name(current())]"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="'web-app-class-loader'=name(parent::*)">
<xsl:copy-of
select="document('')/*/lookup:element/orion-web-app/web-app-class-loader/@*
[name() = name(current())]"/>
</xsl:when>
</xsl:choose>
<xsl:choose>
<xsl:when test="not(//@*=ROSE) and 'orion-web-app'=name(parent::*)">
<xsl:copy-of select="document('')/*/lookup:element/*/@*"/>
</xsl:when>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--