RE: svgz to jpeg ?

2003-06-29 Thread Conal Tuohy
I think you'll have to write your own GZipGenerator or possibly a
GZipSource?

You are right that the gzipped svg document is not a ZIP archive (it doesn't
include a table of contents or anything - it's just a single BLOB). On the
bright side, gzip is trivial to use in Java, so writing your own shouldn't
be hard.

CHeers

Con

> -Original Message-
> From: rob [mailto:[EMAIL PROTECTED]
> Sent: Monday, 30 June 2003 09:35
> To: [EMAIL PROTECTED]
> Subject: Re: svgz to jpeg ?
>
>
> On 28 Jun 2003 at 14:51, Upayavira wrote:
>
> >Ah. So your file on disc is compressed svg. Okay, so you
> need to uncompress
> it into
> >XML and pass that into the SVG2JPG serializer. There's two
> ways to do that,
> either
> >with a zip generator (I think there's an example of one in
> the Langham &
> Ziegler
> >Cocoon book), or using the Jar protocol (see
> >http://wiki.cocoondev.org/Wiki.jsp?page=JarProtocolExample).
> >
> >Both should extract your zipped SVG ready for converting to JPG.
>
> Thanks again for you reply.
>
> I've tried using the jar protocol, but it does not accept the
> 'svgz' file as
> a
> valid zip archive. I guess this is because there is no
> physical file to
> extract
> i.e jar:http//localhost/xyz.svg!???
>
> Even Winzip will not open it.
>
> I haven't tried the zip generator yet because I haven't found any
> documentation,
> and someone has borrowed my Cocoon book !!
>
> Regards,
>
> Rob.
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: retaining data from a partial pipeline for subsequent requests

2003-06-18 Thread Conal Tuohy
See the FragmentExtractor system.
http://cocoon.apache.org/2.1/userdocs/transformers/extractor-transformer.htm
l
http://cocoon.apache.org/2.1/userdocs/generators/extractor-generator.html

You could just break your pipeline into 3 pipelines, and use the "cocoon"
protocol to link them together into a tree shape. This will give you your
"tee" and allow you to reuse the pregenerated content E, which will be
cached for you:

1) data layer and business logic (i.e. up to point E)


Generators:A  B  C  --|
   |  |  ||- the data layer
   ---|
  |   |
Aggregation:  D --|
  |
Transformation:   E  the
 business logic




2) graphics

Transformation:   E  the
  |  business logic
jpg/png  the prettfying
 layer



3) texts

Transformation:   E  the
  |  business logic
   --   --|
   |||  | |- the prettfying
Formatting:   rtf  xsl  pdfhtml --|  layer




These second two pipelines are based on the other pipeline E. e.g.








etc...





etc... (serialize as RTF, PDF, or HTML)



The "cocoon:" protocol is your friend!

Cheers

Con

> -Original Message-
> From: Anoop Aryal [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 19 June 2003 04:52
> To: [EMAIL PROTECTED]
> Subject: retaining data from a partial pipeline for
> subsequent requests
>
>
> hi,
> i'm evaluating cocoon to see if it suits our needs. i've used fop
> extensively before. and i know just enough of cocoon to be dangerous.
> this is kinda long but i put a lot of time in drawing in ascii to make
> it clearer; hopefully ;)
>
> the problem:
> -
>
> in keeping with the SOC, i have the following setup:
>
> Generators:A  B  C  --|
>|  |  ||- the
> data layer
>---|
>   |   |
> Aggregation:  D --|
>   |
> Transformation:   E  the
>   |
> business logic
>--   --|
>|||  | |- the
> prettfying
> Formatting:   rtf  xsl  pdfhtml --|  layer
>
>
> in the html, i refer to images (charts, which i'm generating
> using Fins)
> that are generated according to the data generated at E. But
> as they are
> subsequent requests from the browser don't have access to the
> data since
> the pipeline that generated the data was done and over with after
> generating the html. So, i'm left with two options:
>
> i) regenerate the data up to E:
>
> Generators:A  B  C  --|
>|  |  ||- the
> data layer
>---|
>   |   |
> Aggregation:  D --|
>   |
> Transformation:   E  the
>   |
> business logic
> jpg/png  the
> prettfying
>  layer
>
> or,
> ii) save the data from the pipeline into the session (from A,
> B, C) when
> generating the html and use that as such:
> Generator: F (reads data from the session previously set by A,B,C) and
> generates xml to feed into the fins transformer.
>
> Current solution:
> -
> as option (i) would require me to regenerate the dataset, i
> opted to use
> option (ii). but then, since i can only shove the data into sessions
> from an xsp (?) i only have the raw form of data from (A, B, C) in the
> session. F would then have to do what D and E does. complete breakdown
> of SOC.
>
> Wishful/hopeful thinking:
> -
> something like this would be optimal:
>
> Generators:A  B  C
>|  |  |
>---
>   |
> Aggregation:  D
>   |
> Transformation:   E - tee*

RE: Building lucene index without crawling?

2003-06-16 Thread Conal Tuohy
Yes it is possible. See the LuceneIndexTransformer:
http://wiki.cocoondev.org/Wiki.jsp?page=LuceneIndexTransformer

This component is quite new and there's no other documentation for it, but
it sounds exactly like what you want.

Con

