Tim,  I tried Your example - it works.

I find it (more or less) similar to solproviders first solution (http://solprovider.com/lenya/external).

The second solution (Interrupt at getting the data) seems to be elegant (less code duplication). But in the second one I don't know how to aggregate the data into a lenya page. In Tims example the labeling of the feed (using element="XMLfeed") helps later to select the xml - is there something similar for the 2nd solution?

best regards, Jürgen



Am Feb 9, 2006 um 20:50 schrieb Jürgen Ragaller:

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="" />
  <map:part src="" />
  <map:part src=""/>
  <map:part src=""/>
  <map:part src=""/>
  <map:part src=""/>


<map:part src=""http://www.zeldman.com/feed/zeldman.xml">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() &lt; 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="">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

or

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



---------------------------------------------------------------------
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]


Reply via email to