Subject: [xsl] Ancestors and Imported docs From: "Eric Schenfeld" <ESchenfeld@xxxxxxxxxxx> Date: Wed, 01 Aug 2001 15:57:22 -0400 |
Sorry if anyone gets this twice but i was having some e-mail problems --------------------------------------------------------- I am importing an xml doc 2 times. In one case, i want to format text one way, and another time i want to format text another way. The problem i'm having is that the doc tree doesn't seem to continue over the import. Does anyone have any ideas? Thanks. XML DOC 1: <!DOCTYPE layout1 [ <!ENTITY navigation SYSTEM "nav.xml"> ]> <layout1> <top_bar> &navigation; </top_bar> <bottom_bar> &navigation; </bottom_bar> </layout1> nav.xml: <links> <link href="Home.shtml">Home</link> <link href="About.shtml">About Us</link> </links> XSL: <xsl:template match="bottom_bar"> <xsl:apply-templates/> </xsl:template> <xsl:template match="top_bar"> <xsl:apply-templates/> </xsl:template> <xsl:template match="links"> <xsl:if test="top_bar//."> <xsl:variable name="color" select="ffffff"/> </xsl:if> <xsl:if test="bottom_bar//."> <xsl:variable name="color" select="000000"/> </xsl:if> <xsl:variable name="number" select="count(link)"/> <xsl:for-each select="link"> <xsl:if test="position()<$number"> <a href="{@href}" style="color:#{$color}"><xsl:value-of select="."/></a> | </xsl:if> <xsl:if test="position()=$number"> <a href="{@href}" style="color:#{$color}"><xsl:value-of select="."/></a> </xsl:if> </xsl:for-each> </xsl:template> Eric XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Ancestors and Imported do, Wendell Piez | Thread | [xsl] Quick one - can attribute val, Ian Tindale |
[xsl] XMLLight - What do you think?, Vadim Permyakov | Date | Re: [xsl] Supress, Sebastian Rahtz |
Month |