RE: XInclude - optimization/alternatives to

2002-04-02 Thread Axel Honfi

Hi!

I would first generate the data(featured article) and then format it with
xslt. Another way would be to generate the content-page, then include the
data one time, and then format it with xslt. I have pipelines with up to
four xslt-transformations, because I think that's faster(especially if you
don't use params in the xslt) than multiple queries to a db.

Yes, and you can put xinclude in the content page, take a look at the
Xinclude-transformer.

Best Regards

Axel


-Original Message-
From: Sreedhar Chintalapaty [mailto:[EMAIL PROTECTED]]
Sent: Sunday, March 17, 2002 4:07 PM
To: Cocoon Users
Subject: XInclude - optimization/alternatives to


Hi all,

I am using XInclude to process a content page and place the title, author,
and article into different cells in a table.

Content File: featuredArticle.xml

http://apache.org/xsp";
xmlns:xsp-request="http://apache.org/xsp/request/2.0";
xmlns:dbtags=http://gvs/dbtags>

Fall in New Hampshire
The Itinerant Monk

blah-blah-blah
List of Hiking Trails




Style Sheet: formatter.xsl



http://localhost/cocoon/gvs/xsp/{$tab}/{$request-url}#xpointer(//title
)"/>




http://localhost/cocoon/gvs/xsp/{$tab}/{$request-url}#xpointer(//autho
r)"/>




http://localhost/cocoon/gvs/xsp/{$tab}/{$request-url}#xpointer(//artic
le)"/>




This does what I want it to do, but at a cost: The -entire-
featuredArticle.xml is loaded three times, parsed three times and, for the
get-list-of-trails tag, the database is queried three times - you get the
picture.

There must be a better way to do something like this... I would appreciate
any suggestions/advice/pointers...

Thanks, and Best Regards,

Sreedhar Chintalapaty

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




RE: XSLT - processing XML from a database field problem

2002-03-29 Thread Axel Honfi

I have no clue why this happens, but have you tried putting the escaped
stuff into CDATA-braces with the first stylesheet?
I think this should keep the second one from unescaping

Maybe an idea

