[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: referring to variables using variables?
Hello again,
I bound a namespace prefix xmlns and it doesnt complain when i translate it but the output does not show content from any of the imported documents. Also in the ouput, the statement xmlns:xx="urn:schemas-microsoft-com:xslt" is included in each <h1> tag as a paramter?? <xsl:stylesheet version="1.0" xmlns:xx="urn:schemas-microsoft-com:xslt" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" /> <!--Load people in xml files--> <xsl:variable name="index"> <HR>http...</HR> <Recruitment_and_Hiring>http...</Recruitment_and_Hiring> <New_Managers>http...</New_Managers> <New_Starters>http...</New_Starters> </xsl:variable> <xsl:variable name="nsindex" select="xx:node-set($index)/*"/> <xsl:template match="root"> <h1 class="page-title"><xsl:value-of select="./category/name" /></h1> <p><xsl:value-of select="./category/description" /></p> <xsl:apply-templates select="category/category/category[name='People In']" /> </xsl:template> <xsl:template match="category"> <xsl:if test="count(ancestor::*)=3"> <xsl:variable name="colour" select="../@colour" /> <h2 class="head-hurs-{$colour}" style="margin-top:20px;"><xsl:value-of select="name" /></h2> <p><xsl:value-of select="description" /></p> <xsl:apply-templates select="./category" /> </xsl:if> <xsl:if test="count(ancestor::*)=4"> <div style="float:left;" class="general-portlet"> <xsl:variable name="subcatcolor" select="../../@colour" /> <xsl:variable name="catname" select="name" /> <h2 class="head-hurs-{$subcatcolor}"><xsl:value-of select="name" /></h2> <p><xsl:value-of select="description" /></p> <ul class="in-portlet"> <xsl:for-each select="document($nsindex/*[name()=$catname])/root/child::*"> CONTENT </xsl:for-each> </ul> </div> <xsl:apply-templates select="./category" /> </xsl:if> </xsl:template> </xsl:stylesheet> I changed xmlns to another name but that didnt work and also tried david carlisle's suggestion for xalan but it said that namespace "http://exslt.org/common" does not contain any functions...... From: "Michael Kay" <mhk@xxxxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: RE: referring to variables using variables? Date: Tue, 13 Jan 2004 13:37:22 -0000 _________________________________________________________________ It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|