cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tagunov Anthony" <atagu...@nnt.ru>
Subject invoking taglibs (was Re: ESQL problems)
Date Sun, 18 Mar 2001 16:25:08 GMT
>RE: ESQL problems  
>I guess I'm also fuzzy on the xsp:page tag and what exactly how 
>the xmlns attribute is used.  The cocoon.properties file defines 
>which logic sheet a taglib >uses.  What is the 
>xmlns:esql="http://apache.org/1999/SQL/v2"  attribute actually accessing/using?  
> 
>When I write my own taglib, I would put the logicsheet on my server, 
>configure cocoon.properties to point to that file (as Chad describes below) 
>and then also I would need to configure the namespace in the xsp:page 
>tag to point at .... what?

Well, there should actually be some namespace URI assosiated with
the taglib, something like "http://www.yourdomain.com/2000/One/Two"
or anything you like. The tags processed by the taglib, are members of
this namespace (thus, in esql.xsl you'll see

<xsl:stylesheet xmlns:esql="http://apache.org/1999/SQL/v2">
..
and later on there are templates processing tags like
<esql:execute-query>. Note that they are in 'esql:'
namespace. Design your taglibs according to this pattern.
Have your taglib's namespace. Make it as an XSL that processes
tags from this namespace. Reigster the namespace prefix you
use in cocoon.properties. Unfortunantly the invocation of a
talglib is triggered by defining it's namespace prefix in
<xsp:page>. So it's hardcoded to prefix.
Since the prefix has been bound to _anything_ in
<xsp:page>, then the logicsheet from
cocoon.properties is run over your .xml.
But: when the xsl runs, it runs as normal xsl and then it
is important that your namespace prefix is mapped to the
same uri in <xsp:page> and in the .xsl file that _is_ the
tablib.

So, in short,
>tag to point at .... what?
you make it point (map to) the URI that you use in your
.xsl file that implements the taglib.

> 
>Jay
 
>-----Original Message-----
>>From: CURRAN Chad / FTR&D / ATFREEDOM [mailto:chad.curran@rd.francetelecom.com]
>>Sent: Friday, March 16, 2001 3:43 PM
>>To: 'cocoon-users@xml.apache.org'
>>Subject: RE: ESQL problems
>>
>>The format below works for me: 
>>processor.xsp.logicsheet.junk.java     = file:///d:/cocoon/src/org/apache/cocoon/processor/xsp/library/java/junk.xsl

>>
>>(no line break in the middle, it only looks that way because of word wrap.) 

God advice! If for some reason the resource:// does not work for you
(i guess that is due to your servlet container, what do you use?)
give that exact file location.

>>---Original Message----- 
>>>From: Jay [mailto:blueegg@teleport.com] 
>>>Sent: Friday, March 16, 2001 12:14 PM 
>>>To: cocoon-users@xml.apache.org 
>>>Subject: ESQL problems 
>>>
>>>I know this question has been asked before, but there is still no definitive 
>>>answer that I've come across. 
>>>
>>>I'm using Windows NT, Cocoon 1.8, and tomcat (no apache). 
>>>
>>>I can't get the XSP processor to process the ESQL tags. 
>>>
>>>In cocoon.properies I have the line: 
>>>processor.xsp.logicsheet.esql.java     = 
>>>resource://org/apache/cocoon/processor/xsp/library/sql/esql.xsl 
>>>
>>>In my xml file I have: 
>>><xsp:page 
>>>  language="java" 
>>>  xmlns:esql="http://apache.org/1999/SQL/v2" 
>>>  xmlns:xsp="http://www.apache.org/1999/XSP/Core" 
>>>  xmlns:request="http://www.apache.org/1999/XSP/Request" 
>>>> 
>>>
>>>I do NOT use an <?xml-logicsheet> tag in my xml. 
Don't use it for esql and other taglibs ;-)
>>>
>>>It was suggested that in the cocoon.properties file, 'resource' should be 
>>>changed to file and pointed at the actual file on the filesystem.  Is that 
>>>the case and what is the syntax for a (Windows) file that is at 
>>>d:\tomcat\src\esql.xsl? 
>>>
>>>Thanks in advance for your help. 

Best regards, 
   Tagunov Anthony



---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message