[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Problem

Subject: Re: Problem
From: "Robert Koberg" <rob@xxxxxxxxxx>
Date: Sat, 19 May 2001 18:50:13 -0700
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.