[XSL-LIST Mailing List Archive Home]
Re: [xsl] Problem
Subject: Re: [xsl] Problem|
From: "Robert Koberg" <rob@xxxxxxxxxx>
Date: Sat, 19 May 2001 18:50:13 -0700
If it is always the same file then it is very easy. You use the document
function to call in the XML to your stylesheet and apply-templates to it.
<xsl:variable name="news" select="document('../newsfolder/news1')"/>
<xsl:apply-templates select="$news" mode="news"/>
If you have varying "floating" content then you need to (the way I do it...)
associate it with the main content piece in a "site-config" XML file. I use
a gui and have editors/admin types pick which floating content they want to
associate with a particular page.
Then when the page is getting rendered it calls (document function) the
site-config XML file to find the floating pieces (could be more than one)
and pulls them in using another document funcation call. For example:
<!-- find the correct section to pull the floating content ...example...-->
then as you read the floaters nodeset, call the document function on each
floater node and apply-templates on it.
----- Original Message -----
From: "Allistair Crossley" <adc@xxxxxxxxxxxx>
Sent: Saturday, May 19, 2001 12:47 PM
Subject: [xsl] Problem
> I am developing a website using XML and XSL. I have come up against a
> problem...on each webpage I want to have a news table. But I do not want
> have to add this news cotnent into every XML page because that defeats the
> object. Ideally I would like to have my normal XML pages and then 1 XML
> with the news content in.
> I am using XSL to format this all out. Does anyone have any clue as to how
> can centralise the news content so that the XSL can read it into the
> Many thanks.
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list