RE: Re: [xsl] combining 2 or more xml files?

Subject: RE: Re: [xsl] combining 2 or more xml files?
From: cknell@xxxxxxxxxx
Date: Tue, 23 Dec 2003 11:22:57 -0500
Does this, "show the details of the links with topfive attribute", mean that you want to place each of the links with a "topfive" attribute from each of the six files into the HTML output document? If so, what is to appear in the text part of the link (the text that appears between the anchor tags) and where do we find the URL (the value of the "href" attribute of the anchor tag)?

If not, maybe you could give us an example of what it means.
-- 
Charles Knell
cknell@xxxxxxxxxx - email



-----Original Message-----
From:     james walker <jameswalkerandy@xxxxxxxxxxx>
Sent:     Mon, 22 Dec 2003 13:28:30 +0000
To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  Re: [xsl] 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: [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




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread