REPOST: [C2.0] Fatal Error when trying to use SVG

2001-12-07 Thread Adrian Geissel

Hi,

Are there any pointers as to where I should be looking to fix this?
I'm using the Cocoon 2.0 release distribution, and get the error described
below.

Thanks,
Adrian

===


Hi,

I'm running Cocoon 2.0 (Final Release) on Tomcat 3.2 on Windows NT 4.0 SP5.

I get the message Fatal Error: No usable fonts found. when accessing the
Cocoon SVG sample link (of the main sample page), and Tomcat dumps with
Java Result: 1.

I have attached the cocoon.log from this session, but am unable to locate
any hints as to what happened.

Has anyone else experienced a similar problem? Or any thoughts?
Many thanks,
Adrian




cocoon.log.zip
Description: Zip compressed data

-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Search Engines

2001-12-07 Thread Adrian Geissel

There is an active thread in the [EMAIL PROTECTED] list about
integrating Apache Lucene with Cocoon.
Perhaps this might help you.

Adrian
- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, December 07, 2001 12:48 PM
Subject: Search Engines



 Hello all,

 does anyone have any experience of integrating a search engine
 with cocoon2 -i.e doesn't the search engine need to interrrogate the
 sitemap to get the true URL, and to know which tranformations to apply.

 Is the only way to do this with some custom code ?

 Thanks in advance,

 Rob.


 ALSTOM COMPANY CONFIDENTIALITY MESSAGE :
 This  e-mail  and  any attachments are confidential and may be privileged.
 If  you are not a named recipient, please notify the sender immediately
and
 do not disclose the contents to another person, use it for any purpose or
 store or copy the information in any medium.


 -
 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Re: Antwort: RE: Calling C2 from command line: problem with Oracle driver

2001-12-06 Thread Adrian Geissel

Hi,

Have you looked at the way that Cocoon generates it's own documentation from
a commandline invocation?

This may be what you are looking for in terms of generating off-line
content.

Hope this helps
Adrian

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, December 06, 2001 10:31 AM
Subject: Re: Re: Antwort: RE: Calling C2 from command line: problem with
Oracle driver


 Hello list,

   Why would you want to run Cocoon without Tomcat?  What can Cocoon do
  without a servlet engine?
 
  It is possible because Cocoon2 is made on an abstraction that can make
it
  interface with different containers.
  Currently there are two abstactions (Environment) available: command
line
  and servlet.
  So yes, it can function on itself, no, it can't respond to http requests
by
  itself for now.
  Command line executes all the things in the sitemap and generates the
  resulting files on the filesystem.

 Once again, to make it clear, what I want to achieve...

 I have built a web application, which presents the informations concerning
a
 life insurance contract on our intranet.
 The web page is called like
 file://http:server/cocoon/Contract.xsp?contract_id=1234567

 For looking at single contracts everything is fine.

 But now I want to generate all these info sheets for many hundreds of
 contracts and send the results to an other department, which has no
possibility
 to access our intranet.

 Therefor I want to call Cocoon with a todo list, which could look like
this:
   Contract.xsp?contract_id=1112234
   Contract.xsp?contract_id=1112236
   Contract.xsp?contract_id=1112237
   Contract.xsp?contract_id=1112324
   Contract.xsp?contract_id=1123534
   Contract.xsp?contract_id=1467301
   Contract.xsp?contract_id=1668709
   ...

 Now Cocoon has to generate the html files for each uri and save it
somewhere.

 My intermediate results are:
   1) Cocoon can be called from the command line by using the run.sh
script in
 the Cocoon root directory.

   2) It is possible to configure the Cocoon call with parameters. Execute
sh
 run.sh -h for a list of Parms and options.

   3) I have configured the run time environment in a way, that the command
line
 version takes the same sitemap files and web application files as the
servlet
 version called by tomcat.

 And now there is only one question left:
   How can I tell the command line environment to load and initialize the
classes
 needed for the Oracle database access?
   In the servlet version this is done be specifying an init-param in the
 web.xml
   file with the param-name load-class.

 And here I'm stuck!

 I think, the implementation of the class org.apache.cocoon.Main needs some
 extension, to give a possibility to the user to achieve the same things,
as
 init-param in web.xml does in the servlet case.

 Thanks
 Christoph



 -
 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: XML include for masthead and navigation

2001-12-05 Thread Adrian Geissel
Title: Message



Richard,

Have a look at map:aggregate/ and 
map:part/ in the sitemap. This allows you to merge mulitple XML sources, 
and then transform using a single xml-html stylesheet.

Hope this helps,
Adrian

  - Original Message - 
  From: 
  therandthem 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, December 04, 2001 6:13 
  PM
  Subject: XML include for masthead and 
  navigation
  
  I know that this 
  list is for Cocoon specific questions but with so many options available to me 
  in Cocoon, I thought I might ask it here.
  
  I am using Cocoon 
  2 and would like to have standard headers and footers on every page. I 
  have my site navigation in the Header. I would like the navigation to 
  get its information from a totally seperate XML file that only has data (no 
  presentation, XSL or logic, XSP). Something like 
  this:
  
  menu
   item 
  name="Home" uri="/welcome"
   
  item name="Services" uri="/services"/
   
  item name="Products" uri="/services"/
   
  /item
   item 
  name="About Us" uri="/aboutus"
  /menu
  
  I don't want my 
  individual pages to have any concept of this "menu.xml" file. I'd like 
  to reference"menu.xml"from somewhere like XSL, read in the values 
  and prepend the generated pages with the Header and this navigation 
  content. The end result being, I can add and remove values from one file 
  and have it can the navigation on all pages, instantly. What is the most 
  simple way to do this in Cocoon 2?
  
  Thanks for any 
  help,
  
  Richard


[C2.0] Fatal Error when trying to use SVG

2001-12-04 Thread Adrian Geissel



Hi,

I'm running Cocoon 2.0 (Final Release) on Tomcat 
3.2 on Windows NT 4.0 SP5.

I get the message "Fatal Error: No usable fonts 
found." when accessing the Cocoon SVG sample link (of the main sample page), and 
Tomcat dumps with "Java Result: 1".

I have attached the cocoon.log from this session, 
but am unable to locate any hints as to what happened.

Has anyone else experienced a similar problem? 

Many thanks,
Adrian



cocoon.log.zip
Description: Zip compressed data

-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Upgrading from C1.8.2 to C2.0rc2

2001-12-03 Thread Adrian Geissel

Also, have a look at CHello on sourceforge
(http://sourceforge.net/projects/chello) - its a skeleton application in
Cocoon2 (I'm sure that there'll be a 2.0 Release version soon - or migrating
is not that difficult)

Hope this helps
Adrian

- Original Message -
From: Alessio Mazzieri [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, December 03, 2001 3:19 PM
Subject: Upgrading from C1.8.2 to C2.0rc2


 Hi to all.
 I've produced a Cocoon 1.8.2 based web site, using a lot of XML
 documents and some XSP and JSP files. I've developed the site under this
 configuration: Apache 1.3.12 + Tomcat 3.3rc2 + Cocoon 1.8.2
 This works well, but for some reasons we want to upgrade the system to
 this configuration: Tomcat 4 + Cocoon 2.0rc2.
 Exploring C2 documentation, I've observed the existence of a new file
 called sitemap.xmap that (apparently) manage the entire web site.
 Could someone tell me how to upgrade the existing XML site?
 Or suggest me a tutorial to do this...
 Thanks.


 -
 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: C2 Using Datasources for DEV, TEST, PROD...

2001-11-30 Thread Adrian Geissel

Hi,

We have a similar configuration, and have addressed it using a small little
XSLT stylesheet to rewrite the cocoon.xconf on tomcat based on a
xsl:param/ that is passed into the transformation. This is then run as an
Ant task - et, Viola!

Regards,
Adrian

- Original Message -
From: Nuno José Pires dos Santos [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, November 28, 2001 3:15 PM
Subject: RE: C2 Using Datasources for DEV, TEST, PROD...


 Have diferent cocoon.xconf

 -Mensagem original-
 De: SANSONE, AARON M [Non-Pharmacia/1000]
 [mailto:[EMAIL PROTECTED]]
 Enviada: quarta-feira, 28 de Novembro de 2001 14:51
 Para: Cocoon-Users (E-mail)
 Assunto: C2 Using Datasources for DEV, TEST, PROD...

 I am preparing to implement a Cocoon 2 Web Site for Production purposes.
 Like many organizations, we have a Development, Test and Production
 environment.  Each environment has it's own web server and oracle
 database.
 What is the best way to automate having Cocoon 2 use the appropriate
 datasource depending on which web server it is located on?

 Thanks,
 Aaron

 -
 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 -
 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: xsp:include in logicsheets

2001-11-27 Thread Adrian Geissel

Hi,

the xsp:structure/ tag must be a child of the root xsp:page/, and not
included inside an xsl:template/, as you have indicated below.

Hope this helps,
Adrian

- Original Message -
From: Ratty [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 26, 2001 2:07 PM
Subject: xsp:include in logicsheets


 In my logicsheet i must use java.uitl.Calendar in import.
 How i can include it in basic xsp, from which my logicsheet called?
  do i must write something like this in logicsheet:
 xsl:template match =ratty:xxx
 xsp:page 
 xsp:structure
 xsp:includejava.util.Calendar/xsp:include
 /xsp:structure
 page .../page
 /xsp:page
 /xsl:template  ?
 when i tried it i give me error - something like ; expected!
 in generated code i see import java.util.Calendar inside my xsp generated
 class - as i unterstood its wrong
 Please help me!!


 -
 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Look-and-feel approach with views

2001-11-27 Thread Adrian Geissel

I suggest that there is an easier approach to solve your lookfeel issue.

Assuming that the LF is supported by means of some transformation, then why
not use the following sitemap construct:

map:pipeline
map:match pattern=xslt/look_feel.xsl
map:action get-user-l_f
map:read src=xslt/skins/{look-n-feel}.xsl
/map:action
map:read src=xslt/default_l_f.xsl/
/map:match

map:match pattern=*
map:generate src={1}/
map:transform src=cocoon:/xslt/look_feel.xsl/
map:serialize/
/map:match
/map:pipeline

That way, look and feel is handled in a single location and there is no need
to extend the sitemap language.

Hope this helps,
Adrian
(I haven't tested the above, but I want to illustrate the idea)

- Original Message -
From: Alexander Smirnoff [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, November 26, 2001 11:20 PM
Subject: Re: Look-and-feel approach with views


 OK. Then how could I implement dynamically look-and-feel based on user
 credentials (customer-id, user_id) ? I see only one possible way:
inserting
 action for each XSL transformation in each pipeline... That approach makes
 sitemap look even more ugly...

 Comments are follows,
 Alex.
 - Original Message -
 From: giacomo [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, November 26, 2001 5:50 PM
 Subject: Re: Look-and-feel approach with views


  On Mon, 26 Nov 2001, Alexander Smirnoff wrote:
 
   OK. I've got it.
  
   Well, is it possible to trigger the view from inside sitemap? What
about
   Passing parameters?
  
   I think the idea of breaking pipeline and continuing it from another
   resource-like pipeline (view) from labeled predefined point is
very
   powerful. Imagine having the same long chain of transformations
through
   group or even all of pipelines in the sitemap! From my point of view
it
   makes sitemap more unreadable. From the other side, if you have some
   resource-like view which could be processed from any pipeline and
 being
   returned to the point of entry will make readability of sitemap more
   easy...
  
   Something like that:
   !-- declaration --
   map:chain name=look-feel
   !-- action get-user-skin :-) defines path to the source of the
   skin --
   map:act type=get-user-skin
   map:transform src={srcpath}/{src}/
   /map:act
   map:transform src=default/{src}/
   /map:chain
  
   !-- from pipline --
   map:match pattern=...
   map:generate src=welcome.xml/
   map:call-chain name=look-feel
   map:parameter name=src value=welcome.xsl/
   /map:call-chain
   map:serialize/
   /map:match
  
   This is just a random thought. Sorry for being naive if this is the
   case...Probably there are some workaround which I don't know, - I'll
be
 glad
   to comprehend.
 
  I can't see what your approach is good for. Views aren't made for
  skinning. They are for producing view in the sense of schema, meta data,
  links etc. but not for green or red. If you like to use it that way,
yes,
  your sitemap might look ugly then.

 So what would be more elegant approach ? Use actions in each
transformation
 point in sitemap?

 
  Your proposed enhancement is only giving another programmers view
  into the sitemap which isn't what we initially wanted and is what
  we like to get fixed in the future.

 The only proposition I made is to manipulate sitemap in orthogonal fashion
 like views do. Why not?
 I do understand...

 What are the tradeoffs?

 
  Giacomo
 
  
   Thanks,
   Alex.
  
  
   - Original Message -
   From: giacomo [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Monday, November 26, 2001 2:46 PM
   Subject: Re: Look-and-feel approach with views
  
  
On Mon, 26 Nov 2001, Alexander Smirnoff wrote:
   
 I'm using 2.0rc1, but even if I put label=xsltran into
 generator...
 declaration this doesnt work either...

 I feel that I misundersatnd the concept. It seems, for example, in
   webapp
 sitemap.xconf (in HEAD branch) the view declaration like:

 map:view name=links from-position=last
map:serialize type=links/
 /map:view

 never executes... Otherwise it supposed to be executed for every
 pipline
 after last component in pipline... So I'm really confused...
   
If you don't request that view it will never be executed :) use a
   
http://localhost:8080/cocoon/welcome?cocoon-view=links
   
and you'll get all the links in the welcome page as response.
   
Giacomo
   

 Thanks,
 Alex.

  On Fri, 23 Nov 2001, Alexander Smirnoff wrote:
 
   Hi everyone,
  
   I'm trying to use Views for setting look and feel based on
 specific
   user
   logged on the web site. So far I cannot even make very basic
 view
 working:
  
   map:views
   map:view from-label=xsltran name=xsltran
   map:transform src=stylesheets/xsl/welcome.xsl/
 

[C2] Extending the available components

2001-11-13 Thread Adrian Geissel



Hi,

Appologies in advance for a 'heavy' technical 
question, but I reckon that itmay be of interest to 
cocoon-users.

My Cocoon-based application requires access to an 
ftp repository, both for upload and download support. I have an ftp-client 
implementation that allows me to perform this work. 

My question has two parts - firstly, is there 
aneasy way to bind to configuration parameters (IP, user, password, etc) 
from cocoon.xconf? I figure that I need to implementsome  Avalon framework 
interfaces, but then the question is which ones, and how do I register the 
component?

The second is related, but concerns connection 
pooling - in a manner similar to SQL connection pooling. Can the connection 
pools be associated with external components, or just Cocoon internal ones? 
Also, can someone indicate how I would go about registering / configuring such a 
pool?

Many thanks,
Adrian



Re: XSP+XSL-TEX-PDF?

2001-11-13 Thread Adrian Geissel

Hi Victor,

I believe that you biggest hurdle is performing the second stage  - as you
need to transformation needs to take TEX input and deliver PDF output, which
is beyond the remit of the Cocoon framework (intermediates are XML).

Have you considered using xsl:fo during your content rendering, ie. instead
of using Tex-XSL, using FOP (formatting objects for PDF) which allows you to
generated to PDF directly.

Your pipeline would then look something like:

map:pipeline
map:match pattern=my-doc.pdf
  map:generate type=serverpages src=my-doc.xsp/
  map:transform src=xsp2fop.xsl/
  map:serialize type=pdf/
/map:match
/map:pipeline

You will need to provide the 'xsp2fop.xsl' stylesheet, as this defines how
your XML output from 'my-doc.xsp' should be presented. The other components
are standard in the Cocoon distribution.

I hope that this helps some
Adrian

- Original Message -
From: Skladov, Victor [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 13, 2001 12:56 PM
Subject: XSP+XSL-TEX-PDF?


 Hi!

 How can I tell Cocoon2 to perform different steps?
 For example:
 1. To create a TEX file from XSP+XSL (XSP and Tex-XSL are available)
 2. To create a PDF file from the TEX document?

 Would be grateful for any ideas, I've been searchin desperate for
 examples  for hours


 Regards,
 Viktor

 -
 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




[C2.0rc1] Problems with IE5.00 - throws an Exception during endDocument processing after sitemap redirect

2001-10-31 Thread Adrian Geissel



Hi,

I've logged this as a bug for C2, but I also wanted 
to see if anyone else is having this problem.

Scenario:

my sitemap performs some processing (database 
update) in an action, and on success, redirects to another page before returning 
using the supplied redirector object. The URI that it points to is also served 
by the sitemap, and also consists of aggregated content that is transformed - 
all things legal and cool.

The problem is that using IE 5.00 (WinNT 4.0 SP5), 
the redirected URI is not completed, and eventually the connection times-out - 
not very good. To make matters worse, the problem does not exist if I access the 
redirected page directly from the browser, or perform my database update action 
from another machine running IE 5.5 (Win2k), the problem does not 
exist.

Has anyone else experienced this?
The full bug report isat http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4438(applogies 
for the long report, but it has taken a while to isolate the 
problem)

Many thanks,
Adrian

(please don'tgripe aboutIE - this is a 
real problem - I'm just looking for other instances, and possible solutions. 
thanks /A)


[C2.0rc1]: Question relating to request object lifetime during aggregation

2001-10-24 Thread Adrian Geissel



Hi,

I have a scenario where I am aggregating content 
from three sources, one of which is an XSP retrieved using internal cocoon 
protocol. This XSP calls request.setParameter() to indicate a 
status.

The aggregation event is followed by an action that 
tests this status, but it always is set to null.

Question: am I correct in assuming that the same 
request instance is used across all internal cocoon protocol 
requests?
Question: if this is the case, is there a reason 
which my attribute should be lost?

Many thanks,
Adrian

=== begin:sitemap fragment ===
 map:match 
pattern="*.form" map:generate 
type="serverpages" src=""/ 
map:serialize type="xml"/ 
/map:match

 map:match 
pattern="*.update" map:generate 
type="serverpages" src=""/ 
map:serialize type="xml"/ 
/map:match
 map:match 
pattern="update_*.html" 
map:aggregate 
element="page" map:part 
src=""/ 
map:part 
src=""/ 
map:part src=""/ !-- this sets 
therequest attribute -- 
/map:aggregate map:act 
type="check-commit-succeed"/ !-- this tests the request attribute, and 
re-directs ifsuccess -- 
map:transform 
src=""/ 
map:serialize/ /map:match


=== end: sitemap fragment 
===


[C2.0rc1] SLIGHTLY OFF TOPIC: Has anyone used Xalan extensions in Cocoon?

2001-10-19 Thread Adrian Geissel

Hi,

I appologise in advance for posting to this mailing list, but I also think
that the answer maybe of interest to the Cocoon community.

What I am trying to do is to build a generic form within C2 that is defined
in an XSP which is aggregated with another path that will contain the data
which is to be plugged into the form, thereby allowing for improved form
(UI) reuse across scenarios. In trying to do this, I need the ability to
perform run-time XPath evaluation, rather than at programming time.

I have found a Xalan extension function (luckily before I wanted to write my
own :) that appears to do the trick. Its called xalan:evaluate() and takes
an XPath expression as a parameter, which in turn contains an XPath
expression, which is then evaluated and returned.

I've read the docs, but can't get it to work. The docs say to use the
namespace   xmlns:xalan=http://xml.apache.org/xalan;. I'm calling the
extension function in my xml2html transformation stylesheet as follows:

xsl:stylesheet version=1.0
  xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
  xmlns:xalan=http://xml.apache.org/xalan;
  xmlns:zdam=zenark.com/zdam
  exclude-result-prefixes=xalan


xsl:template ...

...
xsl:choose
  xsl:when test=@bind-to
xsl:attribute name=valuexsl:value-of
select=xalan:evaluate(@bind-to)//xsl:attribute
/xsl:when
  xsl:otherwisexsl:attribute name=valuexsl:value-of
select=normalize-space()//xsl:attribute/xsl:otherwise
/xsl:choose
...

/xsl:template

/xsl:stylesheet

The problem is that evaluate() returns '', rather than the expected real
value. The returned XPath expression (in @bind-to) is correct.

Any thoughts or experiences?
Thanks in advance,
Adrian



-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




[C2] Help: Unexpected bad XSP/Logicsheet behavior

2001-10-19 Thread Adrian Geissel



Hi,

My logicsheetprovides XSP support templates, 
for controllingthe structure of the generated XML. A typical template 
generates an XML fragment, including the local 'root' (top-level) element, 
attributes, content and child elements.

The strange behavior is that my 'root' element is 
not being processed (in the example below, my:object/ is never created), 
but all subsequent attributes, content and child elements are processed as 
expected.

I've looked at the XSPgenerated java file, 
which does not issue any SAX events relating to the creation of thefirst 
element, but everything else is there as expected.

This logicsheet worked 'perfectly' in Cocoon 1.8.2, 
and I have made the appropriate namespace changes to C2 enable it.

Does anyone know what's happening 
here?
Thanks,
Adrian


=== LOGICSHEET fragment 

xsl:template 
match="util:get-object" xsp:element 
name="my:object" 
xsp:logic { /* BEGIN: scope 
*/
  // mixture of 
Javacode and xsp:.../ tags } /* 
END: scope */ /xsp:logic 
/xsp:element/xsl:template
===XSP fragment 

xsp:page 
xmlns:xsp="http://apache.org/xsp" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:xsp-request="http://apache.org/xsp/request/2.0" 
xmlns:session="http://apache.org/xsp/session/2.0" 
xmlns:util="my.com/xsp/util" language="java" 
create-session="true" xmlns:my="my.com/my"my:data 
xsp:logic try {
 
util:get-object
  !-- 
parameters omitted for clarity --
 
/util:get-object

 } 
catch(Exception ex) { 
System.out.println(ex.getMessage()); } 
/xsp:logic/my:data/xsp:page


Re: nested stylesheets

2001-10-05 Thread Adrian Geissel

Hi,

The issue with logicsheet XSLs is that they should translate what they
understand and pass through what they don't. This in effect is how the
embedded tags are resolved, when all logic sheets are run against the XSP
file. Any tags that are left over are output in the resulting Document
(logically).

To make this happen, there are two minimum requirements for your logicsheet.

Firstly, provide a template that processes the xsp:page/ element, which in
turn creates an xsp:page/ element as a root context for the follow-on
logicsheets. For example:

  xsl:template match=xsp:page
xsp:page
  xsl:apply-templates select=@*/
  xsl:apply-templates/
/xsp:page
  /xsl:template


and Secondly, to ensure that all unprocessed elements are copied, include
the following template in your logicsheet:

  !-- copied from [C2] util.xsl  --
  xsl:template match=@*|*|text()|processing-instruction()
xsl:copy
  xsl:apply-templates select=@*|*|text()|processing-instruction()/
/xsl:copy
  /xsl:template


Hope this helps,
Adrian

- Original Message -
From: Aurelien [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 04, 2001 8:52 PM
Subject: nested stylesheets


 Hi,

 (sorry if this kindof a repost, I didn't see the message on the list,
 and neither did it show in my sent items...)

 I've already managed to have some ejb's basically exposed as taglibs.
 Now, I'd like to be able to nest custom tags:

 I have a method that checks if a user has certain rights (I do this in
 order to have a centralized session/roles mechanism so as to be able to
 have several servlet engines sharing a common set of users), for example
 with a tag like this:

 gatekeeper:checkUser sessionId=... requestId=.../

 And I have another bean that provides information about sport events:

 infokiosk:getSoccerScore matchId=.../

 I'd like to be able to nest tags, so I can delegate basic logic to XML
 authors that don't want to hear about programming. They'd do something
 like this (in an xsp document):

 infokiosk:getSoccerScore matchId=...
infokiosk:checkAccess
  gatekeeper:checkUser sessionId=... requestId=.../
/infokiosk:checkAccess
 /infokiosk:getSoccerScore

 Has someone already tried this ?

 I looked into util.xsl, but I couldn't understand how they implement a
 similar example which is documented in cocoon2's online help.

 Any help is greatly appreciated !

 Aurélien


 -
 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




[C2.0b2] - ComponentManager

2001-10-04 Thread Adrian Geissel

Hi,

We looking at migrating our application from C1.8.2 over to C2.

In C1.x, we used Turbine for connection pooling, and we need to move over to
the Avalon CoponentManager framework.

There was one real advantage in using Turbine, where there is a
singleton-access to the connection-pool, thereby allowing it to be easily
integrated with external code. Basically, we have a tried-and-tested
database access library that takes utilises an internal ConnectionFactory
that calls into Turbine for its connections.

I have not found a similar factory method for accessing either the Cocoon
object, its ComponentManager, or any managed components. Have I missed
something, or is there a preferred approach? A non-singleton access to the
connection pool will require a potentially reasonable coding change.

Also, having a little difficulty in configuring a pooled connection to
PostgreSQL - I've followed the instructions in the 'datasources' document,
but the ComponentManager complains that the named component cannot be found.
I've included the relevant bits from both cocoon.xconf, the calling code
(from within an Action) and log-file extract.

Any and all help will be greatly appreciated,
Many thanks
Adrian


== cocoon.xconf extract ==
  markup-languages
!-- Removed for clarity --
  /markup-languages

!--
  datasources
  --
  component
name=org.apache.avalon.excalibur.datasource.DataSourceComponentSelector
   class=org.apache.cocoon.CocoonComponentSelector
!-- Data source details for the ZDAM database --
component-instance name=zdam
class=org.apache.avalon.util.datasource.JdbcDataSource
  pool-controller min=2 max=10/
  auto-commitfalse/auto-commit
  dburljdbc:postgresql://193.120.120.11/zdam_test/dburl
  usersql/user
  passwordgarfield/password
/component-instance
  /component

!--
  /datasources
  --

== cocoon.xconf extract ==

== calling code extract ==

ComponentSelector selector = (ComponentSelector)
manager.lookup(org.apache.cocoon.Roles.DB_CONNECTION);
ConnectionFactory.dataSource = (DataSourceComponent)
selector.select(zdam);

== calling code extract ==

== log-file extract ==
org.apache.avalon.framework.component.ComponentException: UnnamedSelector:
ComponentSelector could not find the component for hint: zdam
 at
org.apache.avalon.excalibur.component.ExcaliburComponentSelector.select(Exca
liburComponentSelector.java:239)
 at
com.zenark.zdam.cocoon.action.DoUserLoginAction.compose(DoUserLoginAction.ja
va:102)
 at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(De
faultComponentFactory.java:98)
 at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(
ThreadSafeComponentHandler.java:81)
 at
org.apache.avalon.excalibur.component.ExcaliburComponentSelector.addComponen
t(ExcaliburComponentSelector.java:383)
 at
org.apache.cocoon.sitemap.AbstractSitemap.load_component(AbstractSitemap.jav
a:231)
 at
org.apache.cocoon.www.sitemap_xmap$Configurer.configActions(sitemap_xmap.jav
a:929)
 at org.apache.cocoon.www.sitemap_xmap.configure(sitemap_xmap.java:276)
 at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(De
faultComponentFactory.java:108)
 at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(
ThreadSafeComponentHandler.java:81)
 at
org.apache.cocoon.components.language.generator.GeneratorSelector.addGenerat
or(GeneratorSelector.java:118)
 at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.addComp
iledComponent(ProgramGeneratorImpl.java:292)
 at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generat
eResource(ProgramGeneratorImpl.java:273)
 at
org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(Pr
ogramGeneratorImpl.java:179)
 at org.apache.cocoon.sitemap.Handler.run(Handler.java:204)
 at java.lang.Thread.run(Thread.java:484)

== log-file extract ==



-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [C2.0b2] - ComponentManager

2001-10-04 Thread Adrian Geissel


- Original Message -
From: Berin Loritsch [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, October 04, 2001 3:57 PM
Subject: Re: [C2.0b2] - ComponentManager


 datasources
   jdbc name=zdam
 pool-controller min=2 max=10/
 auto-commitfalse/auto-commit
 !-- Supply the correct class name.  The instructions
  tell you to place this in web.xml, but this is
  now possible --
 driverorg.postgresql.driver.JDBCDriver/driver
 dburljdbc:postgesql://193.120.120.11/zdam_test/dburl
 usersql/user
 passwordgarfield/password
   /jdbc
 /datasources


That worked - now the connection seems to be available through the
ComponentManager
Thanks for your help,
Adrian




-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: How to get a NodeList via a XPath like String?

2001-10-03 Thread Adrian Geissel



Jan,
Are you looking for something like

"/mux/content[@lang='us-en' or 
not(@lang)]//sidebox[1]"

Adrian


  - Original Message - 
  From: 
  Jan 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, October 02, 2001 7:13 
  PM
  Subject: How to get a NodeList via a 
  XPath like String?
  
  Is there a way to get a NodeList containing all 
  nodes of a specified Document that match (XPath) to an expression string 
  like
  "/mux/content//sidebox" or "/mux/content[@lang = 
  'us-en']//sidebox[1]" etc.?
  
  Thanks,
  Jan.


[C1] Update / enhancement for the sendmail.xsl logicsheet

2001-10-02 Thread Adrian Geissel

Hi all,

I appologise in advance for submitting this update / enhancement to
cocoon-users - but perhaps a member of the cocoon-dev list can do the
needful :)

The replacement template from sendmail.xsl included below allows sending of
rich-text mail content. HTML content can be included by qualifying the
sendmail:body/ tag with a mime-type attribute, for example:

sendmail:send-mail
   ...
   sendmail:body mime-type=text/html
/sendmail:send-mail

I believe that this change should also work with the C2 logicsheet, but I
have not yet had a chance to try that.
Hope others find this useful,

Cheers
Adrian


xsl:template match=sendmail:send-mail
  xsl:variable name=fromxsl:call-template
name=get-nested-stringxsl:with-param name=content
select=sendmail:from//xsl:call-template/xsl:variable
  xsl:variable name=toxsl:call-template
name=get-nested-stringxsl:with-param name=content
select=sendmail:to//xsl:call-template/xsl:variable
  xsl:variable name=subjectxsl:call-template
name=get-nested-stringxsl:with-param name=content
select=sendmail:subject//xsl:call-template/xsl:variable
  xsl:variable name=bodyxsl:call-template
name=get-nested-stringxsl:with-param name=content
select=sendmail:body//xsl:call-template/xsl:variable
  xsl:variable name=mime-type
xsl:choose
  xsl:when test=sendmail:body/@mime-typexsl:value-of
select=sendmail:body/@mime-type//xsl:when
  xsl:otherwisetext/plain/xsl:otherwise
/xsl:choose
  /xsl:variable
  xsl:variable name=smtphostxsl:call-template
name=get-nested-stringxsl:with-param name=content
select=sendmail:smtphost//xsl:call-template/xsl:variable
  xsp:logic
try {
  Properties _properties = new Properties(this._properties);
  if (!null.equals(String.valueOf(xsl:copy-of select=$smtphost/)))
{
_properties.put(mail.smtp.host,String.valueOf(xsl:copy-of
select=$smtphost/));
  }
  Session _sendmail_session =
Session.getDefaultInstance(_properties,null);
  Message _message = new MimeMessage(_sendmail_session);
  InternetAddress _from = new
InternetAddress(String.valueOf(xsl:copy-of select=$from/));
  _message.setFrom(_from);
  InternetAddress _to = new InternetAddress(String.valueOf(xsl:copy-of
select=$to/));
  _message.setRecipient(Message.RecipientType.TO,_to);
  _message.setSentDate(new Date());
  _message.setSubject(String.valueOf(xsl:copy-of select=$subject/));
  _message.setContent(String.valueOf(xsl:copy-of select=$body/),
String.valueOf(xsl:copy-of select=$mime-type/));
  Transport.send(_message);
} catch (AddressException e) {
  error type=userYour email address is invalid./error
} catch (MessagingException e) {
  error type=serverAn error occured while sending email./error
}
  /xsp:logic
/xsl:template



-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Getting Cocoon 1.8.2 working with

2001-09-24 Thread Adrian Geissel

Hi,

I want to use a later build of Xalan (xalan-j_2_0_1.zip) with Cocoon 1.8.2

I've tried dropping in the appropriate JARs from Xalan (xalan.jar,
xalanj1compat.jar) - replacing the Xalan JAR that came with the
distribution, but I get the following stack-trace:

java.lang.RuntimeException: Exception when creating 
org.apache.cocoon.transformer.XalanTransformer :
java.lang.VerifyError: (class:
org/apache/cocoon/transformer/XalanTransformer, method: transform signature:
(Lorg/w3c/dom/Document;Ljava/lang/String;Lorg/w3c/dom/Document;Ljava/lang/St
ring;Lorg/w3c/dom/Document;Ljava/util/Dictionary;)Lorg/w3c/dom/Document;)
Incompatible object apÒy
 at org.apache.cocoon.framework.Manager.create(Manager.java:124)
 at org.apache.cocoon.Engine.init(Engine.java:152)
 at org.apache.cocoon.Engine.getInstance(Engine.java:232)
 at org.apache.cocoon.Cocoon.init(Cocoon.java:157)
 at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
 at org.apache.tomcat.core.Handler.init(Handler.java:215)
 at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
 at org.apache.tomcat.core.Handler.service(Handler.java:254)
 at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
 at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
 at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
 at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
 at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
 at java.lang.Thread.run(Thread.java:484)

Is there something else that I need to do?
Are there any suggestions are gratefully welcomed.
Many thanks,
Adrian



-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: session-invalidator and back-button?

2001-08-16 Thread Adrian Geissel

Hi Michael,

I believe that the only way to solve such an issue is to 'run' the protected
portion of your website in a spawned browser window, and then when the user
log's out, to close that window. This will ensure that the Back history,
which is local to a browser window, cannot be access with permission.

Hope that this helps,
Adrian


- Original Message -
From: Enke Michael [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 16, 2001 11:46 AM
Subject: session-invalidator and back-button?


 Hi,
 I tryed the web-application demo from cocoon2
 where a login and logout can be performed.
 But after logout if I press the back button of my browser
 I get back into protected area without authorization.
 How can this be avoided?

 Michael

 -
 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: session-invalidator and back-button?

2001-08-16 Thread Adrian Geissel

The solution presented is not a Cocoon specific solution, but rather
addressess the issue of the client-side browser keeping a history.
In a past life, we coded an application to do this using JavaScript that the
browser used to spawn the protected window. All pages accessed and presented
within the window are basically unchanged, therefore only requiring
JavaScript on the Login and Logout pages.

This is not an elegant solution, but it can work once you cater for the
major browsers (script variances).
Cheers
Adrian

- Original Message -
From: Enke Michael [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 16, 2001 1:53 PM
Subject: Re: session-invalidator and back-button?


 But if I use e-mail or banking over internet,
 it is not possible to get the last page back.
 And there is no extra window, the back button is selectable.
 The server answers that an error occured or that
 I have to login again.

 Is there a way in cocoon other than spawning another browser window?

 Michael

 Adrian Geissel wrote:
 
  Hi Michael,
 
  I believe that the only way to solve such an issue is to 'run' the
protected
  portion of your website in a spawned browser window, and then when the
user
  log's out, to close that window. This will ensure that the Back history,
  which is local to a browser window, cannot be access with permission.
 
  Hope that this helps,
  Adrian
 
  - Original Message -
  From: Enke Michael [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, August 16, 2001 11:46 AM
  Subject: session-invalidator and back-button?
 
   Hi,
   I tryed the web-application demo from cocoon2
   where a login and logout can be performed.
   But after logout if I press the back button of my browser
   I get back into protected area without authorization.
   How can this be avoided?
  
   Michael
  
   -
   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: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
  -
  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: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

 -
 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: session-invalidator and back-button?

2001-08-16 Thread Adrian Geissel

Hi,

I should have mentioned in my last reply that it is still the responsibility
of your application to ensure that sensitive content is protected - using
session parameters, or whatever. The solution I presented is for the
client-side issue.

Cheers
Adrian

- Original Message -
From: Enke Michael [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 16, 2001 1:53 PM
Subject: Re: session-invalidator and back-button?


 But if I use e-mail or banking over internet,
 it is not possible to get the last page back.
 And there is no extra window, the back button is selectable.
 The server answers that an error occured or that
 I have to login again.

 Is there a way in cocoon other than spawning another browser window?

 Michael

 Adrian Geissel wrote:
 
  Hi Michael,
 
  I believe that the only way to solve such an issue is to 'run' the
protected
  portion of your website in a spawned browser window, and then when the
user
  log's out, to close that window. This will ensure that the Back history,
  which is local to a browser window, cannot be access with permission.
 
  Hope that this helps,
  Adrian
 
  - Original Message -
  From: Enke Michael [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, August 16, 2001 11:46 AM
  Subject: session-invalidator and back-button?
 
   Hi,
   I tryed the web-application demo from cocoon2
   where a login and logout can be performed.
   But after logout if I press the back button of my browser
   I get back into protected area without authorization.
   How can this be avoided?
  
   Michael
  
   -
   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: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
  -
  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: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

 -
 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: [C1] Generating a HTML frameset using XML/XSLT

2001-07-12 Thread Adrian Geissel

Thanks - it was the SAX parser error message that was throwing me - I had
copied the HTML and made that fatal assumption that it was valid (XML)

Cheers
Adrian

- Original Message -
From: Benoît Chauvet [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, July 11, 2001 6:00 PM
Subject: Re: [C1] Generating a HTML frameset using XML/XSLT


 I think the error message is clear enough...
 The SAX parser waits for an = character after the attribute FRAME...

 Maybe it doesn't allow the '-' character you use...

 Try mystuff:data frametop=top.html framesidebar=sidebar.html
framemain=main.html/ instead...

 --
 Benoît Chauvet


 -
 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]





-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




[C1] Generating a HTML frameset using XML/XSLT

2001-07-11 Thread Adrian Geissel



Hi,

We are just trying to put a dynamic frameset as the 
primary entry-point for our application, and using all that we've learnt so far, 
we created an XSP file with an associated stylesheet (included at the end of 
this mail). We get an unusual SAX exception when accessing the 
frameset:

org.apache.cocoon.processor.ProcessorException: 
Could not associate stylesheet to document: error reading 
C:\tomcat\webapps\zdam\index2html.xsl: org.xml.sax.SAXParseException: Attribute 
name "FRAME" must be followed by the '=' character.

Has someone come across this before or successfully 
implemented framesets? 
All help is gladly accepted.
Thanks,Adrian

Cocoon 1.8.2
Tomcat 2.3
Windows NT

=
XSP simply generates the following:

mystuff:data frame-top="top.html" 
frame-sidebar="sidebar.html" frame-main="main.html"/

=
?xml version="1.0"?xsl:stylesheet 
version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:xsp="http://www.apache.org/1999/XSP/Core" 
xmlns:mystuff="mystuff.com"

xsl:template 
match="mystuff:data"

 html 
head 
title/title /head

 frameset 
rows="100,*" FRAME name="top" 
src="{@frame-top}" marginwidth="10" marginheight="10" scrolling="no" 
frameborder="0" noresize/ 
frameset 
cols="140,*" frame 
name="side" src="{@frame-sidebar}" marginwidth="0" marginheight="0" 
scrolling="no" frameborder="0" 
noresize/ frame 
name="main" src="{@frame-main}" marginwidth="0" marginheight="0" 
scrolling="auto" frameborder="0"/ 
/frameset /frameset 
/html/xsl:template

/xsl:stylesheet




Re: PlainText Output

2001-07-06 Thread Adrian Geissel

- Original Message -
From: Daniel Pfuhl [EMAIL PROTECTED]
To: User CocoonList [EMAIL PROTECTED]
Sent: Thursday, July 05, 2001 9:05 PM
Subject: PlainText Output


 Hello

 can someone tell me where to find some examples to
 learn how I can transform my xml and output this as
 plain text?

Put the following into your style-sheet (the last in the chain)

xsl:template match=/
xsl:processing-instruction
name=cocoon-formattype=text/plain/xsl:processing-instruction
root
...
/root
/xsl:template

You will need a dummy root tag, as XSLT expects to write out XML - but when
displayed in the browser, it should appear as plain ASCII text.

Hope this helps,


 thanks in advance
Welcome,
Adrian



-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Extending the standard Cocoon XSP logicsheets, namely ESQL

2001-07-03 Thread Adrian Geissel



Hi,

I'musing Cocoon 1.8.2 and it's great - 
dynamic content generation in an efficient and controlled manner - a real 
winner!

As with all technologies, there comes a point when 
you want it to do more - and my current aspiration is to improve the way that 
SQL is handled, specifically the ESQL.xsl logicsheet. What I am trrying to do is 
to structure the query statement that is passed as part of the esql:query tag, 
as follows:

...
esql:query
 
zsql:select zsql:field 
column="*"/ zsql:source 
view="v_test"/ 
zsql:where 
zsql:eq zsql:field 
column="id"/ 
zsql:valuerequest:get-parameter 
name="id"/zsql:value 
/zsql:eq 
/zsql:where 
/zsql:select/esql:query
esql:results
...
/esql:results
...

I have a logic sheet that handles the zsql 
namespace and it works really well on its own - it even allows other logicsheets 
(taglibs) to be called from it using a 'get-nested-content' template (such as 
the request:get-parameter.. in the sample). However, the above code 
structure results in Cocoon generating a DOM sub-tree under the 
esql:query tag, rather than calling the appropriate templates to format 
the query string.

I have tried a number of approaches, including 
adding the zsql namespace to the esql xsp:page tag, and I believe that 
my logicsheet is locatable, as I created a jar, included it in the CLASSPATH and 
also updated the cocoon.properties to point to it.

Is there something that I have missed, or am I 
trying the impossible? Any help is gladly appreciated.

On a slightly different note, if anyone is curious 
about the zsql stuff, please drop me a line as I am putting together an open 
project tostructure and deploy sql script from single source to multiple 
destination (vendors) as well as documentation - a really nice showcase for 
Cocoon, if nothing else.

Many thanks,
Adrian


Mixing XSL and XSP in a single stylesheet

2001-06-06 Thread Adrian Geissel



Hi,

I'm trying to write a data abstraction layer to 
retrieve records from an SQL database (using ESQL) and then to format these into 
an XML fragment (using XSLT) for onward transformation.

It appears that the xsl: namespace elements are not 
being executed - can I do this in a single step, or do I need to tease it apart 
into two transformation steps? I've included the important code fragment below, 
with comments following the xsl statements that do not work.

Any help will be greatly appreciated
Cheers
Adrian

--- Code Fragment ---
?xml version="1.0"?

?cocoon-process 
type="xsp"??xml-stylesheet type="text/xsl" 
href="zdam/zdam2html.xsl"??cocoon-process 
type="xslt"?

?cocoon-format 
type="text/xsl"??cocoon-content type="text/plain"?

xsp:page 
xmlns:xsp="http://www.apache.org/1999/XSP/Core" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:esql="http://apache.org/cocoon/SQL/v2" 
xmlns:zdam="zenark.com/zdam"
zdam:data

esql:connection 
esql:driverpostgresql.Driver/esql:driver 
esql:dburljdbc:postgresql://193.120.120.11/zdam_test/esql:dburl 
esql:usernamesql/esql:username 
esql:passwordgarfield/esql:password 
esql:execute-query 
esql:query SELECT 
id,name,description,category,author,rev_id,status 
 FROM 
latest_revisions /esql:query 
esql:results 
esql:row-results 
xsl:variable name="_REVID"esql:get-string 
column="rev_id"//xsl:variable 
xsl:variable name="_STATUS"esql:get-string 
column="status"//xsl:variable 
zdam:asset id="." name="." author="." category="." !--Works 
-- xsl:attribute 
name="id"esql:get-int column="id"//xsl:attribute !-- 
Fails -- 
xsl:attribute name="name"esql:get-string 
column="name"//xsl:attribute !-- Fails 
-- xsl:attribute 
name="author"esql:get-string column="author"//xsl:attribute 
!-- Fails -- 
xsl:attribute name="category"esql:get-string 
column="category"//xsl:attribute !-- Fails 
-- 
zdam:descriptionesql:get-string 
column="description"//zdam:description !--Works 
--
 
/esql:row-results /esql:results 
/esql:execute-query/esql:connection

/zdam:data
/xsp:page--- End Code Fragment ---