why does this not work ?
This is a closed discussion with 5 replies, filed under XSLT.
Search
@roelof:
- Please do not start discussions called "why does this not work ?" Use a descriptive title, so everybody can easily see what the thread is about.
- Stop prepending "hello" or "Oke". That is annoying and unnecessary.
- Read the forum guidelines, especially #2.
Judging from the XSLT- and XML-snippets you've provided I'd dare to say that you haven't yet understood what XSLT and especially apply-templates
do.
I urge you to read up on the basics before trying out/copying more advanced features or Symphony-techniques. Also, make sure you understand what exactly you're trying to achieve with those advanced features and not just copy them blindly and let somebody else fix the problems afterwards.
I know exactly what I want to achieve and that's displaying a certain number of articles in a month. So I made two datasources. One for diaplaying the article (article details) and one for the displaying the next link (next artikel). I know how to display pages with one DS. And I thought that or displaying the second DS I could do the same but appertenly not. I will google how I can achieve this
This may lead you somewhere :
<xsl:template match="/"> <xsl:apply-templates select="/data/artikel-details/entry"/> <xsl:apply-templates select="/data/next-artikel/entry"/> </xsl:template>
<xsl:template match="/">
matches the root element. this is starting point for your stylesheet.
inside the 'root template' we apply templates for particular child-nodes of xml tree, defined by xpath. once you learn a bit of xml/xslt theory, this things will never confuse you.
thanks, it worked. Now makimg a url of the datum field and im very happy
Create an account or sign in to comment.
Hello,
Here you can find the relevant xml:
So I thought this xslt would work :
But no links are displayed. So Im wondering what I'm doing wrong here.