[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Ancestors and Imported docs
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
|
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
|