You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Peter Schrammel <pe...@unibw-muenchen.de> on 2000/08/17 13:03:04 UTC
installing 1.7.4-could not find function node
Hi,
probably it's a newbe question but i can't get cocoon to work. I
installed jserv and cocoon 1.7.4 on a debian woody system (cocoon from a
tarball). I got the jserv status pages up and /Cocoon.xml works, too.
But if I try the examples in the samples directory it gives me an error.
The logfile of jserv says:
XSL Error: pattern = 'node()'
Could not find function: node
Remaining tokens: ( '(' ')'), style tree node:
org.apache.xalan.xslt.ElemApplyTemplates@8a213e0
XSL Error: Could not parse /home/httpd/html/samples/index.xsl document!
XSL Error: SAX Exception
I am a newbie to servlets and cocoon so I'm thankful for any hint,
--
Peter Schrammel "We shall meet in the place
UniBw-Muenchen 106/2/116 where there is no darkness"
85579 Neubiberg (1984)
ICQ: 5469131
RE: How to include other XML files in XSP page?
Posted by Per Kreipke <pe...@onclave.com>.
Richardo,
Hate to ask, but is there documentation too? I can read the source but it'd
be handy to print something out.
Per.
RE: How to include other XML files in XSP page?
Posted by Per Kreipke <pe...@onclave.com>.
Forget I asked. Seems simple enough.
Per.
Re: How to include other XML files in XSP page?
Posted by Ricardo Rocha <ri...@apache.org>.
Per Kreipke wrote:
>
> That's neat! How do I see the source of the util taglib (and a list of the
> available functions)?
The util taglib is a resource file located under
org.apache.cocoon.processor.xsp.library.java.util.xsl
[uff! how I hate such loooong names :-)]
RE: How to include other XML files in XSP page?
Posted by Per Kreipke <pe...@onclave.com>.
That's neat! How do I see the source of the util taglib (and a list of the
available functions)?
Per.
> -----Original Message-----
> From: ricardo@ricardo [mailto:ricardo@ricardo]On Behalf Of Ricardo Rocha
> Sent: Thursday, August 17, 2000 4:55 PM
> To: cocoon-users@xml.apache.org
> Subject: Re: How to include other XML files in XSP page?
>
>
> Per Kreipke wrote:
> >
> > Given a URL to an XML file (e.g.
> http://network54.com/Forum/18288;xml=rss )
> > how would I include the contents of that file in my own tree?
> E.g. something
> > like:
> >
> > <xsp:page....>
> > <page>
> > <xsp:insert-file href="http://network54.com/Forum/18288;xml=rss"/>
> > <content>
> > ....
> > </content>
> > </page>
> >
> > - Is there an XSP directive that does it?
>
> You may use the "include-uri" tag provided by the "util"
> library:
>
> <xsp:page... xmlns:util="http://www.apache.org/1999/XSP/Util">
> <page>
> . . .
> <util:include-uri
> href="http://network54.com/Forum/18288;xml=rss"/>
> . . .
> </page>
> </xsp:page>
>
> For this to work, the XML document returned by your uri must
> be well-formed XML. If the uri in question is itself an XSP
> page, make sure its content type is set to "text/xml":
>
> <?cocoon-format type="text/xml"?>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>
Re: How to include other XML files in XSP page?
Posted by "Ilya A. Kriveshko" <il...@infoinsomniax.com>.
Per Kreipke wrote:
> Ilya,
>
> Thanks for the good info!
>
> Your instructions seem to indicate that the XSL logicsheets for taglibs are
> loaded from the cocoon.jar file.
>
> Is that what the 'resource://org/apache/...../util.xsl' designation in the
> cocoon.properties file indicates? If that had said
> 'file:/org/apache/..../util.xsl' would it have used the one of disk?
I am not an expert on cocoon, as you might have guessed by the kinds of
questions I had posted. So, my guess is as good as yours on this issue. :-)
RE: How to include other XML files in XSP page?
Posted by Per Kreipke <pe...@onclave.com>.
Ilya,
Thanks for the good info!
Your instructions seem to indicate that the XSL logicsheets for taglibs are
loaded from the cocoon.jar file.
Is that what the 'resource://org/apache/...../util.xsl' designation in the
cocoon.properties file indicates? If that had said
'file:/org/apache/..../util.xsl' would it have used the one of disk?
I guess I'd never known that jar failes could contain other file types (I
know they're zip files, just didn't know they'd be used for other stuff).
Aside: I also noticed the cocoon.properties in the jar file. But that's
presumably not the one used for actual configurations, it's the one on disk?
Per.
Re: How to include other XML files in XSP page?
Posted by "Ilya A. Kriveshko" <il...@infoinsomniax.com>.
Fix-it-yourself instructions below:
Per Kreipke wrote:
> > This bug was recently fixed (thanks Matthias!). Please download
> > the latest version from the CVS. That should fix the problem
>
> That's great news, but I'm sorry, [newbie warning] I don't know how to do
> that.
>
> - Do you mean get a version > 1.7.4?
> - Or specific .java files? Where would I look for info on doing this?
You can either fix it yourself or download the new version of util.xsl,
and then stuff the correct util.xsl into the cocoon.jar file.
To fix it yourself:
1) use your favorite editor to open this file:
/usr/local/cocoon/src/org/apache/cocoon/processor/xsp/library/java/util.xsl
2) search for "getMessage"
3) add "+" sign after "getMessage()":
...
document.createTextNode(
"{" +
__name + ": \n" +
e.getMessage() + // <-- Here
"}"
)
...
4) save the file
5) back up your original cocoon.jar file (IMPORTANT! I don't want to be held responsible...)
5) run the following command:
jar -uvf /usr/local/cocoon/bin/cocoon.jar \
-C /usr/local/cocoon/src \
org/apache/cocoon/processor/xsp/library/java/util.xsl
6) restart your web-server so it reloads the jar.
I was assuming that your cocoon lives under /usr/local/cocoon. If it doesn't,
use different path names.
---
Ilya.
> Thanks, Per.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
RE: How to include other XML files in XSP page?
Posted by Per Kreipke <pe...@onclave.com>.
> This bug was recently fixed (thanks Matthias!). Please download
> the latest version from the CVS. That should fix the problem
That's great news, but I'm sorry, [newbie warning] I don't know how to do
that.
- Do you mean get a version > 1.7.4?
- Or specific .java files? Where would I look for info on doing this?
Thanks, Per.
Re: How to include other XML files in XSP page?
Posted by Ricardo Rocha <ri...@apache.org>.
Per Kreipke wrote:
>
> > <xsp:page... xmlns:util="http://www.apache.org/1999/XSP/Util">
> > <page>
> > . . .
> > <util:include-uri
> > href="http://network54.com/Forum/18288;xml=rss"/>
> > . . .
> > </page>
> > </xsp:page>
> >
> > For this to work, the XML document returned by your uri must
> > be well-formed XML. If the uri in question is itself an XSP
> > page, make sure its content type is set to "text/xml":
> >
> > <?cocoon-format type="text/xml"?>
>
> Tried this snippet:
>
> <?cocoon-process type="xsp"?>
> <?cocoon-format type="text/xml"?>
> <!-- <?cocoon-process type="xslt"?>
> <?xml-stylesheet href="mytaglib.xsl" type="text/xsl"?> -->
>
> <xsp:page
> language="java"
> xmlns:sql="http://www.apache.org/1999/SQL"
> xmlns:xsp="http://www.apache.org/1999/XSP/Core"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:util="http://www.apache.org/1999/XSP/Util"
> xmlns:xxsl=""
> xmlns:xsql=""
> >
> <page title="SQL Search Results">
> <util:include-uri href="http://network54.com/Forum/18288;xml=rss"/>
> </page
> </xsp:page>
>
> And got:
>
> java.lang.Exception: XSP Java Compiler: Compilation failed for
> _mytaglib.java
> 98: ')' expected.
>
> e.getMessage()
>
> ^
>
> 1 error
>
> Seems to be thrown from the exception handler for the whole thing, hard to
> tell what caused the error.
This bug was recently fixed (thanks Matthias!). Please download
the latest version from the CVS. That should fix the problem
RE: How to include other XML files in XSP page?
Posted by Per Kreipke <pe...@onclave.com>.
> <xsp:page... xmlns:util="http://www.apache.org/1999/XSP/Util">
> <page>
> . . .
> <util:include-uri
> href="http://network54.com/Forum/18288;xml=rss"/>
> . . .
> </page>
> </xsp:page>
>
> For this to work, the XML document returned by your uri must
> be well-formed XML. If the uri in question is itself an XSP
> page, make sure its content type is set to "text/xml":
>
> <?cocoon-format type="text/xml"?>
Tried this snippet:
<?cocoon-process type="xsp"?>
<?cocoon-format type="text/xml"?>
<!-- <?cocoon-process type="xslt"?>
<?xml-stylesheet href="mytaglib.xsl" type="text/xsl"?> -->
<xsp:page
language="java"
xmlns:sql="http://www.apache.org/1999/SQL"
xmlns:xsp="http://www.apache.org/1999/XSP/Core"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:util="http://www.apache.org/1999/XSP/Util"
xmlns:xxsl=""
xmlns:xsql=""
>
<page title="SQL Search Results">
<util:include-uri href="http://network54.com/Forum/18288;xml=rss"/>
</page
</xsp:page>
And got:
java.lang.Exception: XSP Java Compiler: Compilation failed for
_mytaglib.java
98: ')' expected.
e.getMessage()
^
1 error
Seems to be thrown from the exception handler for the whole thing, hard to
tell what caused the error.
Ideas?
Per.
Re: How to include other XML files in XSP page?
Posted by Ricardo Rocha <ri...@apache.org>.
Per Kreipke wrote:
>
> Given a URL to an XML file (e.g. http://network54.com/Forum/18288;xml=rss )
> how would I include the contents of that file in my own tree? E.g. something
> like:
>
> <xsp:page....>
> <page>
> <xsp:insert-file href="http://network54.com/Forum/18288;xml=rss"/>
> <content>
> ....
> </content>
> </page>
>
> - Is there an XSP directive that does it?
You may use the "include-uri" tag provided by the "util"
library:
<xsp:page... xmlns:util="http://www.apache.org/1999/XSP/Util">
<page>
. . .
<util:include-uri
href="http://network54.com/Forum/18288;xml=rss"/>
. . .
</page>
</xsp:page>
For this to work, the XML document returned by your uri must
be well-formed XML. If the uri in question is itself an XSP
page, make sure its content type is set to "text/xml":
<?cocoon-format type="text/xml"?>
How to include other XML files in XSP page?
Posted by Per Kreipke <pe...@onclave.com>.
Given a URL to an XML file (e.g. http://network54.com/Forum/18288;xml=rss )
how would I include the contents of that file in my own tree? E.g. something
like:
<xsp:page....>
<page>
<xsp:insert-file href="http://network54.com/Forum/18288;xml=rss"/>
<content>
....
</content>
</page>
- Is there an XSP directive that does it?
- Would I have to write a taglib or producer to do it? Possibly because the
XML file is a complete XML file itself and I'd need to remove some of the
PIs from it? E.g. run it through XSL first?
- Should I use Java to do it?
Per.
Re: installing 1.7.4-could not find function node
Posted by Todd Gunsolley <to...@gunsolley.net>.
I just set up Cocoon 1.7.4 on RedHat 6.2 with Apapche 1.3.2 and JServ1.1.2 and I get a very similar error. It seems to me that Xalan is having path problems, but I've got no idea how to fix this. Any help for Peter and I would be greatly appreciated!
----- Original Message -----
From: Peter Schrammel <pe...@unibw-muenchen.de>
To: <co...@xml.apache.org>
Sent: Thursday, August 17, 2000 4:03 AM
Subject: installing 1.7.4-could not find function node
> Hi,
>
> probably it's a newbe question but i can't get cocoon to work. I
> installed jserv and cocoon 1.7.4 on a debian woody system (cocoon from a
> tarball). I got the jserv status pages up and /Cocoon.xml works, too.
> But if I try the examples in the samples directory it gives me an error.
> The logfile of jserv says:
>
> XSL Error: pattern = 'node()'
> Could not find function: node
> Remaining tokens: ( '(' ')'), style tree node:
> org.apache.xalan.xslt.ElemApplyTemplates@8a213e0
> XSL Error: Could not parse /home/httpd/html/samples/index.xsl document!
> XSL Error: SAX Exception
>
> I am a newbie to servlets and cocoon so I'm thankful for any hint,
> --
> Peter Schrammel "We shall meet in the place
> UniBw-Muenchen 106/2/116 where there is no darkness"
> 85579 Neubiberg (1984)
> ICQ: 5469131
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org