[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Problem
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. For example: <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...--> <xsl:variable name="floaters" select="document('../xml/site-config.xml)//section[@id='$id')]/floaters"/> <xsl:apply-templates select="$floaters"/> 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> To: <XSL-List@xxxxxxxxxxxxxxxxxxxxxx> Sent: Saturday, May 19, 2001 12:47 PM Subject: Problem > Hello, > > 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 to > 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 page > with the news content in. > > I am using XSL to format this all out. Does anyone have any clue as to how I > can centralise the news content so that the XSL can read it into the result > document? > > 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
|
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
|