[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] looping through a lookup table
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>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|