Axel
-Original Message-
From: Florent Soulière [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 29, 2002 6:03 PM
To: [EMAIL PROTECTED]
Subject: XSLT - processing XML from a database field problem


Hello,

I already passed 2 days trying to solve my problem by myself, but I did not
succeed...
The situation:
I use the SQL Transformer to get data from database. inside this data, there
are fields containing XHTML (e.g. this is bold text). What I want to
do with all the data is to produce a PDF document using FO.
To accomplish such a thing, I use 2 XSL pages: one for "unescaping" the
,  and other XHTML tags into some valid XML-like tags
(, , ...) with . And the
other xsl page does the "big job" by transforming all the document into a FO
document (including the XHTML tags, of course).

The problem:
Even if the unescaping works fine (I checked it by watching the output of
the XSLT transformation of the "unescaping XSL page"), it seems that when I
want to process the ,  & others with a standard
, they automatically come back to a non-escaped form.

What I already tried:
I tried to replace  by a . And I saw
that my XHTML tags were still unescaped, as expected. So I really wonder why
they come back to escaped when applied with apply-templates...
I tried to split the global process into 2 steps: with one pipeline, I get
the unescaped intermediate result, that I store manually into an xml file,
and then with another pipeline I read the intermediate file and push it into
the "big job" XSLT page... And it works!

So, I really would like to know what's wrong with this unescaping and
chained-XSLT stuff... I know that this problems of integrating XML fragments
into Cocoon's pipelines have always been sensitive, although the
documentation have absolutely no care with this.

If anyone can help, thank you in advance.


Florent, Soulière
Stagiaire e-Technologies Lyon
T-Systems Soleri
Groupe Deutsche Telekom
Notre métier: la convergence informatique et télécoms
Convergence is our Business

tél.:+33 4 37 65 24 26
fax:+33 4 37 65 22 31
mail:   [EMAIL PROTECTED]

www.t-systems.fr


-
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: Redirect on sitemap with parameters


I don't know if this works, give it a try!

But what this works with me:











or 

and the request-action.

I don't know what you want to do with this, but maybe I helped

Axel


-Original Message-
From: yuryx [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 29, 2002 11:26 AM
To: [EMAIL PROTECTED]
Subject: Redirect on sitemap with parameters


Hello All!
Can I have redirect in sitemap like:













it possible?

Thanx.
Yury.




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




xsp - file upload question


Hello!

I have a serious problem with file-uploads. I need to check if the file
already exists in the specified directory and if yes, create a new
subdirectory and store it there. And I need to delete files in the upload
directory.

I examined the xsp-upload-sample, but I still don't have a clue who is
performing the upload/storage-procedure and who (must be the same one) is
putting numbers in front of the filenames if they already exist.

The xsp is only defining uploadDir, who is comsuming it?

Thanks for any help or hints

Axel


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




XSL-question: sort with parameter


Hi!

I passed a parameter to a stylesheet and I can get the value with
.

But I need to sort data by the value of the parameter like

.

But with this nothing happens and all other forms I tried also failed.

Does anyone know how to work this?

Thanks a lot

Axel

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




AW: breadcrumb navigation


Hi!

If you mean to show a "navigation-path" like subdirectories, I would enable
sitemap-parameters in the XSLT-Transformer and use the request-url of the
user as name(I think they did the same at yahoo changing the '_' to a blank
space).

Maybe that helped you

Axel

-Ursprüngliche Nachricht-
Von: Charles Yates [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 26. März 2002 00:45
An: [EMAIL PROTECTED]
Betreff: breadcrumb navigation


Hello List!
 Has anyone figured out a good way to generate breadcrumb navigation
links using XSL and Cocoon?  Like the ones at the top of Yahoo! pages.
We plan on doing this and I don't want to reinvent the wheel.  I'd
rather not do it with sessions or cookies . . .

Charles




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




AW: Cocoon and XIndice versions



Hello!

First, I think that jdk1.4 may cause some problems, but read in the archives
for more on that.

You don't need a new cvs-snapshot, just use cocoon2 normal release and
define the xmldb pseudo protocol in cocoon.xconf:









because the generator will be deprecated and is not so efficent.

Then remove the xmldb-samples in the sitemap and copy the xindice.jar
(different package names than dbxml) into cocoon.

Then you can generate SAX events by using



in the sitemap (this sample uses an xpath query - if you don't want to query
use the xml-object-id instead of everything beginning with '#').

If you want to include some database-xml in an xsp-file use:



If you want to update the database use the xmldb-transformer from the
scratchpad, but for the "update" execution you have to add a patch or
workaround because xalan removes the xupdate-namespace, you can also find
this in the archives.

At least this worked with me, I hope you can make it run

Axel

-Ursprungliche Nachricht-
Von: Alex McLintock [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 22. Marz 2002 18:04
An: [EMAIL PROTECTED]
Betreff: Cocoon and XIndice versions


Hi folks,

I'm trying to find satisfactory versions of Cocoon and XIndice which work
together.

I am told that I need a CVS version of cocoon rather than the latest
release - but the CVS snapshots don't currently work.
(I am using Xinidice 1.0 and Tomcat 4.0something on RedHat Linux 7.2, and
Sun's JDK 1.4)

Any ideas? Is it ok discussing cvs snapshots on the "users" list?

Older versions of Cocoon use a deprecated generator system for talking to
Xindice rather than the now standard "source".


Alex




Cocoon 2 - Internal server error

type fatal

message Error compiling sitemap

description org.apache.cocoon.ProcessingException: Error compiling sitemap:
java.lang.NoClassDefFoundError

sender org.apache.cocoon.servlet.CocoonServlet

source Cocoon servlet

request-uri

/cocoon/

path-info

stack-trace

org.apache.cocoon.ProcessingException: Error compiling sitemap:
java.lang.NoClassDefFoundError
 at org.apache.cocoon.sitemap.Handler.run(Handler.java:295)
 at java.lang.Thread.run(Thread.java:536)
Caused by: java.lang.NoClassDefFoundError
 at org.apache.batik.dom.svg.SAXSVGDocumentFactory.(Unknown Source)
 at org.apache.cocoon.xml.dom.SVGBuilder.(SVGBuilder.java:86)
 at
org.apache.cocoon.serialization.SVGSerializer.(SVGSerializer.java:95)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)






Openweb Analysts Ltd, London
Software For Complex Websites
http://www.OWAL.co.uk/


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




Question concerning form-validator-action


Hello!

I have a simple question concerning the form-validator-action.
I defined a param like this:



But in which format should I input the date(dd.mm.yy or ddmmyyy or ...?
All my tries failed to validate, does anyone know the correct syntax?


Thanks in advance

Axel

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




AW: newbie: install error "Language Exception"




-Ursprungliche Nachricht-
Von: charles gebhard [mailto:[EMAIL PROTECTED]]
Gesendet: Samstag, 16. Marz 2002 08:13
An: [EMAIL PROTECTED]
Betreff: newbie: install error "Language Exception"


cocoon 2.0.1 - binary version
sun j2sdk1.4.0
tomcat 4.0.3
linux

howdy,
i get the following error when hitting http://localhost/cocoon/

type fatal
message Language Exception
description org.apache.cocoon.ProcessingException: Language Exception:
org.apache.cocoon.components.language.LanguageException: Error compiling
sitemap_xmap: Line 0, column 0: could not parse error message: error:
Invalid class file format in
/usr/java/j2sdk1.4.0/jre/lib/rt.jar(java/io/OutputStream.class). The
major.minor version '48.0' is too recent for this tool to understand.
(more errors omitted)

i've looked over the mail archive and couldn't find an answer. i've tried
downgrading to jdk1.3 and tomcat 4.0.1 (got different errors) and still no
luck.  i'd appreciate any help.

on a side note, is there an easier way to get cocoon running than what is
stated in the cocoon install guide?  thanks.
-chuck


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


Hi!

Have you edited the sitemap or is it the "fresh" one from the download?
Because I also got a LanguageException and the reason was I wrote
 instead of .

So check your spelling, maybe it has nothing to do with java-versions.

best wishes

Axel



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




AW: XML Stored in a Database




-Ursprüngliche Nachricht-
Von: Alan Tibbetts [mailto:[EMAIL PROTECTED]]
Gesendet: Freitag, 15. März 2002 19:52
An: [EMAIL PROTECTED]
Betreff: XML Stored in a Database


Hi

I've trawled the archives and samples, but can't see the answer to this one.

I have XML stored as a string in a database, e.g.

"Hello, this is dynamic."

I'm using XSP/Logicsheets (and my own db access classes) to retrieve this
data into another XML element, eg.

String dynamicXML = getFromDatabase();

dynamicXML.

I want this to result in:



Hello, this is dynamic.



Unfortunately, the 'dynamic XML' is being treated as text during the
transformation.  Looking at the source of the resulting HTML page I see:

lt;paragraph>Hello, this is
dynamic.

So I think my XML after the XSP is processed looks like:


lt;paragraph>Hello, this is
dynamic.


How do I get XSP/XSL to treat the data coming from the db as XML and
properly insert it into the document tree?  I thought it might be an XSL
problem, but can't see a command that looks like it will do the job.

BTW. I'm using Cocoon 2.0.1/Tomcat 4.0.1/JDK 1.3.1/Win2K

Cheers

Alan


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

At first glance I think that a quick and dirty way would be to define your
&-expressions in XSL so that they will be substituted while transformed.

maybe it'll help you

Axel





-
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 and xindice


Hello!

O.K., my combination works, I can query and update XIndice, but how did
anybody solve the problem of user-authentication with the user-data
(username, password) saved in XIndice?


Thanks for some clues

Axel



-
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 get data into sitemap-params (for use with XIndice)?????


Hello and I know I posted a similar question before.

Does anyone have a clue or a good idea or anything about how to get
information out of the SAX-Events from the pipeline?

I need to choose the pipeline based upon the xml-data querried from an
XMLDB.

 or .

So how can I get the value of ressources into a sitemap-param?


Thanks for ANY help or idea

Axel


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




Question: How to get Data from XML-Source into sitemap-params?


Hello!

I query an XIndice DB from Cocoon and get the search-results as an
XML-Document.

The result is an filled or empty xml-file with the root-element

http://apache.org/cocoon/xmldb/1.0"/>

To start a session I need to distinguish if the value of result is 0 or 1.

So how can I get this value from the SAX-Events in the pipeline into
sitemap-params?


Thanks in advance

Axel


-
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)acting on XML-Data


Hello!

For user-authentication I use the XMLDBSourceFactory with a query for
username/password.
The result looks something like this:


http://apache.org/cocoon/xmldb/1.0";>

http://xml.apache.org/xindice/Query"; src:col="/db/xy/xy"
src:key="xy">
X
Y
xy
xy




or


http://apache.org/cocoon/xmldb/1.0"/>

Now I need to create a session based upon the existance of the xml-data or
the value of "@resources" == 1.

Is there an easy way or do I have to write my own action? And how do I get
the xml-data in an action?

Thanks in advance

Axel


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




AW: Include XML file




-Ursprüngliche Nachricht-
Von: Stefano Bonnin [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 07. März 2002 14:07
An: [EMAIL PROTECTED]
Betreff: Include XML file


Hi,

I'd like to include an XML document inside another. With C1 I used
util:include-file tag, but now, it (seems) doesn't work.

How can I do this?
Which is the better way?

Thanks to all.





---
Outgoing mail is certified Virus Free. (CopyRight FLASHH!)
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.330 / Virus Database: 184 - Release Date: 28/02/02


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


You can use the XInclude-Transformer found at

http://xml.apache.org/cocoon/userdocs/transformers/xinclude-transformer.html

Axel


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