> -Original Message-
> From: Peter Klotz [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 17 June 2003 02:34
> To: [EMAIL PROTECTED]
> Subject: Building lucene index without crawling?
>
>
> Hi,
>
> I have Cocoon 2.0.4.
> Is it possible to generate a Lucene index from XML content
> without using
> a crawler? The question might sound strange but the reason is that I
> could produce all content and all links to index from a
> pipeline. Just
> indexing and searching that would be fine. Furthermore I'm having
> problems building the link-views because I would need to
> transfrom the
> XML produced by my pipelines in order to get href="" link attributes.
> And it would be quite impossible to duplicate each pipeline only to
> generate the same XML but putting a link-transformation on it.
>
> Therefore I would like to not crawl but still index. The question how
> can that be done?
> I have XML like this
>
>
>  text to index
>  text to index on as well 
>
>
> I could apply a XSL on this so that I get links
>
> 
>
> But of course not in the same pipeline that produces HTML
> from this XML.
> Therefore I want to explicitely by myself product the XML content and
> links to index instead of crawling.
>
>
> Thanks for any help, Peter
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: XML file

2003-06-11 Thread Conal Tuohy
I didn't realise you were debugging the result of a form. To select a view, you have 
to pass the view name in the URL, e.g.

http://localhost/login?cocoon-view=debug-view

This is not straightforward with a form. You could add a field called "cocoon-view" to 
your form, and put "debug-view" in there (assuming your view is called "debug-view".

Or perhaps you could just comment out the later steps in the pipeline and serialize 
the results of the login form as XML?
e.g.


  

  


Hope that helps

Con

> -Original Message-
> From: Tim Bachta [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 12 June 2003 2:55 p.m.
> To: [EMAIL PROTECTED]
> Subject: RE: XML file
> 
> 
> 
>label="debug1"/>
>   
> 
>   
>   
> 
> 
> the view element looks just like the site.  I am getting an xml page
> back but it is not the same as what I would see.  What is happening is
> that I have a login form that submits to this page.  In this 
> page I run
> a query to validate login.  In the xml that I get back I am seeing
> invalid login but in the actual html that is produced the login is
> validated.  That is why I am saying the xml does not match up.
> 
> Tim Bachta

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: XML file

2003-06-11 Thread Conal Tuohy
Try posting the pipeline from your sitemap, so we can see what you have done, and get 
an idea of what is going wrong. Otherwise we are just guessing.

Cheers!

Con

> -Original Message-
> From: Tim Bachta [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 12 June 2003 2:44 p.m.
> To: [EMAIL PROTECTED]
> Subject: RE: XML file
> 
> 
> I tried this and it does not work for me.  It shows me the xml but it
> does not run the query correctly so I am not getting the same 
> info that
> I am getting on a regular view.  Is there another way?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: TeX to PDF serializator

2003-06-11 Thread Conal Tuohy
Roger wrote:

> > If your original file is XML and you have an xslt that 
> converts it into TEX
> > text, the output from the xslt is passed as a series of 
> character sax
> > events, so even though it is technically xml/sax events, 
> since there are no
> > elements or attributes, you can easily treat it as a text 
> stream which can
> > be fed by a serializer to an external processor if desired.

Joerg Heinicke wrote:

> NO! Exactly this is not an option. We won't break the sitemap 
> contract 
> for having a specialized serializer. After every step in the 
> sitemap it 
> must be possible to get well-formed XML - and that's not 
> possible if you 
> have text as output of a transformer and as input for a serializer.
> 
> As Bruno and me pointed out the TeXSerializer must be able to read an 
> XML representation of TeX. Only in the prefered solution he 
> has another 
> opinion than me.

AFAIU the contract between pipeline components is that just SAX. These SAX events may 
represent a fragment of a document, with multiple root elements, or whatever. The 
pipeline processor certainly doesn't check that the SAX streams constitute well-formed 
XML documents. 

In any case - isn't TeX a text format? If so then a well-formed XML document like 
blah blah blah ...  could be serialised to TeX by the TextSerializer, 
couldn't it?

Con

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: XML file

2003-06-11 Thread Conal Tuohy
http://wiki.cocoondev.org/Wiki.jsp?page=DebuggingWithViews

> -Original Message-
> From: Tim Bachta [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 12 June 2003 10:10 a.m.
> To: [EMAIL PROTECTED]
> Subject: XML file
> 
> 
> Is there a way/place to view the xml file that is created 
> from my xsp.  
> 
> Thank you
> 
> Tim Bachta

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: conditions in xsl

2003-06-10 Thread Conal Tuohy
Hi Tim

This question is best asked on the XSL List, rather than Cocoon Users, but here's an 
answer anyway:

Test to see if the report has any preceding reports. Perhaps something like:



dlgSwitchSelected


...



> -Original Message-
> From: Tim Bachta [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, 11 June 2003 2:08 p.m.
> To: [EMAIL PROTECTED]
> Subject: conditions in xsl
> 
> 
> Is it possible to do if statements in an xsl page.  What I am 
> trying to
> do is set the first value I get back as selected then set the rest as
> unselected.  Example since it is hard to explain.
> 
> I currently have this:
> 
> 
> 
>  select="report-name"/>
> 
>  > select="normalize-space(report-name)"/>
> 
> 
> 
>  
> 
> this gives me back this:
> 
>  
> 
> 
> 
> Overdue Task 
> Report
> 
> 
> 
> Task Status 
> Report
> 
> 
> 
> Un-Assigned Task
> Report
> 
>  
> 
>  
> 
> What I want is to get this back:
> 
> 
> 
> Overdue Task 
> Report
> 
> 
> 
> Task Status 
> Report
> 
> 
> 
> Un-Assigned Task
> Report
> 
>  
> 
> where the only one that has the selected class is the first one.  Any
> help would be great.  Thank you very much.
> 
>  
> 
> Tim Bachta
> 
>  
> 
>  
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: looking for docs for LuceneIndexTransformer

2003-06-09 Thread Conal Tuohy
Conal Tuohy wrote:

> I've had some problems with generating a Lucene index using 
> an XSP based on the sample, and while I was trying to debug 
> the problems I found the LuceneIndexTransformer which is not 
> documented anywhere I can see. Can anyone explain how it is 
> supposed to work?

... then I saw the code had "//FIXME: Write Documentation" :-)

I've read the source code and started documenting the LuceneIndexTransformer
on the Wiki. I will play with it and get it working and revise the
documentation.

It looks like the transformer will create an index without having to crawl
the site, using the http protocol. I've had some problems with the crawler,
so this would be very handy for me straight away! ;-)

Con
<>-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: CSS in Cocoon

2003-06-09 Thread Conal Tuohy
Tim, presumably dialog.xsl is supposed to insert a  element into the
html, pointing at the stylesheet which is passed as a parameter?

But the dialog.xsl appears to expect a parameter called "html.stylesheet",
whereas the parameter you are actually passing it (from the sitemap) is
called "css-stylesheet".

Cheers!

Con

> -Original Message-
> From: Tim Bachta [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 10 June 2003 08:19
> To: [EMAIL PROTECTED]
> Subject: CSS in Cocoon
> 
> 
> I am trying to use a stylesheet in a xsl page and am getting a null
> pointer exception coming from my xsl page.  My syntax is 
> below, I am new
> to Cocoon so please excuse my mistakes.  I appreciate the help.
> 
> dialog.xsl
> 
> 
> text/css
> 
> sitemap
> 
> 
> 
> 
> 
> 
> 
> 
>   
> 
> 
> 
> 
> Thank you 
> 
> Tim B
> 
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
<>-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: Lucene indexing / crawling problem

2003-06-09 Thread Conal Tuohy
> Have you enabled the "link view" for all the pages you want to crawl?
>
> HTH
>
> Michael

Yes I have ... and a content view ... but even pages from the same pipeline
may be crawled or NOT crawled.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Lucene indexing / crawling problem

2003-06-08 Thread Conal Tuohy
I'm creating a Lucene index using an XSP based on the sample, but I have a strange 
problem.

Some of the pages are crawled, but some are not crawled, and I can't see why. 

I have DEBUG logging for the core.search components, so I can see the crawler crawling 
the site. I can see it read the links for each page, and I can see that it doesn't 
exclude any of the links. Yet it doesn't actually follow those links - the crawl 
simply comes to an end at some point, with some of the links uncrawled.

It seems to me that for every log entry from SimpleCocoonCrawlerImpl that says "Add 
URL: http://blah..."; I should also have an entry from SimpleLuceneXMLIndexerImpl that 
says "Indexing http://blah...";

The home page is crawled, and all of the pages off that page, and SOME of the pages 
off those pages, and SOME of the pages off THOSE pages. I can't see why some pages are 
crawled and others not. Perhaps the crawler simply stops at some point, and it hasn't 
finished its list of URLs. But why would it stop crawling without logging any error? 
BTW, the last entry in the log is always the SimpleLuceneXMLIndexerImpl reporting that 
it has indexed a page, e.g: 

DEBUG   (2003-06-09) 17:32.05:388   [core.search.lucene] (/search/reindex.xml) 
HttpProcessor[80][4]/SimpleLuceneXMLIndexerImpl: Indexing 
http://localhost:80/etexts/JCB-016/full.html?cocoon-view=content (text/xml)

Does anyone have any ideas where I could start looking?

I'm using the version RELEASE_2_1_M_2

Thanks

Con

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



looking for docs for LuceneIndexTransformer

2003-06-08 Thread Conal Tuohy
I've had some problems with generating a Lucene index using an XSP based on the 
sample, and while I was trying to debug the problems I found the 
LuceneIndexTransformer which is not documented anywhere I can see. Can anyone explain 
how it is supposed to work?

Thanks

Con

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: clear cache problems

2003-06-05 Thread Conal Tuohy
Bertrand Delacretaz wrote:



> The best thing if you're not sure about the browser's cache
> is to test
> without a browser - use wget or telnet to make requests and check the
> results.

I use NetTool for this. It's an HTTP client with a GUI, but it's not a
browser :-) You have control over HTTP headers, too. Originally developed
for debugging SOAP, but it's great for debugging any HTTP server.
http://nettool.sourceforge.net/

Cheers

Con


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: [HELP]The processing instruction target matching "[xX][mM][lL]" is not allowed.

2003-06-03 Thread Conal Tuohy
Hi Paul

I bet you have some white space in the file before the xml declaration. The
xml declaration must be the FIRST thing - i.e. the
< must be the FIRST character in the file.

Cheers

Con

-Original Message-
From: Paul Tinzoh [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 3 June 2003 09:35
To: [EMAIL PROTECTED]
Subject: [HELP]The processing instruction target matching "[xX][mM][lL]" is
not allowed.


hello,
I Paul Fonkeng.

I'm using cocoon version 2 on a windows 2000 SP3 platform.
I just thought of sending the whoole xsp-file with this mail, perhaps you
find the cause  of my problem.

Thanx for your help.
Paul

Description:org.apache.cocoon.ProcessingException: The processing
instruction target matching "[xX][mM][lL]" is not allowed.:
org.xml.sax.SAXParseException: The processing instruction target matching
"[xX][mM][lL]" is not allowed.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: jfor encoding problem

2003-06-03 Thread Conal Tuohy
Charlene, it looks to me like your problem is not with jfor, but merely with
parsing the XML source file. 

The parser thinks the French text is encoded as UTF-8, but my guess is that
it actually uses ISO-8859-1. You should either open the XML file again and
save it in UTF-8 format, or add an encoding declaration to the start of the
file. e.g.  

Cheers

Con

> -Original Message-
> From: Yan, Charlene [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 3 June 2003 07:52
> To: [EMAIL PROTECTED]
> Subject: jfor encoding problem
> 
> 
> Hi everyone,
> 
> I'm trying to display accented characters correctly using 
> jfor.  However, when I try to run 
> http://localhost:8080/cocoon/samples/jfor/minimal.rtf, it 
> gives the following exception.  I have put some French words 
> such as "Gére" in the xml file.  Looks like it is a parser 
> issue.  Anyone has any experience of this?  Thanks so much 
> for your help!!
<>-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

RE: Again: "forgotten" namespaces problem

2003-06-03 Thread Conal Tuohy
Andrew C. Oliver wrote:

> Why not just add a parameter which removes them or not, big
> deal.  No reason
> for Yet Another Class.

Why provide an _option_ for people to output invalid HTML?

Seriously, isn't it _always_ a bug to output namespaces in the HTML? What
are the use cases for HTML + namespaces?? Is anyone actually using this
"feature" to output HTML with namespace attributes for some obscure purpose?

I think the patched HTMLSerializer should simply be committed as a bug fix,
replacing the existing Serializer which outputs namespaces.

If, for some reason, it ought to be optional, then lets at least have
"output-namespaces"="no" as the default.

Cheers

Con


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Again: "forgotten" namespaces problem

2003-06-02 Thread Conal Tuohy
I would agree with you Alexander - it's a bug for the HTML Serializer to
output other namespaces ... IMHO the HTML Serializer should log an error if
you give it any namespace except the XHTML namespace and the null namespace.
Post it in bugzilla and someone will fix it (maybe you? :-)

Con


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: TEI and cocoon

2003-04-05 Thread Conal Tuohy
Warner I have used these stylesheets in Cocoon in part of this website:
http://www.nzetc.org/

AFAIK the xsl:output tag is not a problem - in Cocoon the serialization is
controlled by the sitemap (the map:serialize element), so the xsl:output
directive in the stylesheets is ignored.

I've used them without modification

However, I have used other stylesheets to post-process the resulting HTML
since they do rather mix concerns; they not only convert TEI to html, they
also add navigation links, banners, etc. In a Cocoon environment it's
feasible to deal with these concerns as separate steps in a pipeline, so I
personally haven't used any of these "non-essential" features of the
stylesheets.

Con

> -Original Message-
> From: Warner Onstine [mailto:[EMAIL PROTECTED]
> Sent: Saturday, 5 April 2003 08:54
> To: [EMAIL PROTECTED]
> Subject: TEI and cocoon
>
>
> I am having some issues using the TEI (http://www.tei-c.org/Lite/)
> stylesheets (http://www.tei-c.org/Stylesheets/teixsl.html) to
> convert the
> XML to HTML. After much searching I found a document on the
> cocoon wiki
> discussing the xsl:output tag and how it cannot be used in cocoon -
> http://wiki.cocoondev.org/Wiki.jsp?page=XSLT.
>
> This tag is extensively used in the TEI stylesheets, so I
> wanted to find out
> if others had used these stylesheets and modified them or if
> they had their
> own which work with the TEI Lite DTD.
>
> Thanks in advance,
> Warner
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Xpath translate...

2003-03-30 Thread Conal Tuohy
Hi João,

one pattern I've used in this situation is to assemble the query URL in
XSLT, rather than in the sitemap.

First, you use the RequestGenerator to produce an XML document describing
the query.
Second, your XSLT transforms this document into an Xinclude statement
containing the new query URL.
Third, you use the XInclude transformer to execute this query.
Then format the results as necessary and serialize.

Cheers!!

Con


> -Original Message-
> From: João César [mailto:[EMAIL PROTECTED]
> Sent: Monday, 31 March 2003 03:24
> To: [EMAIL PROTECTED]
> Subject: Xpath translate...
>
>
> Hi, after trying this {request:translate(query, '+', ' ')}, I
> don't get any
> result from my search... I've tried to see if translate was
> working but with
> no sucess..
>
> What I'm trying to do is, parsing this querystring:
>
> search?query=transgenic+rice
>
> to:
>
>  src="http://www.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db
> =pubmed&te
> rm={request:translate(query, '+', ' ')}&retmax=200"/>
>
> to match:
>
> http://www.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubm
ed&term=transg
enic%20rice&retmax=200

TIA

Joao Cesar
[EMAIL PROTECTED]





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Problems basic-link in xsl-fo

2003-03-19 Thread Conal Tuohy
Jessica Niewint wrote:

> I got a problem to insert a external link to my xsl file with
> .



TEST

You are missing the "http://"; from the start of the URL. Otherwise I believe
FOP will assume a "file:/" protocol?

Cheers!

Con


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: svg2jpeg output not equal on different machines

2003-03-18 Thread Conal Tuohy
Christian Hoofe wrote:

> My problem is that the generated jpeg are not same on
> different machines. The
> generated font under Linux is greater than 14 points. I tried
> this with Cocoon
> 2.0.4 under j2sdk1.3.1 and j2sdk1.4.1.
>
> Win98, Sun j2sdk1.3.1 and j2sdk1.4.1
> Suse 7.2, Blackdown j2sdk1.3.1 and j2sdk1.4.1

Under JDK 1.4 there is a "headless" mode in which the dependencies on the
operating system are minimised. For instance, in this mode you can run Batik
without an X server at all. Have you tried this mode?

Cheers

Con


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Creating an aggregation from a list of files

2003-03-17 Thread Conal Tuohy
Hi David

Note that you can use the Zip Archive Serializer to generate the entire IMS
package - you don't need to generate static files and zip them in some later
stage; it can all be done in Cocoon.

http://xml.apache.org/cocoon/userdocs/serializers/ziparchive-serializer.html

You can use the "jar:" protocol to read the contents of such a file, too, if
necessary.

Cheers

Con

> From the little I know of Java, I think IMSCP is quite like a
> .jar file - a
> bunch of files with a manifest saying what's what, all rolled
> up in a zip.
>
> Anyway, what I want to do is use Cocoon during development for live
> transformations of our XML source files to HTML, prior to
> converting them
> all to static HTML ready to be zipped up.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Creating an aggregation from a list of files

2003-03-17 Thread Conal Tuohy
> 2) Transform your manifest, create XInclude statements and 
> run through  
> the XInclude transformer.
> 3) Transform your manifest, create CInclude statements and 
> run through  
> the CInclude transformer.
> 
> CInclude allows you to call Cocoon pipelines so it is very 
> powerful.  I  
> would recommend it.
> http://xml.apache.org/cocoon/userdocs/transformers/cinclude- 
> transformer.html

NB XInclude also allows you to call "cocoon://" protocol.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: is this kosher?

2003-03-13 Thread Conal Tuohy
-Original Message-
From: David Kavanagh [mailto:[EMAIL PROTECTED]

>Well, maybe..
>Just as a matter of protocol, isn't adding a new
>component something a cocoon user would do? I'm not
>really messing with cocoon internals. I'm just
>implementing published interfaces.

except didn't you ask about passing an extra parameter to a method in one of
these interfaces? I think your problem/question is architectural, and that's
why I think cocoon-dev would be better.

Con



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: is this kosher?

2003-03-13 Thread Conal Tuohy
You should really be asking this kind of question on the cocoon-dev list,
I'd say.

Cheers!

Con

> -Original Message-
> From: David Kavanagh [mailto:[EMAIL PROTECTED]
>
>
> I've written this HTTPTransformer which takes some simple XML



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Generator for OpenOffice

2003-03-12 Thread Conal Tuohy
> Well, 
> 
> That's the problem. 
> 
> The SXW file does not contain any DTD itself.  They are all 
> on my hard drive, 
> from the installation of OpenOffice, but not in the files themselves.

So your pipeline should read the OpenOffice files from somewhere else.


 


> When I tried to add the DTD to my webdirectories and created 
> pipelines for 
> them, I still got the error that the Jar: protocol could not 
> find anything 
> within the zip.  Appearantly, that protocol does not match 
> itself again 
> against the pipelines ...

I think this is the same as I suggested above ... what happens?

Can you please post your pipelines and the error you receive?

Thanks

Con

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Generator for OpenOffice

2003-03-12 Thread Conal Tuohy
Hi Yves.

You will need other pipelines to extract non-xml resources from the sxw file
as well. (Presumably the sxw file contains the DTD?)

e.g.


http://web/implements/{1}!/{2}.dtd";
mime-type="text/plain"/>



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Generator for OpenOffice

2003-03-11 Thread Conal Tuohy
Good point, Upayavira!

I've taken your suggestion and implemented an example:
http://wiki.cocoondev.org/Wiki.jsp?page=JarProtocolExample

Cheers!

Con

> > Basically, it's the ZipGenerator I need with some extras, but before
> > writing the code myself, I was wondering whether someone had done it
> > before me.
> 
> Asking a similar question, I pointed someone at an example in 
> the Langham/Ziegler 
> book (a zip source). Someone else then made a point that the 
> jar: protocol, built into 
> the JDK, can read Zip files. So check out the accessing files 
> with jar: in the JDK and 
> let us know where you get to!


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: XSL parameters

2003-03-08 Thread Conal Tuohy
> -Original Message-
> From: Matthias Brunner [mailto:[EMAIL PROTECTED]
> Sent: Sunday, 9 March 2003 02:23

> how do I set XSL parameters in the sitemap?
> This does not seem to be possible:
>
> 
>   
> 

That should work. You will need to have the parameter declared in your xslt
as well, as a child of the style-sheet element:



What is the result? Do you get an error message? Or does $noImgTags =
false()?

BTW, though this isn't your problem, I would guess the parameter is passed
to your xslt as a string, which means that ANY non-null value would evaluate
as true() in your xslt:

http://www.w3.org/TR/xpath#function-boolean
In other words, in xpath, even 'false()'=true()

:-)

Cheers

Con


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



how to call a view?

2003-03-03 Thread Conal Tuohy
I'm planning to implement a Lucene-based search, so I've been reading up on
Views.

It seems to me that a view can be selected just by adding
"?cocoon-view=some-view" to the URI. I've tried this and it's all OK.

But the documentation hints that there's another way, which I don't quite
understand (see bottom of
http://xml.apache.org/cocoon/userdocs/concepts/views.html):

>Suggestions for further accessing views are:
>
>React on a "variant" HTTP header (nothing cocoon specific
>since the concept could be impelemented later on by other
>publishing frameworks).
>
>React on URI extension: for example http://host/path/file.view,
>that is something that can be done by configuring the sitemaps
>manually. (where http://host/path/index is the default
>resource, and index.content is the XML view of the content).

"configuring the sitemaps manually"? Can anyone explain how these 2
suggestions should be implemented? Would I need to have something like this?





Cheers!!!

Con


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Generators and external applications...

2003-03-02 Thread Conal Tuohy
Alan Anderson wrote:

> My question is how can I run an external program/script and
> have the final output be what is sent to
> the Transformer for display?  I'm guessing I'm missing

One option is to run your external executable as a CGI app. This may be
easier than porting it to a Generator. Then you can use the FileGenerator to
read from the CGI application, of course.

Con


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Reporting Engine

2003-02-10 Thread Conal Tuohy
Looks interesting... but where is the "live demo"?

> -Original Message-
> From: Sean McKaharay [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 11 February 2003 07:53
> To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: RE: Reporting Engine
> 
> 
> xReporter...I am using xReporter right now. It takes a 
> little time to
> understand all the stylesheets but I think it works great for 
> reporting.
> Check it out: http://xreporter.cocoondev.org/index.html

<>-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>


RE: Content editor [was: Re: A note about the "best(?) (cocoon-) development environment" ...]

2003-02-10 Thread Conal Tuohy
Markus Vaterlaus wrote:

> I'm just facing the same problem as you do. About 30 persons are
> contributing to our documentation (a single document runs from 10 to
> 100 pages with about as much graphics in it). Actually all
> this is done
> in MS Word. I have the Vision that in the near future all
> this content
> will no longer be stored in a proprietary format. Instead of that it
> will be stored in XML and cocoon will be a good helper to manage and
> publish this content. However, for me the biggest problem
> actually is,
> what kind of alternatives for an editor are existing? All users are
> mentally bound to Word. They like it's functionality, it's ability to
> write in WYSIWYG-mode et cetera. Actually I'm thinking about using

If you can get your users to save their docs (from Word) in HTML format,
then Cocoon can read it with the HTMLGenerator. Perhaps a little VB macro
might help to automate the File/SaveAs/HTML operation, to ensure that Word's
proprietary format isn't used by mistake.

Cheers

Con



-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: Cocoon the solution?

2003-01-03 Thread Conal Tuohy
Hi Ines



> In fact what they love to do is saving a word doc into html
> and loading
> it onto the server.
> But all pages are supposed to be in valid XHTML, controled by CSS.

Yes - you can store the pages on the server as Word-HTML, and with Cocoon
use the HTMLGenerator to convert them to XHTML, use some stylesheets to
remove any Word rubbish, include transformer or aggregate transformer to
aggregate content with navigation elements, etc, and publish the results as
XHTML.

Con


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: [demostration] Re: xsl through pipelin [anyone can help?]

2002-12-28 Thread Conal Tuohy
Instead of creating elements with ,
you can also use a namespace alias. The namespace-alias xsl element is used
mostly for this purpose (xsl generating xsl).

Cheers

Con

See http://www.google.com/search?q=namespace%2Dalias


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: [Question] Re: cocoon-session management.

2002-12-21 Thread Conal Tuohy
See the WebServiceProxyGenerator:
http://outerthought.net/wiki/Wiki.jsp?page=WebServiceProxyGenerator

> -Original Message-
> From: Emmanuil Batsis (Manos) [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, 21 December 2002 00:24
> To: [EMAIL PROTECTED]
> Subject: Re: [Question] Re: cocoon-session management.
>
>
>
>
> SAXESS - Hussayn Dabbous wrote:
> > Maybe HTTPClient supports proxy functionalities?
> > That may help getting things done...
>
> I agree that the ideal situation is the ability to forward cookies
> between the remote application and the real client (i.e. a browser
> requesting from Cocoon) and vice versa. Additionally, those cookies
> should be readable *and* modifyable by logic inside Cocoon.
>
>
> > If you are interested, we can get into a discussion.
> > Maybe we should wait until our preliminary results are
> > available?
>
>
> Unfortunatelly I just started with HttpClient and haven't found any
> related functionality in the documentation. I posted a question on
> commons-users (see [1]).
>
> Let's wait a bit and see what happens :-)
>
>
> [1]
> http://marc.theaimsgroup.com/?l=jakarta-commons-user&m=104038254206245&w=2
>
>
> Manos
>


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: RE: xsl:copy-of Problem

2002-12-15 Thread Conal Tuohy
How about something like this, then?









Or you might want to look at:
http://www.dpawson.co.uk/xsl/sect2/N6461.html#d6361e489

Really you should ask this kind of question on the mulberrytech xsl list;
you'll get more response! :-)

Con


> -Original Message-
> From: Marcel Jurk [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, 15 December 2002 18:52
> To: [EMAIL PROTECTED]
> Subject: RE: RE: xsl:copy-of Problem
>
>
> Hi Con,
>
> thanks for the hint with the RTF. But my problem is,
> that I want first sort the elements and afterwards I
> want output only the first five elements.
> With your example
> 
> is no sorting possible.
>
> Regards,
> Marcel
>
> Marcel your variable $m holds a Result Tree
> > Fragment, not a NodeSet. A RTF
> > is not as useful as a nodeset. In particular you
> > can't use "for-each" with
> > it.
> >
> > See
> >
> http://www.w3.org/TR/xslt#section-Result-Tree-Fragments
> >
> >
> > Try assigning the variable like this:
> > 
> >
> > Cheers!
> >
> > Con
> >
> > > -Original Message-
> > > From: Marcel Jurk [mailto:[EMAIL PROTECTED]]
> > > Sent: Saturday, 14 December 2002 07:16
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: RE: xsl:copy-of Problem
> > >
> > >
> > > Sorry I forgott the following lines in the
> > stylesheet.
> > >
> > > 
> > >   
> > > 
> > >   
> > >   
> > >  
> > >   
> > > 
> > >
> > > 
> > >   
> > > 
> > >   
> > > 
> > >
> > > In the  loop must be the output two
> > > times message, but I got no output and the loop is
> > > pass only once.
> > > I think that not the tree is copied with the
> > >  in the template sortmsg, but only
> > the
> > > values.
> > >
> > > Before the currently c2.1 (cvs 12.12) version, I
> > used
> > > c2.1 (cvs 30.10) and with it works fine, but now
> > not.
> > >
> > > Marcel
> >
> >
> >
> -
> > Please check that your question  has not already
> > been answered in the
> > FAQ before posting.
> > 
> >
> > To unsubscribe, e-mail:
> > <[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <[EMAIL PROTECTED]>
> >
>
> __
>
> Gesendet von Yahoo! Mail - http://mail.yahoo.de
> Weihnachts-Einkäufe ohne Stress! http://shopping.yahoo.de
>
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
>
> 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. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: RE: xsl:copy-of Problem

2002-12-14 Thread Conal Tuohy
Marcel your variable $m holds a Result Tree Fragment, not a NodeSet. A RTF
is not as useful as a nodeset. In particular you can't use "for-each" with
it.

See http://www.w3.org/TR/xslt#section-Result-Tree-Fragments


Try assigning the variable like this:


Cheers!

Con

> -Original Message-
> From: Marcel Jurk [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, 14 December 2002 07:16
> To: [EMAIL PROTECTED]
> Subject: RE: RE: xsl:copy-of Problem
>
>
> Sorry I forgott the following lines in the stylesheet.
>
> 
>   
> 
>   
>   
>  
>   
> 
>
> 
>   
> 
>   
> 
>
> In the  loop must be the output two
> times message, but I got no output and the loop is
> pass only once.
> I think that not the tree is copied with the
>  in the template sortmsg, but only the
> values.
>
> Before the currently c2.1 (cvs 12.12) version, I used
> c2.1 (cvs 30.10) and with it works fine, but now not.
>
> Marcel


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: dynamic atylesheet assignment

2002-12-03 Thread Conal Tuohy
Here's one way:

See the "Meta-Stylesheets" page on the Wiki.
http://outerthought.net/wiki/Wiki.jsp?page=MetaStylesheets

I assume that the article contains a PI or similar, pointing to the
stylesheet the author wants to use? You can transform the document using an
XSLT that is generated by another pipeline. This XSLT is generated by
transforming the content document (by extracting and resolving the URL
inside the PI in the document) into the stylesheet to which it refers.

match pattern="dynamic-xslt/*.xsl"
generate src="{1}.html"
transform src="convert-pi-to-xinclude.xsl"
transform type="xinclude"
serialize type="xml"

match pattern="article/*.html"
generate src="{1}.html"
transform src="cocoon:/dynamic-xslt/{1}.xsl"
serialize type="xml"

Cheers!

Con


> -Original Message-
> From: Robert Sösemann [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 4 December 2002 05:31
> To: [EMAIL PROTECTED]
> Subject: dynamic atylesheet assignment
>
>
> I am working on a news site, where every author can assign own xsl
> stylesheet to their article. I want to bring cocoon
> dynamically insert an
> article's path into the transformer src attribute.
>
> I thought of generating an parameter inside the xsp for the following
> components an later catch it by the transformer. (How) can I do this?
>
> 
> ^
>
> 
>  src="logicsheets/get-articledata.xsp"
> type="xsp">
>  value="{../2}"/>
> 
> 
>
>  src="transform/style-frame.xsl" type="xslt"/>
>
> 
>  type="xslt"/>
>
>  type="xslt"/>
> 
> 


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: Including static images into SVG files

2002-12-02 Thread Conal Tuohy
Can you capture the name and port of the localhost from the "host" request
parameter, and pass it to the stylesheet?

-Original Message-
From: Derek Hohls [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 3 December 2002 00:21
To: [EMAIL PROTECTED]
Subject: RE: Including static images into SVG files


Thanks for this suggestion.

I think its a "toss up" as to where this info comes from or is stored.

I am not sure I prefer using the sitemap to do this as it:
(a) makes the sitemap more complex and
(b) means I have to maintain two different versions
   (development / production)

whereas a single "included" stylesheet is a relatively simple
approach.

Of course, everyone has their own taste and preferences!

>>> [EMAIL PROTECTED] 02/12/2002 01:15:31 >>>
My approach is to pass the path from the sitemap to the XSL stylesheet that
produces
the SVG as a parameter. The advantage of that is to keep all references to
filesystems
in the sitemap, rather than in stylesheets. Also, make full use of localhost
where
appropriate.

Hope this helps, Upayavira


> >Unfortunately this requires an absolute URL
> >address - if I drop the http://myserver/
> >then it simply does not work - is there a
> >Cocoon "substitute" (protocol?) I can use
> >to get the image processed correctly, *regardless*
> >of what machine the app. is loaded on??


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: Including static images into SVG files

2002-11-30 Thread Conal Tuohy
-Original Message-
From: Derek Hohls [mailto:[EMAIL PROTECTED]]

>I need to include and display a static image 
>(its a logo) on all the SVG images I produce;
>the only syntax I have managed to get to work is:

http://myserver/path/logo.jpg />  
(plus height, width)

>Unfortunately this requires an absolute URL 
>address - if I drop the http://myserver/
>then it simply does not work - is there a 
>Cocoon "substitute" (protocol?) I can use
>to get the image processed correctly, *regardless* 
>of what machine the app. is loaded on??

Try "localhost" instead of "myserver". 

You can also use a file url (so long as the path is absolute). 

Cheers

Con

-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: pipeline problem

2002-10-24 Thread Conal Tuohy
Yes Oskar this is possible. In Cocoon 2.02 it was possible to do exactly as
you describe, I believe, but something has broken since then; now you must
refer to the xsl using the http protocol, e.g.





http://localhost/schematron2compiledSchematron"/>



See http://outerthought.net/wiki/Wiki.jsp?page=MetaStylesheets for more
information.

¡Buena suerte!

Con


-Original Message-
From: Oskar Casquero [mailto:jtacaoio@;bi.ehu.es]
Sent: Friday, 25 October 2002 08:28
To: [EMAIL PROTECTED]
Subject: pipeline problem


Hello,

Is it possible to call a pipeline, that returns SAX events representing an
stylesheet, from the "src" attribute of a  element? I'm
trying to do it in the following pipeline but it doesn't work.













Oskar


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: svg rasterize problems

2002-10-15 Thread Conal Tuohy

Peter - the problem may be that Batik has failed to resolve the relative url
"svg.css". I've also had problems with Batik's resolver when using svg
 elements that refer to external graphic files, and I've found it
necessary to provide an absolute URL; this may solve your problem too,
though it's a bit ugly.

http://blah.blah.blah/blah/svg.css"; type="text/css"?>

Cheers!

Con

> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 16 October 2002 07:55
> To: [EMAIL PROTECTED]
> Subject: svg rasterize problems
>
>
> hello,
>
> i'm encountering a problem while using the batik-transcoder
> in cocoon 2. if the
> svg-file i want to rasterize has all its css-definitions
> inside the document
> (inside the 

RE: What DTD's do you use for a plain site?

2002-09-29 Thread Conal Tuohy

I've used simplified docbook - it's easy - much simpler than the full
docbook which is huge. But is XHTML really so bad?

> -Original Message-
> From: Joerg Heinicke [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 30 September 2002 02:12
> To: [EMAIL PROTECTED]
> Subject: Re: What DTD's do you use for a plain site?
>
>
> Hello Justin,
>
> we don't use it, but what about Simplified Docbook:
> http://www.docbook.org/xml/simple/index.html.
>
> Regards,
>
> Joerg
>
> Justin Fagnani-Bell wrote:
> > What Doctypes are people using for general information to
> be displayed
> > at HTML?
> >
> > I'm doing a very simple site which will be mostly static
> HTML. The data
> > is basically intended for presentation only, so there isn't
> much of a
> > datatype I need to model, the only reason I'm going for
> cocoon is to
> > swap out look and feel easily.
> >
> > So far my experience with Cocoon has been with data I could
> come up with
> > a logical XML dialect for. But for presentation orientated
> data I find
> > myself just using html, which I know I shouldn't.
> >
> > Any suggestions? I'm about to check out DocBook, but is that maybe
> > overkill?


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: Authentication via an Html Scrape Fest

2002-09-17 Thread Conal Tuohy

> -Original Message-
> From: Jonathan Lancelle [mailto:[EMAIL PROTECTED]]

> I am now attempting to scrape pages behind a user/pw entry. I get a
> pop-up request window when I grab the URI of interest via the
> browser.
> How do I handle the user/id entry within Cocoon? Can I pass them as
> parameters? Can Cocoon hold the session from the server as I
> use it to
> gather a few more pages once past the user/pwd?

Have a look at Cocoon's WebServiceProxyGenerator - I think this may do the
trick.


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: Cocoon and PDF/HTML-Layout Tools Integration (for expl. QuarkXPress,... etc.)

2002-09-12 Thread Conal Tuohy

> -Original Message-
> From: massimo [mailto:[EMAIL PROTECTED]]
> Subject: Cocoon and PDF/HTML-Layout Tools Integration (for expl.
> QuarkXPress,... etc.)

> Does someone have made already some experience whit the
> integration of
> PDF/HTML-Layout tools?
> or are there other possible ways to go?

Hi Massimo.

I've not used any visual XSLT design tools, though I've heard of them.

But I have used an approach in Cocoon where your layout is done in html
(using any html editor - we used DreamWeaver). In the template HTML, you add
a few extra attributes to refer to the data (the content of the page), e.g.
. You can also use
attribute-value-templates in your html, and variable-substitution in the
text of the html, like this:



{topic-name}{topic-value}



You can use the HTMLGenerator to convert the HTML layout to XHTML, transform
it into valid XSLT, and you have a XSLT stylesheet without too much XSLT,
written in a generic HTML editor, with a few extra "custom" attributes etc
(not usually a problem).

Cheers!

Con


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: aggregator element question

2002-09-10 Thread Conal Tuohy

oh no! an error in my example:

> 
> 
> 
>   
>   
>   
> 

it should be xsl:param not xsl:variable, e.g.

http://www.w3.org/1999/XSL/Transform"; 
  version="1.0">
  











-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: aggregator element question

2002-09-10 Thread Conal Tuohy

> Question: when using the aggregator, is it possible to
> specify an attribute as
> well as the name of the parent element, eg if I have:
>
>
> 
>
>  
>   
>   
>  
>
>  
> 
>
> it will give me something like
>
> 
>  
>  
> 
>
> whereas I would like
>
> 
>  
>  
> 
>
>
> Is this possible? I'm using cocoon 2.0.2

It seems not. But you could add the attribute AFTER aggregation, using an
XSL transform.

You sitemap would look like this:

 

  
   
   
  

  
  
   
  

  
 

... and in the stylesheet (set-root-page-type.xsl) you would have:

...








XSLT is your friend! ;-)

Con


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: Using Pipeline with third party converters

2002-09-02 Thread Conal Tuohy

If you have an existing application which you can't easily port to Cocoon
you can package it as a CGI application. Then you can invoke it from Cocoon,
and also use Cocoon to pass it the data it needs.

I've used this technique to embed a Microsoft eBook compiler into a Cocoon
app. The user requests the cgi output (a Microsoft Reader eBook) from an
ordinary reader, which encapsulates the cgi, and passes it parameters. The
cgi program (makelit.exe) also reads data from Cocoon (the url which is
passed to the cgi is the url of a Cocoon pipeline which provides data to the
eBook compiler). In my case I had the C++ source for the eBook compiler, so
I could modify it to be a cgi app, but otherwise you can always wrap your
application in some kind of shell script.



http://localhost/cgi-bin/makelit.exe?http://localhost/etexts/{1}.opf"/>


browsercocoon cgi-app
   |  |  |
   | request  |   read   |
   | ---> | ---> |
   |  |  |
   |  | get data |
   |  | <--- |
   |  |  |
   |  | <--- |


-Original Message-
From: PETER BRIAN BRADBURN [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 3 September 2002 00:29
To: [EMAIL PROTECTED]
Subject: Using Pipeline with third party converters



Hi,
As part of a project I am conducting I am looking into the possibility of
using the Cocoon Pipeline to manage the use of a third party format
converter such as a2ps (which converts a variety of file formats into PS for
printing.

* How could I go about this?
* Is it possible?

I would prefer not to use a custom reader, unless this is the only way of
going about it.

Your feedback would be greatly welcome
Thanks
Pete Bradburn


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: How force HTMLGenerator to leave elements?

2002-08-25 Thread Conal Tuohy

I've done something similar ... but I haven't hacked the HTMLGenerator ... I
simply added custom ATTRIBUTES to the HTML elements, and transformed those. 

> -Original Message-
> From: Marcin Stefaniuk [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 26 August 2002 02:44
> To: Cocoon Users (E-mail)
> Subject: How force HTMLGenerator to leave  elements?
> 
> 
> Hello!
> In my new company graphic design of a site is authored in
> Adobe goLive. I want to simply combine work of designers and 
> mine (in databases and Cocoon2.1). I decided to put some 
>  elements in html source and join it in pipeline, 
> but jTidy strips all non html tags including goLive special 
> and xi:include (namespace is defined).
> 
> I've tried to fix it rebuilding HTMLGenerator to use jTidy 
> with config file on disk (with defined tags) and with setting 
> setXmlInput property to true. No effect.
> 
> Thanks for any help.
> Marcin Stefaniuk
> 
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
> 
> 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. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>


RE: ?something redirection

2002-08-20 Thread Conal Tuohy

I think you want a RequestParameterMatcher or
WildCardRequestParameterMatcher.

> -Original Message-
> From: Jesper Rasmussen [mailto:[EMAIL PROTECTED]]



> I'm porting some old systems to cocoon.
> Before our url's wast foo.com/?something
>
> In our new cocoon layout the url might be foo.com/somethingelse.html
>
> What would be the best way to have the only url's still work.
>
> One possibility i see is to use a match and redirect, but how
> do i macth
> on /?something


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




cocoon-users@xml.apache.org

2002-08-11 Thread Conal Tuohy

Justin wrote:

> 2) Create a jTidy like program that will turn HTML into
> XHTML, but work
> for fragments (jTidy seems to only output complete HTML documents)

I think this is a good approach. I'm trying to deal with the same thing when
reading emails: an email may contain a section formatted in HTML, so it's
necessary to either treat it as CDATA or to parse it specially. You're
right - if you treat it as CDATA then you can't do anything useful with it
in XSLT. But using JTiday is not hard. See the classes HTMLGenerator,
AbstractStreamSource and XMLUtils.

But where to insert JTidy into the pipeline?

At the generator stage? How does the text area input data enter the Cocoon
pipeline? RequestGenerator?

Or perhaps you should write a transformer that can transform a CDATA node
containing HTML into an XHTML SAX stream?

Con


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: executing XInclude transformer twice

2002-08-08 Thread Conal Tuohy

Ross, you could try using XInclude recursively by Xincluding a cocoon
pipeline, rather than directly XIncluding the resource you want. That way
you can get the recursion to happen in the sitemap, i.e. the pipeline makes
recursive Xinclude calls to itself. The recursion will terminate when
there's no more  statements in the input. In this way, you can
XInclude to whatever depth you require.

Hope that helps.

Con



-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: webmail

2002-08-01 Thread Conal Tuohy

Aaargh ... not enough coffee this morning. My previous message was supposed
to go to Justin directly. My humble apologies for posting off-topic
(would've been OK on the Cocoon-dev list) and in HTML.

Con


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




webmail

2002-08-01 Thread Conal Tuohy



Hi Justin
Just a note to keep you up to date on where I'm at, and maybe provoke some 
response:
I've been reading more and more, and thinking and drawing architectural 
diagrams ... it's more complicated than I first thought. I think this is an 
issue for your project too.
Currently I'm still thinking that the JavaMail access should be a Source, not 
implementing XMLizable, i.e. it would provide messages in the "message/rfc822" 
format. So that hasn't changed.
The parsing to XML should probably be done by either an XMLizer, or a 
Generator. Or possibly, another Source, layered on top of the MIME source. This 
is the issue that's exercising me at the moment. The fact is that a MIME message 
is not a simple data type: it is in fact a kind of file-system, with other files 
and directories in it (the MIME-parts).
The big thing which I'd been neglecting was how to provide access to these 
MIME-parts (i.e. a PART of a message) to the relevant components of Cocoon. For 
instance, a MIME message may contain a part which is in "text/html" format, and 
this html may refer (with an IMG tag) to an image which is in another part of 
the MIME message, with an "image/gif" mime-type for instance. To render this doc 
to a web-browser as html, or as PDF or whatever, it will be necessary for the 
Cocoon pipeline to extract this gif image from within the message, and feed it 
to the browser or Batik, as required. Concretely, the web app will have to 
generate a web page containing an IMG with href = "some" url which Cocoon can then 
use to find the gif image from inside that particular message.
Much the same applies to MIME-parts which contain message attachments of some 
arbitrary mime-type ("application/octet-stream" is a good one) which Cocoon 
can't do anything useful with, but which a browser might understand, or at least 
download as files.
I have to do this because my list archive needs to handle attachments.
It seems to me I've got 2 main options:
1) XMLize everything
Currently I'm tending towards using an XMLizer which will convert a 
"message/rfc822" byte-stream into SAX events (possibly using the XMSG schema 
rather than the XMTP schema I've used before: http://www.w3.org/TR/xmsg/ - I'm 
not sure about this yet)
This XMLizer would handle all the MIME-parts (even non-xml parts would be 
returned as "lumps" of data) and these could therefore be handled using the 
various XML-processing mechanisms: Xinclude, XSLT, etc, etc, even without 
necessarily being able to process their actual contents. So a GIF image 
MIME-part would appear as a  element in the SAX stream: 
http://www.w3.org/TR/xmsg/#N632 containing some text-encoded GIF data (i.e. 
Base64 encoded). For a binary mime-part, Cocoon processing would be limited to 
kind of "routing" it through to the browser, without transforming it on the way. 
To use this technique, we'd also need a MIMEPartSerializer which would decode 
this part into a binary stream, for return to a browser. 
Of course, MIME-parts of XML would be parsed fully, and mime-parts of HTML 
would be converted to XHTML with JTidy.
Using this approach, to refer to a MIME-part in the sitemap, you would 
generate the full message, then extract the part using a transformer for 
instance. There'd be no need to encode everything into the source url used in 
the sitemap, and this keeps the Source simple (means we can use a FileSource to 
read emails from individual files, too).
2) Handle non-XML parts in their native format
I'm not so clear on how this one would work, but I haven't yet ruled it out 
entirely ... I still need to get it clear in my head.
We'd need some component that would return a MIME-part from within a message, 
in a native format. It seems to me that it will need to implement Source (as far 
as Cocoon is concerned, this is the interface for reading a non-XML resource). 
But it must be able to get the MIME-part from either a file or url or from some 
kind of JavaMail source. So it would be a Source layered on top of some other 
source (AFAIK this would be a unique pattern in Cocoon, but not unreasonable 
given the nature of MIME-messages). 
I'm not sure if this is really a runner: the MIME-parts contain more data 
than a Source could provide. For instance, a Content-Disposition. This is one 
reason why I'm inclining towards the XMLizer approach. The trouble is that 
Cocoon is set up for doing magic with XML, but non-XML data is either converted 
to XML or else just passed through with a Reader. There's no facility for 
"pipelines" of non-XML data.


Whew! I've got another busy day today for another client and may not get 
anything done on it, but over the weekend I'll spend some more time on it and 
hopefully begin some actual programming work.
I've also been trying to define a URL scheme for referring to JavaMail 
resources. This also relates to the "cid:" and "mid:" schemes which are used for 
hyperlinks within a given MIME message, though as I said, I'd prefer to leave 
this out of th

RE: Better way to aggregate?

2002-07-30 Thread Conal Tuohy

If I understand correctly, the aggregation will read the data from each of
the subordinate pipelines WITHOUT the serialization step, so these 2 would
be equivalent.


> -Original Message-
> From: Alex Romayev [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 30 July 2002 22:18
> To: [EMAIL PROTECTED]
> Subject: Better way to aggregate?
>
>
> I've been looking into the aggregation techniques and
> there seems to be two ways people go about doing it.
> I'm trying to understand the pros/cons of the two
> approaches.
>
> Approach 1: Aggregate HTML
> Each map:part calls a pipeline, which generates,
> transforms and serializes to HTML, e.g.,
> 
> 
> 
>
> Approach 2: Aggregate XML
> Each map:part calls a pipeline, which generates and
> serializes to XML, e.g.,
> 
> 
>
> Any ideas?
>
> Cheers,
> -Alex
>
> __
> Do You Yahoo!?
> Yahoo! Health - Feel better, live better
> http://health.yahoo.com
>
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
>
> 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. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: generating a manifest of xml docs

2002-07-09 Thread Conal Tuohy

I'm glad I could help, icewind.

The xinclude elements refer to another Cocoon pipeline, which extracts the
title from the tei doc, where it is located at
"TEI.2/teiHeader/fileDesc/titleStmt/title/text()". This other pipeline
extracts this "TEI.2/teiHeader/fileDesc/titleStmt/title/text()" and produces
a document with a single top-level element "title":

Some Book Title

So the xpointer fragment #xpointer(/title/text()) is just to take the text
from out of THIS document.

Why the 2-step process?

I could have xincluded it directly by referring directly to the source TEI
document and using an xpointer of
"TEI.2/teiHeader/fileDesc/titleStmt/title/text()", but I wanted to be able
(later) to define the book title differently, perhaps including the contents
of other elements than just "TEI.2/teiHeader/fileDesc/titleStmt/title", such
as TEI.2/teiHeader/fileDesc/publicationStmt/publisher", etc.

This is a separation of concerns: the first XSLT is concerned with defining
an html page of links to xml documents, where the 2nd XSLT is concerned with
the semantics of TEI, i.e. "what constitutes the 'title' of a TEI document?"

Con

> -Original Message-
> From: icewind [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 10 July 2002 11:41
> To: [EMAIL PROTECTED]
> Subject: RE: generating a manifest of xml docs
>
>
>
>
> Conal,
>
> Thank you very much for taking the time to explain
> your setup to me. I have found it to be very valuable
> and I think others on the list will too.
>
> I got it working on my setup by including the full
> XPath expression for the node I want to select in the
> xinclude tag. I's a little uncertain about the
> fragment "#xpointer(/title/text()". What exactly does
> that do? Is that a tag that you are looking for in the
> ebook? At first I thought it was but then I saw you
> using the XPath to extract the title in the stylesheet
> that extracts the title for you.
>
> Thanks.
>
>
> __
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
>
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
>
> 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. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: QUESTION: Dynamic XSL

2002-07-09 Thread Conal Tuohy

Yes this is possible. I have used:

mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, 10 July 2002 06:22
> To: [EMAIL PROTECTED]
> Subject: RE: QUESTION: Dynamic XSL
>
>
> Your idea is not as far-fetched as you might think (I think there is a
> sample with dynamically generated content *and* stylesheets).
> You will, however, need to use the cocoon:/ protocol in your
> sitemap to
> allow your .xsl to be machted by the appropriate pipeline:
>
> 
>   
>   
>   
> 
>
> 
>src="logic/stylesheets/{1}.xsp"/>
>   
> 
>
> This example should do what you are looking for. The cocoon:/
> protocol tries
> to find an appropriate match in the
> current sitemap.
>
> Koen.
>
> -Oorspronkelijk bericht-
> Van: Eric Dalquist [mailto:[EMAIL PROTECTED]]
> Verzonden: dinsdag 9 juli 2002 19:56
> Aan: [EMAIL PROTECTED]
> Onderwerp: QUESTION: Dynamic XSL
>
>
> I was wondering if there is a way to generate an XSL document
> to be used in
> another transformation. Here is an theoretical pipeline that might
> illustrate my question a bit better:
>
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
>  src="logic/site_format.xsp"/>
> 
> 
>
> I hope this makes sence to someone and they have some suggestions.
>
> -Eric Dalquist
>
>
> -
> Please check that your question  has not already been answered in the
> FAQ before posting. 
>
> 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. 
>
> 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. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: generating a manifest of xml docs

2002-07-08 Thread Conal Tuohy

> -Original Message-
> From: icewind [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 9 July 2002 03:26
> To: [EMAIL PROTECTED]
> Subject: generating a manifest of xml docs
>
>
> I would like to be able to have cocoon take an entire
> directory of xml files, go through it, grab the
> contents of some tag (a that all the xml documents in
> this directory have) and output a page with the
> following information for each document in that
> directory:
>
>   1. The filename (linked to the file)
>   2. The contents of the tag from the file
>
>
> How would I do this?

Here's what I did. I'm not proud of it, but it works. It's quite
complicated, and I'm not entirely happy with the "layering" (SoC), since it
was done in a hurry, but it should give you an idea.

Actually, I'd be very grateful for any criticism of the code, especially
from the SoC point of view.

Here's the snippet from the sitemap:
















1) It uses the directory generator to produce a listing of files with
extension .xml in the folder "nzetc/tei". These are "TEI" docs ("e-books")
see http://www.tei-c.org/ for details.

2) The directory listing is transformed directly to an XHTML page of links,
but with  elements pointing to the titles of the e-books
embedded inside the html  elements (the links).

This is the XSLT which transforms the directory listing
(tei-directory-to-included-titles-html.xsl):


http://www.w3.org/1999/XSL/Transform";
xmlns:dir="http://apache.org/cocoon/directory/2.0";
xmlns:xi="http://www.w3.org/2001/XInclude";
exclude-result-prefixes="dir" >






texts















Note the "source-base-url" parameter which is passed to the XSLT to specify
how to read the title out of each e-book - the book is not read directly
from the file-system but via another call to the sitemap
("cocoon:/etexts/title/blah.xml") which returns the title. This is the
sitemap snippet involved:








This is the XSLT to extract the title:


http://www.w3.org/1999/XSL/Transform";>











This map:match is called from other places in the sitemap, where the books'
titles are needed - it's pretty simple as you can see, and could have been
done entirely by the xinclude processor if the
tei-directory-to-included-titles-html.xsl had inserted:



(I did it this way at first), but having a separate XSLT means I can add the
contents of other elements to the titles easily (e.g. the author's name,
publisher details, etc, could all be part of the title.)

3) Finally the xinclude runs and inserts the /title/text() of each ebook
into the html link for that ebook. The html is now complete. Actually, on
the NZETC site, this html is further processed to have banners and
navigation menu added, but it is workable, complete html at this point.

Phew! It's all a bit more complicated than I remembered! But I'm sure it
contains all the information you need to get your example working.

Cheers all!

Con


-
Please check that your question  has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>




RE: Impact of number of XLM files versus file size; Performance;

2002-05-31 Thread Conal Tuohy

Thomas Ruth wrote:

> From the application logic point of view we 
> could split the 1 XML file into 2 files, each around  800k of 
> relevant data or we could create from this one file 1000 
> files each containing a set of parent and child, each of this 
> smaller files is between 1k and 40k. 
> 
> In which direction should we design our system to get the 
> best performance when accessing the XML files. I know it 
> depends on what you do with XSL, but is there a general 
> direction with Cocoon2 to go: access the data using 1 big XML 
> file or work/access the data using smaller XML files. 

In Cocoon you can extract elements from a large file (and cache these
fragments) using XSL, or you can aggregate many small files into one (and
cache the aggregation). There are performance issues involved in how you do
this, but you can you deal with them so that the question should be
immaterial to Cocoon.

For instance, if you have lots of pipelines which present a small extract
from a large xml document, you can base all these pipelines on an
"extraction" pipeline, so that the extraction can be performed once, cached,
and provided as a convenient input for a set of other pipelines. You can use
a pipeline with XInclude or map:aggregate to do the inverse operation and
assemble a single document from parts. Generally speaking, the cache will
minimise a lot of the performance considerations, which gives you a lot of
freedom in how you choose to do it.

So you can consider yourself free to do whatever is most convenient for you
in terms of storing and updating the data. Do you want to maintain a lot of
little files? Do you want to have to edit huge xml documents when you are
updating the data? Those are the type of questions to ask, I think.

Cheers!

Con

<>
-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>


RE: Xinclude Problem

2002-05-24 Thread Conal Tuohy

> -Original Message-
> From: Margrit John [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, 25 May 2002 17:35
> Subject: Xinclude Problem
> 
> 

> In the Browser I get the following error statement:
> 
> root cause
> java.lang.OutOfMemoryError
> <>
> 
> Cocoon runs properly, if I remove all the   (in 
> the xml- and
> xslt-  and xsp-files)
> 
> Are the xi:include really the problem?

Do you have a stack trace from the log?



-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: Aggregates

2002-05-20 Thread Conal Tuohy

you need a part which refers to another aggregate using the "cocoon:"
pseudo-protocol.

> -Original Message-
> From: andexor [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 21 May 2002 14:51
> To: [EMAIL PROTECTED]
> Subject: Aggregates
>
>
> Is it possible to have an aggregate where one of the parts
> points to another aggregate?  I have
> tried it, but it doesn't work and I've searched the docs at
> xml.apache.org.
>
> Ed
>
>
> __
> Do You Yahoo!?
> LAUNCH - Your Yahoo! Music Experience
> http://launch.yahoo.com
>
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
>
> 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. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: cocoon confustion again going insane now -- sorry for being a dumbass but i need help please

2002-05-20 Thread Conal Tuohy

Stephen I notice you have a mis-match between the pattern in your
 element and the url-prefix in your  element.
"lnxserv" != "lnxservr"





HTH!

Con

> -Original Message-
> From: Stephen Smithstone [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 21 May 2002 08:46
> To: [EMAIL PROTECTED]
> Subject: cocoon confustion again going insane now -- sorry for being a
> dumbass but i need help please
>
>
>
>
> I appericated that , but guess what its not workin :/
>
> so i have enclosed both my projects sitemap.xmap and the cocoon
> sitemap.xmap
>
> i created a src dir under /var/tomcat/webapps/cocoon/lnxserv where i
> put the projects sitemap.xmap
>
> heres the sitemap.xmap for that
>
> 
> http://apache.org/cocoon/sitemap/1.0";>
> 
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
> 
> 
> 
> 
>  mime-type="text/html" />
> 
> 
> 
> 
>
>
>
> and at the bottom of the cocoon site map i have added
>
> in between the
> 
>   
>
>   .. Other cocoon stuff already there
>
>   
>uri-prefix="lnxservr" />
>   
> 
>
>
> then when i got to localhost:8080/cocoon/lnxserv - nothing appears
>
> in the cocoons site map do i have define another
>  to contain just my new apps
> stuff or can i
> just have then contained by the main ones
>
> also i keep restarting tomcat i supppose thats correct
>
> is there any thing i need to change in the cocoon.xconf file i changed
> the  reload-method="synchron" /> where the reload-method use to be
> asynchron
>
>
>
>
>
>
>
> i running on port 8080 please have a look and see if u can spot the
> errors
>
> im u running tomcat 4.0 binary version , java jdk 1.3.1_01 and the
> latest cocoon2.0.2 binary version
>
>
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
>
> 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. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




livesites: www.nzetc.org

2002-05-16 Thread Conal Tuohy

http://www.nzetc.org/ (currently redirects to http://nzetc.vuw.ac.nz/ but
that is only a temporary url)

This is the site of the "New Zealand Electronic Text Centre".

The site publishes books that have been scanned and marked up in "TEI"
format - http://www.tei-c.org/Guidelines2/index.html

THere are only about 10 documents at the moment, but there's many more to
come.

XSLT is used to convert the TEI documents to XHTML, and to extract portions
of the documents (chapters, etc).

DirectoryGenerator is used to produce a list of the documents available.

ImageDirectoryGenerator and XSLT is used to produce thumbnails from large
JPEG files.

XSLT is also used to add banners and navigation menus to the html, including
both static html files and the transformed TEI docs.

The site is generated off-line using Cocoon 2. In the end I used wget to
mirror the website because I couldn't work out how to make Cocoon produce
the web off-line, in command-line mode ;-)

The site was launched last night - today I've been sleeping late! ;-)

A big "thank you" to the entire Cocoon community for your work on Cocoon and
for the helpful advice!

Con



---
Conal Tuohy
[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: XSLT exception: bug or my mistake

2002-05-01 Thread Conal Tuohy

double equal signs in the xpath expression? 

> -Original Message-
> From: Alex McLintock [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, 2 May 2002 08:32
> To: [EMAIL PROTECTED]
> Subject: XSLT exception: bug or my mistake
> 
> 
> Hi folks,
> 
> I am getting data from XIndice and piping it through Cocoon. 
> I'm getting an 
> exception I don't understand when I do something particular in XSLT.
> 
> 
> 
> I have a bunch of book reviews in my XML database and am 
> listing the book 
> authors. I'm using the "not preceding" trick to remove 
> duplicate authors. 
> This works.
> 
> I'm now trying to list the number of reviews we have for each 
> of those 
> unique authors.
> 
> I'm doing this with two variables - one is the current author 
> fullname, and 
> the other is supposed to be the count of reviews with that 
> author. So I'm 
> doing this
> 
>
>  
>
> 
>
>   select="count(//author[fullname==$thisauthor])"/>
>
> 
> Now I'm pretty sure I've got this count line wrong, but 
> should it cause the 
> following exception?
> 
> org.apache.cocoon.ProcessingException: Exception in creating 
> Transform 
> Handler: java.lang.RuntimeException: Programmer's assertion in 
> getNextStepPos: unknown stepType: -1
> 
> If I comment out the count line I don't get the exception.
> 
> Any ideas for a relevant tutorial, or can anyone see what I'm 
> doing wrong.
> 
> 
> 
> This is the basic structure of the xml I'm processing.
> 
> 
> 
> 
> 
> 
> etc etc
> 
> 
> I'm using a CVS build of Cocoon which is several weeks old. Tomcat 
> 4.0.something, Java 1.3, RedHatLinux 7.2
> 
> 
> org.apache.cocoon.ProcessingException: Exception in creating 
> Transform 
> Handler: java.lang.RuntimeException: Programmer's assertion in 
> getNextStepPos: unknown stepType: -1
> at 
> org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransfo
> rmerHandler(XSLTProcessorImpl.java:276)
> at 
> org.apache.cocoon.transformation.TraxTransformer.setup(TraxTra
> nsformer.java:306)
> at 
> org.apache.cocoon.components.pipeline.AbstractEventPipeline.se
> tupPipeline(AbstractEventPipeline.java:215)
> at 
> org.apache.cocoon.components.pipeline.CachingEventPipeline.set
> up(CachingEventPipeline.java:278)
> at 
> org.apache.cocoon.components.pipeline.CachingEventPipeline.gen
> erateKey(CachingEventPipeline.java:141)
> at 
> org.apache.cocoon.components.pipeline.CachingStreamPipeline.pr
> ocess(CachingStreamPipeline.java:320)
> at 
> org.apache.cocoon.components.treeprocessor.sitemap.SerializeNo
> de.invoke(SerializeNode.java:153)
> at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.invokeNodes(AbstractParentProcessingNode.java:85)
> at 
> org.apache.cocoon.components.treeprocessor.sitemap.PreparableM
> atchNode.invoke(PreparableMatchNode.java:156)
> at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.invokeNodes(AbstractParentProcessingNode.java:109)
> at 
> org.apache.cocoon.components.treeprocessor.sitemap.PipelineNod
> e.invoke(PipelineNode.java:140)
> at 
> org.apache.cocoon.components.treeprocessor.AbstractParentProce
> ssingNode.invokeNodes(AbstractParentProcessingNode.java:109)
> at 
> org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNo
> de.invoke(PipelinesNode.java:144)
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Openweb Analysts Ltd, London: Software For Complex Websites 
> http://www.OWAL.co.uk/
> Free Consultancy for London Companies thinking of Open Source 
> Software.
> 
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
> 
> 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. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




HOWTO: Serving static XML files a la Cocoon-1

2002-04-28 Thread Conal Tuohy

Hi Peter,

Here's one way to respect processing instructions in Cocoon2:

Create a pipeline which reads an xml doc, finds the PI element and returns
the contents of the xsl document which it specifies. I've called this
"get-stylesheet.xsl", since it returns the stylesheet for a document. It
will return different stylesheets depending on the source document.

Create a separate pipeline which reads an xml doc and transforms it using
the stylesheet returned by the first pipeline.

I've done a little example, which I enclose. It is pretty basic - it assumes
all stylesheets are in the same folder, assumes they all produce html, and
it handles only 1 PI per source document, which it assumes refers to an XSL
stylesheet, but it's simple and you can easily modify it to suit a more
complicated setup if necessary.

The source documents (example/documents/*.xml) are assumed to contain a PI
like the one below:



The hello.xsl file is assumed to be in the example/stylesheets folder.

The sitemap snippet defines the 2 pipelines:


  
  
  



  
  
  



The stylesheet "get-stylesheet.xsl":
-

http://www.w3.org/1999/XSL/Transform";>

  
  


  

  
  

  
  

  

  


-

The

> -Original Message-
> From: Peter Flynn [mailto:[EMAIL PROTECTED]]
> Sent: Monday, 29 April 2002 01:45
> To: [EMAIL PROTECTED]
> Subject: Re: Serving static XML files a la Cocoon-1
>
>
> > Key distinction:
> >
> > DTDs are used to *VALIDATE*, not render.
>
> That's one reason. The other is to allow the document to be edited in
> a structured editor. Our documents are all created by humans, so we
> need to use a system which guides creation and editing. The Document
> Type Declaration is therefore present in the XML file so that the
> type of document can be detected by software (whether or not the DTD
> is used). The root element type name is insufficient for this (too
> many DTDs for articles use the root element type  already :-)
>
> > True, but it is not uncomon to have a working stylsheet in
> > applications, and before release the web monkeys are let loose to
> > make it look nice.  Of course both these developments can be
> > happening simultaneously.  THe doc writer should not care how the
> > info is presented, that isn't their concern.
>
> This is a contentious point. Frequently the doc writer is the only one
> who knows how the information should be presented: document stylists
> are notoriously ignorant of technical matters, just as authors are
> notoriously ignorant of typographic matters.
>
> > >>The sample sitemap bundled with Cocoon offers these
> 'defaults' already.
> > >
> > > If that is so, why does it not transform my sample XML
> document with
> > > its accompanying XSL stylesheet?
> >
> > Are you volunteering to write something that reacts to PIs?
>
> :-) Done too many of them already.
>
> > It's not really a trivial task, and considering the amount of work
> > involved in it, for something we really don't want to encourage,
> > its not a likely thing to happen soon.
>
> No, I don't want to if I can avoid it. PIs should be kept for their
> real task: affecting processing *outside* the domain of the processor
> (think TeX/dvi \specials). Basically tweaks.
>
> > Going back to your "associated" XSL document, and
> distributing the files
> > w/o a server: you can still do that with your PIs.  A
> browser that knows
> > how to treat the PIs will do so correctly.  However, for
> serving up to
> > older browsers, you should use the preferred method.  Your
> Sitemap won't
> > change much.  You stated something like every few years.  When you
> > change your site, you only need to update the sitemap to
> point to the
> > new stylesheet--even if you have hundreds of documents by then.
>
> I still need to bind a stylesheet to the documents. The Document Type
> is the obvious key, but I can't see how to achieve this in
> sitemap.xmap
>
> ///Peter
>
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
>
> 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. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




SOLUTION: RE: SVG BUG?: The attribute 'xlink:href' of the element is required

2002-04-22 Thread Conal Tuohy

Thank you very much Andrew - you've solved my problem. It works!

http://localhost:8080/cocoon/nzetc/images/thumbnails/Ba01S000.jpg
http://localhost:8080/cocoon/nzetc/images/thumbnails/Ba01S000_th.jpg

But there is definitely a bug ;-)

I saw Andrew's example below and thought "it's an XSL script, whereas my SVG
documents are static files - but it looks like it will produce exactly the
same kind of content as my documents". A light came on in my head and I
quickly added an XSLT to my pipeline, to apply the identity transform to my
SVG file - and that fixed it!!!

Here's the change to my sitemap:



 



The identity.xsl is just this:

http://www.w3.org/1999/XSL/Transform";>








So it seems you can't rasterize the SVG until it has been through an XSLT.
The sad thing is that I had always planned to generate my SVG files by
transforming the output of ImageDirectoryGenerator, but I thought I'd start
with some static files first, as a test. I almost avoided this problem
altogether!! ;-)

Cheers

Conal

> -Original Message-
> From: Andrew John Savory [mailto:[EMAIL PROTECTED]]On Behalf
> Of Andrew
> Savory
> Sent: Monday, 22 April 2002 20:11
> To: Conal Tuohy
> Cc: [EMAIL PROTECTED]
> Subject: RE: SVG BUG?: The attribute 'xlink:href' of the
> element 
> is required
>
>
> On Mon, 22 Apr 2002, Conal Tuohy wrote:
>
> > When you say you've had problems with relative hrefs, do
> you mean you have
> > used images in SVG? Or were your href problems in some
> other context?
>
> Yes, it was with SVG. Here's an example that works for me:
>
> 
>  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>   
>  xmlns="http://www.w3.org/2000/svg";
> xmlns:xlink="http://www.w3.org/1999/xlink";>
>height="{dimension_y}px"
> xlink:href="http://www.luminas.co.uk/images/object_images/{fil
> ename}"/>
>style="font-family:sans; font-size:8pt; fill:#00">
>  Copyright © 
>   
> 
>   
> 
>
>
> Andrew.
>
> --
> Andrew SavoryEmail:
> [EMAIL PROTECTED]
> Managing Director  Tel:  +44
> (0)870 741 6658
> Luminas Internet Applications  Fax:  +44
> (0)870 28 47489
> This is not an official statement or order.Web:
www.luminas.co.uk


-
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: SVG BUG?: The attribute 'xlink:href' of the element is required

2002-04-21 Thread Conal Tuohy

Andrew John Savory wrote:

> On Sun, 21 Apr 2002, Conal Tuohy wrote:
>
> > http://www.w3.org/1999/xlink";
> xlink:href="Ba01S000.jpg"
>
> Try using an absolute URL for the href. I've had problems
> with relative
> hrefs.

Cheers, Andrew. I've tried relative and absolute URLs but I always get the
same result (even using the "data" protocol). Actually I'm convinced that
the problem is nothing to do with resolving the URL - the problem is that
the xml attribute "xlink:href" has not been correctly parsed, or at least
has not been passed to Batik correctly - when Batik comes to access this
attribute from its object model it isn't there.

When you say you've had problems with relative hrefs, do you mean you have
used images in SVG? Or were your href problems in some other context?

If you do have an example (anyone!) of an SVG containing an , that
works, PLEASE let me see!

I have downloaded the batik and cocoon source and had a look at the code. So
far I've found nothing that looks wrong ... the URIs of the namespaces (in
particular the xlink namespace) I've used in my SVG files match the URIs
that Batik is expecting. If I remove the xmlns:xlink atttribute, then I get
an error that the "xlink" prefix is "unbound", as you'd expect. But with the
"xlink" prefix declared, I get this error message:

org.apache.batik.transcoder.TranscoderException: null
Enclosed Exception:
http://xml.apache.org:-1
The attribute 'xlink:href' of the element  is required

I think I will have better luck writing a separate servlet to create the
thumbnails, rather than using Cocoon. Perhaps I can come back to this
problem later and try to debug it, but I can't afford to spend any more time
on it at the moment.

Con


-
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]>




SVG BUG?: The attribute 'xlink:href' of the element is required

2002-04-21 Thread Conal Tuohy

I have found a bug in the SVG serialization: I can't serialize an SVG to a
JPEG or PNG if the SVG contains an  tag. Is it just me? Or is the SVG
serializer broken?

Help!

I'm running Cocoon 2.0.2 on JRE 1.3.1_03 on Windows 2000.

I will log a bug with Bugzilla, but I thought I'd ask first, if anyone else
has tried to serialize an SVG containing an image tag; perhaps I'm doing
something wrong.

I can use the Batik rasterizer (command-line) successfully with the same
SVG.

This is the SVG document:


http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd";>
http://www.w3.org/2000/svg"; width="534" height="759">
http://www.w3.org/1999/xlink"; xlink:href="Ba01S000.jpg"
x="0" y="0" width="534" height="759"/>


If I remove the  element from my SVG, I get a beautiful white
rectangular JPEG ;-)

This is a snippet from my sitemap:






Here is the stack trace:

Original exception : org.apache.batik.transcoder.TranscoderException: null
Enclosed Exception:
http://xml.apache.org:-1
The attribute 'xlink:href' of the element  is required
at org.apache.batik.transcoder.image.ImageTranscoder.transcode(Unknown
Source)
at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown
Source)
at
org.apache.cocoon.serialization.SVGSerializer.notify(SVGSerializer.java:268)
at org.apache.cocoon.xml.dom.SVGBuilder.endDocument(SVGBuilder.java:134)
at
org.apache.xerces.parsers.AbstractSAXParser.endDocument(AbstractSAXParser.ja
va:724)
at
org.apache.xerces.impl.XMLNamespaceBinder.endDocument(XMLNamespaceBinder.jav
a:704)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.endDocument(XMLDTDValidator.java:
997)
at
org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(XMLDocumentScannerIm
pl.java:437)
at
org.apache.xerces.impl.XMLEntityManager.endEntity(XMLEntityManager.java:1150
)
at
org.apache.xerces.impl.XMLEntityManager$EntityScanner.load(XMLEntityManager.
java:3195)
at
org.apache.xerces.impl.XMLEntityManager$EntityScanner.skipSpaces(XMLEntityMa
nager.java:2896)
at
org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatc
h(XMLDocumentScannerImpl.java:987)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume
ntFragmentScannerImpl.java:333)
at
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserCo
nfiguration.java:525)
at
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserCo
nfiguration.java:581)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:115
7)
at org.apache.avalon.excalibur.xml.JaxpParser.parse(JaxpParser.java:241)
at
org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStrea
mSource.java:206)
at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:142)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv
entPipeline.java:251)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:399)

> -Original Message-
> From: J.Pietschmann [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 19 April 2002 08:33
> To: [EMAIL PROTECTED]
> Subject: Re: problem with linked jpg in svg: The attribute
> 'xlink:href'
> of the element  is required
>
>
> Conal Tuohy wrote:
> > I'm trying to serialize a simple SVG document, but I get an error:
>
> You don't have the svg namespace declared. Did you delete
> the DOCTYPE?
> Check whether your SVG code runs in the Batik standalone
> viewer. The batik-user list may be of some help if it does
> not.
>
> J.Pietschmann
>
>
>
> -
> 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]>




problem with linked jpg in svg: The attribute 'xlink:href' of the element is required

2002-04-18 Thread Conal Tuohy

I'm trying to serialize a simple SVG document, but I get an error:

org.apache.batik.transcoder.TranscoderException: null
Enclosed Exception:
http://xml.apache.org:-1
The attribute 'xlink:href' of the element  is required

Which is strange, because this is my SVG document:


http://www.w3.org/1999/xlink"; width="534" height="759">



I want to use SVG so I can scale the bitmap down and serialize the scaled
down bitmap as a thumbnail.

Anyone have any idea?


Con

---
Conal Tuohy
[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]>




unparsed-entity-uri() function returning empty

2002-04-17 Thread Conal Tuohy

I have some xml documents with unparsed entity declarations for jpeg images.
For instance:




















]>

The xml document then refers to these entities by name:


Photo: Robert Cross
Black and white photograph


My stylesheet attempts to use the XSL function unparsed-entity-uri() to get
the uri of the entity for the @src attribute of an HTML IMG tag, but this
doesn't work - it returns empty. I get . The odd thing is that
when I run my stylesheet through Xalan from the command line, it works fine,
it's only inside Cocoon that the function doesn't work.

I can work around it by assuming that the value of the figure/@entity tag is
a filename without extension, but this is a kludge. Can anyway suggest
anything? Thanks!

Con

---
Conal Tuohy
[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]>




xt:document in cocoon?

2002-04-04 Thread Conal Tuohy

I have some questions about using the XT extension "document" in Cocoon.

This feature allows an XSLT to produce multiple output documents; it's often
used (outside of Cocoon) to produce a collection of small web pages from a
large source file. I have access to some XSLT code which does this, which
I'd like to use in Cocoon.

It seems to me, though, that this implies a kind of "batch-processing"
paradigm, and that Cocoon (being part of an http server), is more suited to
having XSLT files that produce a single output document (returned to the
user's browser). If xt:document is at all useful in Cocoon, it would be e.g.
to take data posted from an HTML form and save it to the disk from within an
XSLT.

What do others think? Am I right? Am I best to hack the XSLT code I have
which uses xt:document? Has anyone else had to do something similar?

BTW, I notice that in XSLT 1.1 the W3C intended to make this feature
standard, but XSLT 1.1 was abandoned, and the feature has been removed from
the XSLT 2 Requirements document http://www.w3.org/TR/xslt20req


---
Conal Tuohy
[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]>




[SOLUTION] RE: External graphic, FOP and URIResolver

2002-03-21 Thread Conal Tuohy

Until the FOPSerializer is fixed up to allow a base url for images, you can
use an XSL stylesheet instead. When I started with FOP I used absolute URLs
too, until I wrote this simple stylesheet called
("set-external-graphic-src-base-url.xsl"). The code is simple; it assumes
all URLs are relative, and it modifies all "src" attributes, but it should
do the job.


http://www.w3.org/1999/XSL/Transform";
version='1.0'>















In your sitemap, call this stylesheet with a parameter before serializing,
like this:





http://127.0.0.1/images/"/>




Regards

Conal

> -Original Message-
> From: Torsten Curdt [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 22 March 2002 00:44
> To: Cocoon Users; Nicola Ken Barozzi
> Subject: Re: External graphic, FOP and URIResolver
> 
> 
> On Thu, 21 Mar 2002, Nicola Ken Barozzi wrote:
> 
> > From: "Torsten Curdt" <[EMAIL PROTECTED]>
> >
> > > > Is it possible that FOP uses the URIResolver of Cocoon 
> instead, in order
> > to
> > > > understand pseudo-protocol (especially cocoon:// and 
> resource://) ?
> > > >
> > > > Is there a trick in order to use relative paths in FOP? 
> (I read the
> > > > archives and everyone
> > > > seems to use full URLs :-(
> > >
> > > IIRC there is a static configuration in FOP where you can 
> specify a
> > > context directory. Unfortunately this not yet configurable in the
> > serializer and
> > > since it's static it will be for each FOP tasks...
> > >
> > > Maybe you can post this issue on the FOP list and help 
> make this better
> > > configurable...
> >
> > FOP community is in the process of making this happen, by 
> using Avalon
> > Configuration.
> > If you want to partecipate, goto [EMAIL PROTECTED] .
> 
> great news :)
> --
> Torsten
> 
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
> 
> 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. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: Some Design Help, please

2002-03-05 Thread Conal Tuohy

You can do this kind of conditional include in Cocoon quite easily. In an
xsl script you can use xsl:if to conditionally produce xinclude references
to your other xml documents (toolbar, header, etc). Then your pipeline can
use the xinclude transformer to process these "include" elements and
actually include the referenced documents together into a single document.

-Original Message-
From: Sreedhar Chintalapaty [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, 6 March 2002 09:39
To: Cocoon Users
Subject: Some Design Help, please


Hi,
 
I am an absolute newbie to Cocoon. Being from a JSP background, I suspect
there are some fundamental differences in the way a database driven web site
is designed for Cocoon (with XSP/XML/XSL).
 
Let's say the users enter the site by the way of "index". This page draws
its content from several other component pages, namely header, majorTabs,
toolBar and contentPage. The requirement is: The active majorTab must be
highlighted, each majorTab has a different toolBar associated with it, and
the contentPage can be either a static XML file or a database search results
page.
 
In the JSP world, I would create an index.jsp page that took in a bunch of
request parameters like 'toolBarName', etc., and dynamically include the jsp
components specified therein.
 
How would I do something like that in Cocoon? Can one XSP page dynamically
include other XSP pages? I would appreciate -any- examples/sample code! 
 

Best Regards, 

Sreedhar Chintalapaty 
Consultant, 
PTC - 140 Kendrick St., Needham MA 02494 

__
A computer is like an Old Testament god, with a lot of rules and no mercy -
Joseph Campbell

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




How to run Cocoon in command-line mode?

2002-02-26 Thread Conal Tuohy

I want to be able to generate all the files in a website, then host those
files on another (non-Cocoon) server.
 
I've searched the documentation, but can't find how to run Cocoon in
"command-line mode". I found a lot of references to running Cocoon in
command-line mode, but no examples or description of how it's done. Can
someone please point me at the relevant documentation? Thanks!

-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




MailTransformer

2002-02-14 Thread Conal Tuohy

It seems to me that a MailTransformer would be a better, more general
solution to this problem than an XSP (though I don't know much about XSP).
Someone else recently was asking for much the same thing. 

Has anyone written a MailTransformer?


> -Original Message-
> From: Noah Mittman [mailto:[EMAIL PROTECTED]]
> Sent: Friday, 15 February 2002 13:24
> To: Cocoon Users
> Subject: maybe running Java within an XSL?
> 
> 
> What would be the best way to approach this functionality?
> 
> I have an XML which acts as source data for a multi-framed web 
> application.
> At some point I want a FORM in one of those HTML pages to 
> send email -- 
> take the to: and from: addresses but use a set of parameters 
> which are 
> nodes in the XML.
> 
> So basically I want, upon submission, for Cocoon to take the 
> parameters, 
> take the necessary nodes  from the XML, send email via 
> javax.mail, and 
> then style a result page based on the success/fail of the send, also 
> using parameters in the source XML.
> 
> Here's an example of what I'd thought I'd do:
> 
> a) Create an XSP by pulling in what is needed from the source XML and 
> the items from the FORM into a  root and a new 
>  
> element:
> 
>   
>   
>   
>name="use-request-parameters" value="true"/>
>   
>   
>   
> 
> So a doc that is like this:
>   
>   Foo
>   bar.css
>   Thanks for making Foo #1 in 
> Lichtenstein.
>   
> Becomes this:
>   
>   
>   
>   Foo
>   bar.css
>   Thanks for making Foo #1 in 
> Lichtenstein.
>   
>   
> 
> b) have apputil logicsheet ready, which will turn apputil:mail into a 
>  element
> 
> c) Execute the XSP and style the result
> 
>   
>src="cocoon:/sendmail.xsp" />
>   
>   
>   
> 
> It seems like it should be much easier than this, however. Is there a 
> better way?
> Thanks!
> 
> 
> n
> 
> 
> -
> Please check that your question has not already been answered in the
> FAQ before posting. 
> 
> 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. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Implement a Generator or a URLStreamHandler?

2002-01-18 Thread Conal Tuohy

I've considering a small project to publish a usenet newsgroup using Cocoon
2. I've used Cocoon for a couple of months, for publishing static xml source
(DocBook) as PDF and HTML, but now I have to write some Java! ;-)

I think my options are either to write a NewsGroupGenerator in the Cocoon
framework, or a URLStreamHandler (and URLStreamHandlerFactory) in the Java
URL framework. With a URL-handler I could just use the standard
FileGenerator like so:


news:{1}"; />




I am intending to use the URL framework, but can anyone suggest why a
Generator might be better?


Conal


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




UML docs?

2001-11-18 Thread Conal Tuohy

Are there any uml diagrams (sequence or collaboration diagrams,
particularly) of Cocoon2?


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>