[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
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>
_________________________________________________________________
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
Re: [xsl] combining 2 or more xml files?
Subject: Re: [xsl] combining 2 or more xml files? From: "james walker" <jameswalkerandy@xxxxxxxxxxx> Date: Mon, 22 Dec 2003 13:28:30 +0000 |
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: [xsl] combining 2 or more xml files? Date: Mon, 22 Dec 2003 11:47:12 +0100
Hi James,
I'm not sure if I understand you correctly, but do you know the document function http://www.dpawson.co.uk/xsl/sect2/N2602.html
> does anyone know how to combine these files in order to obtain the 5 links? > (the xml file fo rteh hoimepage is a different structure to the otehrs) > cheers > james > Cheers, Agnes
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
_________________________________________________________________
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] combining 2 or more xml f, Jim Fuller | Thread | RE: Re: [xsl] combining 2 or more x, cknell |
RE: [xsl] Parsing an array as a par, Jim Fuller | Date | RE: RE: [xsl] Hello, some problems , cknell |
Month |