You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Sandeep N Kundu <c0...@geogr.uni-jena.de> on 2001/03/23 16:16:55 UTC

Strange

I have an xml file and it is linked to an xsl file

when I open the xml file using Internet explorer 5.5 the contents are displayed using the style specified. FINE

when I want to open the file from my local server ( after modifying the file i.e. adding the cocoon PIs) it gives the error

Error found handling the request.
org.apache.xalan.xslt.XSLProcessorException: 
	at org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1720)
	at org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1625)
	at org.apache.xalan.xslt.ElemIf.<init>(ElemIf.java, Compiled Code)
	..........................
I can't figure out where the error is and why...Can anybody help please
thanking in advance


Re: Strange

Posted by Sebastien Koechlin <sk...@ivision.fr>.
Sandeep N Kundu wrote:
> 
> the attachments are as attached

It's not stange, you have many errors in your files:here are diff -u:

kalender.xml
============

It's not <?xml:stylesheet ...
but <?xml-stylesheet ...

You should read the FAQ about xml:stylesheet

kalender.xsl
============

You have to use :
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

 <xsl:template match="/"> 
  <xsl:processing-instruction
name="cocoon-format">type="text/html"</xsl:processing-instruction>
  <html>
   <body style="font-family:geneva,arial,helvetica, sans-serif;
font-size:12px; font-weight:normalcomic   <xsl:apply-templates/>  
   </body>
  </html>
 </xsl:template>

Your namespace declaration was wrong, and you have to tell cocoon
which formatter to use.

It's not <xsl:if match=".[@name='Februar']">
but <xsl:if test="@name='Februar'">

This is not allowed: <xsl:value-of/>
but I think you want <xsl:value-of select="."/>,
look at <xsl:copy>

You should think about making more template instead
of <xsl:for-each> nad <xsl:if>, your stylesheet will be easier
to read.


-- 
Sébastien Koechlin - IVision - skoechlin@ivision.fr

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

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


SV: Strange

Posted by Pål Wester <pa...@florence.never.no>.
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

 <xsl:template match="/">
--> <xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <--
  <html>
   <body style="font-family:geneva,arial,helvetica, sans-serif;
font-size:12px; font-weight:normalcomic sans ms">
   <xsl:apply-templates/>
   </body>
  </html>
 </xsl:template>

At fist glance I find that you have
<xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
in the middle of root-match. That shouldn't be there...

This error can be found just by watching it in IE thus. if it isn't
well-formed IE
will tell you.

mvh: Pål Wester <ma...@never.no>
høgskoleingenør/programmerer


never.no as <http://never.no/> , stortingsgt 30, 0161 Oslo
<http://www.never.no/stortingsgt.gif>
direkte: 22 01 66 34, 906 900 62
tlf: 22 01 66 34, fax: 22 01 66 21
http://never.no <http://never.no/>  - icq: 103476059
<http://wwp.icq.com/103476059>




> -----Opprinnelig melding-----
> Fra: Sandeep N Kundu [mailto:c0kusa@geogr.uni-jena.de]
> Sendt: 26. mars 2001 17:44
> Til: cocoon-users@xml.apache.org
> Emne: Re: Strange
>
>
> the attachments are as attached
>
> ----- Original Message -----
> From: "Sebastien Koechlin" <sk...@ivision.fr>
> To: <co...@xml.apache.org>
> Sent: Monday, March 26, 2001 5:31 PM
> Subject: Re: Strange
>
>
> > > Sandeep N Kundu wrote:
> >
> > >                    Error found handling the request.
> > >
> > >      org.apache.xalan.xslt.XSLProcessorException:
> >
> > Xalan is sending an Exception, probably because your stylesheet is
> > not valid.
> >
> > > I can't figure out where the error is and why...Can anybody
> help please
> >
> > Yes, if you send some more informations. Can you send the smallest
> > sample
> > files (xml & xsl) showing this error?
> >
> >
> > --
> > Sébastien Koechlin - IVision - skoechlin@ivision.fr
> >
> > ---------------------------------------------------------------------
> > Please check that your question has not already been answered in the
> > FAQ before posting. <http://xml.apache.org/cocoon/faqs.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/faqs.html>

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


Re: Strange

Posted by Sandeep N Kundu <c0...@geogr.uni-jena.de>.
the attachments are as attached

----- Original Message -----
From: "Sebastien Koechlin" <sk...@ivision.fr>
To: <co...@xml.apache.org>
Sent: Monday, March 26, 2001 5:31 PM
Subject: Re: Strange


> > Sandeep N Kundu wrote:
>
> >                    Error found handling the request.
> >
> >      org.apache.xalan.xslt.XSLProcessorException:
>
> Xalan is sending an Exception, probably because your stylesheet is
> not valid.
>
> > I can't figure out where the error is and why...Can anybody help please
>
> Yes, if you send some more informations. Can you send the smallest
> sample
> files (xml & xsl) showing this error?
>
>
> --
> Sébastien Koechlin - IVision - skoechlin@ivision.fr
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>
>

Re: Strange

Posted by Sebastien Koechlin <sk...@ivision.fr>.
> Sandeep N Kundu wrote:

>                    Error found handling the request.
> 
>      org.apache.xalan.xslt.XSLProcessorException:

Xalan is sending an Exception, probably because your stylesheet is
not valid. 

> I can't figure out where the error is and why...Can anybody help please

Yes, if you send some more informations. Can you send the smallest
sample
files (xml & xsl) showing this error?


-- 
Sébastien Koechlin - IVision - skoechlin@ivision.fr

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

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