Thank You, Tim
Am Feb 9, 2006 um 21:15 schrieb Tim Hannigan:
I might be a tad confused here, but are you trying to aggregate the
"xml data from http://www.xmlhack.com/cdf.cdf" to use in your XSL
stylesheet?
Yes - and I tried to follow the explanation from solproviders website
- I got stuck writing the xslt aggregating the xml into the lenya page.
I'll give you an example of how I'm doing it with an rss feed from
zeldman's site.
In my publication-sitemap;
<map:aggregate element="cmsbody">
<map:part src="cocoon://navigation/{2}/{3}/breadcrumb/{5}.xml"
/>
<map:part src="cocoon://navigation/{2}/{3}/menu/{5}.xml" />
<map:part src="cocoon://navigation/{2}/{3}/tabs/{5}.xml"/>
<map:part src="cocoon://navigation/{2}/{3}/search/{5}.xml"/>
<map:part
src="cocoon://navigation/{2}/{3}/sectionNav/{5}.xml"/>
<map:part src="cocoon:/lenya-document-{1}/{3}/{4}/{page-
envelope:document-path}"/>
<map:part src="http://www.zeldman.com/feed/zeldman.xml"
element="XMLfeed" />
</map:aggregate>
You'll notice that I'm labelling the element (essentially wrapping
it) "XMLfeed".
Inside my XSLT, I have
<xsl:template match="cmsbody">
<html>
<body>
.....
.....
<xsl:apply-templates select="XMLfeed"/>
.....
.....
</body>
</html>
</xsl:template>
<xsl:template match="XMLfeed">
<xsl:for-each select="rss/channel/item">
<xsl:if test="position() < 3">
<div>
<h3><xsl:value-of
select="title"/></h3>
<h4><xsl:value-of select="pubDate"/>
</h4>
<p>
<xsl:value-of
select="description" >
</p>
<br />
<xsl:variable name="story_link"
select="link" />
<a href="{$story_link}">More
...</a>
</div> <!-- altStory -->
</xsl:if>
</xsl:for-each>
</xsl:template>
And voila, it's redisplaying the feed as part of my page.
Does this help?
I will try - it looks very promissing and helpful
Thanx!!!
Jürgen
-Tim
On 9-Feb-06, at 8:54 AM, Derek Harmel wrote:
I have nothing to add other than I have been completely unsuccessful
in trying to get Lenya to allow URLs for documents that don't
exist in
the sitetree. For whatever reason that I cannot figure out, I always
get some annoying error about the document not existing though I
clearly have a pipeline set up to process and serialize the URL. I
don't get it, I'm about to give up on Lenya and Cocoon.
On 2/9/06, Jürgen Ragaller <[EMAIL PROTECTED]> wrote:
Hi all!
I am trying (hard) to get the external data howto working (lenya
1.2.4) as described in the second solution under
http://lenya.apache.org/1_2_x/how-to/external_data.html
or
http://solprovider.com/lenya/external
I have problems, writing people2xhtml.xsl .
For a starting point I copied page2xhtml.xsl and tried to access the
xml data from http://www.xmlhack.com/cdf.cdf (the external uri)
writing:
.... lenya xmlns, parameters
<xsl:template match="cmsbody">
<html>
<head>
... lenya head code
</head>
<body>
... lenya body code
<xsl:apply-templates select="TITLE" />
</body>
</html>
</xsl:template>
<xsl:template match="TITLE">
<xsl:value-of select="." />
<xsl:template>
...other lenya xsl code
Have fun... Probably this is plain wrong ;;;-)
Thank You for help - If someone can provide an example
people2xhtml.xsl from a successful external data howto try, I would
be very interested in having a look at the code - it would make the
example complete.
Jürgen
--------------------------------------------------------------------
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Derek Harmel
:: Web Programmer
:: KCI Technologies
:: (410) 891-1746
:: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]