You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Giuseppe Di Pierri <pi...@arpage.ch> on 2002/08/21 21:48:22 UTC

problem on preceding Axes

Hi guys,

I am actually using cocoon 2.0.3 tomcat 4.0.4 and W2000,
proceding and proceding axes don't work correctly.


Does anybody had the same problem?
Do I have to change some configuration of the xml parser?

Tanx in advance for you answer.

and especially thanks to the cocoon community that works so hard and makes a
great job providing us a very good tool.

bye

pino


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Bug fixed [was - Re: problem on preceding Axes]

Posted by Giuseppe Di Pierri <pi...@arpage.ch>.
oh yes, that was my mistake

This is the example that helped me to find the error (and that can help
someone else):

in sitemap.xmap:
 <map:match pattern="test.xml">
  <map:generate src="test.xml"/>
  <map:transform src="test1.xsl"/>
    <map:serialize type="xml"/>
 </map:match>

test.xml file content:
<root>
    <element id="1) stefano-mazzocchi"/>
    <element id="2) pluto"/>
    <element id="3) marilena"/>
    <element id="4) pippo"/>
    <element id="5) lucio"/>
    <element id="6) giovanni"/>
</root>

test1.xsl file content:

<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

 <xsl:template match="/">
  <test>
   <xsl:apply-templates/>
  </test>
 </xsl:template>

 <xsl:template match="root/element">
    <xsl:variable name="me" select="."/>
    <xsl:variable name="previous" select="preceding-sibling::element[1]"/><!--
here it was my mistake...I did write element[last()] -->
    <xsl:variable name="next" select="following-sibling::element[1]"/>

  <element id="{$me/@id}">
   <previous id="{$previous/@id}"/>
   <next id="{$next/@id}"/>
  </element>
 </xsl:template>

</xsl:stylesheet>

Thank you Per

bye

pino
----- Original Message -----
From: "Per Kreipke" <pe...@onclave.com>
To: <co...@xml.apache.org>
Sent: Thursday, August 22, 2002 7:57 AM
Subject: RE: problem on preceding Axes


> FYI, I've had no problem with them.
>
> Also, this sounds like an XSL question. You might get better help on another
> list....
>
> ... but if you want help, post a code snippet.
>
> Per
>
> P.s. agree with you, cudos to the developers!
>
> > Hi guys,
> >
> > I am actually using cocoon 2.0.3 tomcat 4.0.4 and W2000,
> > proceding and proceding axes don't work correctly.
> >
> >
> > Does anybody had the same problem?
> > Do I have to change some configuration of the xml parser?
> >
> > Tanx in advance for you answer.
> >
> > and especially thanks to the cocoon community that works so hard
> > and makes a
> > great job providing us a very good tool.
> >
> > bye
> >
> > pino
> >
> >
> > ---------------------------------------------------------------------
> > Please check that your question  has not already been answered in the
> > FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> >
> > To unsubscribe, e-mail:     <co...@xml.apache.org>
> > For additional commands, e-mail:   <co...@xml.apache.org>
> >
> >
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: problem on preceding Axes

Posted by Per Kreipke <pe...@onclave.com>.
FYI, I've had no problem with them.

Also, this sounds like an XSL question. You might get better help on another
list....

... but if you want help, post a code snippet.

Per

P.s. agree with you, cudos to the developers!

> Hi guys,
>
> I am actually using cocoon 2.0.3 tomcat 4.0.4 and W2000,
> proceding and proceding axes don't work correctly.
>
>
> Does anybody had the same problem?
> Do I have to change some configuration of the xml parser?
>
> Tanx in advance for you answer.
>
> and especially thanks to the cocoon community that works so hard
> and makes a
> great job providing us a very good tool.
>
> bye
>
> pino
>
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>
>
>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>