[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: combining 2 or more xml files?
Im am still a bit confused and not sure if the document() function does
apply to this problem or not?
I ll go into a bit more detail, I have an xsl which processes the xml homepage.xml to produce homepage.html. I have some links across 6 xml files which i would like to show in the homepage.html ouput. homepage.xml has a different structure to the other 6 xml files. However th eother 6 xml files have the same strtucre, e.g.: one.xml: <root> <link topfive="true"></link> <link></link> </root> two.xml: <root> <link></link> <link></link> <link></link> </root> three.xml <root> <link></link> <link topfive="true"></link> <link></link> </root> etc......... I would like to show the details of the links with topfive attribute in homepage.html, in the case above, i would only like to show the details of the 1st link from one.xml and the 2nd link from three.xml, I thought i might have to use document() to gather the 6 xml files togetehr and then search for links with topfive attribute but i dont know how to do it? the xsl below is processed with homepage.xml to produce homepage.html: <xsl:template match="root"> <xsl:apply-templates select="category" /> </xsl:template> <xsl:template match="category"> <xsl:if test="count(ancestor::*)=1"> do this </xsl:if> <xsl:if test="count(ancestor::*)=2"> do that </xsl:if> <xsl:if test="count(ancestor::*)=3"> <div> <h2><xsl:value-of select="name" /></h2> <h3>TOP FIVE LINKS</h3> <ul> <!-- SOME CODE HERE TO PULL TOGETHER FILES AND DISPLAY TOP FIVE LINKS--> </ul> </div> </xsl:if> </xsl:template> From: "Agnes Kielen" <agnes.kielen@xxxxxxx> Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: Re: combining 2 or more xml files? Date: Mon, 22 Dec 2003 11:47:12 +0100 _________________________________________________________________ Express yourself with cool emoticons - download 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
|