about Xindice

2003-06-29 Thread Yury Mikhienko
Hi cocooners!

I implements the news system on my Web-site based on xindice 1.1b, but time of time
database works is very slow :(( (big timeout on response ) . 
It's strange behaviour, because in collection I stored no more 150 documents.
Can I make the work of xindice database more faster?
Any solutions for tuning?

Thanks all for advise!

-- 
 
Best regards,
Yury Mikhienko.
IT engineer, ZAO Mobicom-Kavkaz

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



Gradual performance degradation with cocoon:// protocol

2003-06-29 Thread t tl
Hi,

Has anyone encountered performance problems with cocoon:// protocol?

Setup

Cocoon 2.0.4 (the same problem applies for 2.0.5-dev)
Tomcat 4.1.24
JDK 1.3.1
Redhat 7 (and Redhat 8)

The problem seems to be a gradual slowdown in performance when using cocoon:// protocol. The problem doesNOT appear when I use the cocoon:/ protocol.

Thank you for your help.

T.Want to chat instantly with your online friends? Get the FREE Yahoo!
Messenger

some XSP problems

2003-06-29 Thread Kevin Cruel
Hi everybody,
I've got a huge problem while compiling my XSP data. My XSP data
consists of about 60-70 translations, a logical part and a huge part
of SQL-querys. I guess this data hits the 64k barrier of java while
cocoon is compiling it. Does anyone know how to avoid hitting this
barrier?

THX!!!



So here we go...

logical part:

xsp:logic

 private static Properties getEnvVars() throws IOException !--Umgebungsvariablen 
auswerten--
{
Process p = null;
Properties envVars = new Properties();
Runtime r = Runtime.getRuntime();
String OS = System.getProperty(os.name).toLowerCase();
if (OS.indexOf(windows 9)  -1)
{
p = r.exec( command.com /c set );
}
else if( (OS.indexOf(nt)  -1) )
{
p = r.exec( cmd.exe /c set );
}
else if( (OS.indexOf(windows 2000)  -1 ))
{
p = r.exec( cmd.exe /c set );
}
else if( (OS.indexOf(windows xp)  -1))
{
p = r.exec( cmd.exe /c set );
}
else
{
p = r.exec( env );
}
BufferedReader br = new BufferedReader( new InputStreamReader( 
p.getInputStream() ) );
String line;
while( (line = br.readLine()) != null )
{
int idx = line.indexOf( '=' );
String key = line.substring( 0, idx );
String value = line.substring( idx+1 );
envVars.setProperty( key, value );
}
return envVars;
}


/xsp:logic



translations:


!-- TRANSLATIONS --
  NetworkIDxsp-request:get-parameter name=NetworkID//NetworkID
  localexsp-request:get-parameter name=locale//locale
  translation_overviewi18n:textmetadata_overview/i18n:text/translation_overview


  !-- Navigation --
  navigation
element
  i18n:textstudyprogram_navigation_studyprogram/i18n:text
/element
element
  link
titlei18n:textstudyprogram_navigation_courses/i18n:text/title
 href../courses_xsp-request:get-parameter name=locale/.html/href
  /link
/element
element
  i18n:textstudyprogram_navigation_metadata/i18n:text
/element
  /navigation

  !-- General --
  translation_generali18n:textmetadata_general/i18n:text/translation_general
  
translation_general_identifieri18n:textmetadata_general_identifier/i18n:text/translation_general_identifier
  
translation_general_elementleveli18n:textmetadata_general_elementlevel/i18n:text/translation_general_elementlevel
  
translation_general_elementlevel_1i18n:textmetadata_general_elementlevel_1/i18n:text/translation_general_elementlevel_1
  
translation_general_elementlevel_2i18n:textmetadata_general_elementlevel_2/i18n:text/translation_general_elementlevel_2
  
translation_general_elementlevel_3i18n:textmetadata_general_elementlevel_3/i18n:text/translation_general_elementlevel_3
  
translation_general_elementlevel_4i18n:textmetadata_general_elementlevel_4/i18n:text/translation_general_elementlevel_4
  
translation_general_elementlevel_5i18n:textmetadata_general_elementlevel_5/i18n:text/translation_general_elementlevel_5
  
translation_general_titlei18n:textmetadata_general_title/i18n:text/translation_general_title
  
translation_general_catalogi18n:textmetadata_general_catalog/i18n:text/translation_general_catalog
  
translation_general_entryi18n:textmetadata_general_entry/i18n:text/translation_general_entry
  
translation_general_languagei18n:textmetadata_general_language/i18n:text/translation_general_language
  
translation_general_descriptioni18n:textmetadata_general_description/i18n:text/translation_general_description
  
translation_general_keywordsi18n:textmetadata_general_keywords/i18n:text/translation_general_keywords
  
translation_general_coveragei18n:textmetadata_general_coverage/i18n:text/translation_general_coverage
  
translation_general_structurei18n:textmetadata_general_structure/i18n:text/translation_general_structure
  
translation_general_aggregationleveli18n:textmetadata_general_aggregationlevel/i18n:text/translation_general_aggregationlevel

  !-- Lifecycle --
  
translation_lifecyclei18n:textmetadata_lifecycle/i18n:text/translation_lifecycle
  
translation_lifecycle_versioni18n:textmetadata_lifecycle_version/i18n:text/translation_lifecycle_version
  
translation_lifecycle_statusi18n:textmetadata_lifecycle_status/i18n:text/translation_lifecycle_status
  
translation_lifecycle_contributei18n:textmetadata_lifecycle_contribute/i18n:text/translation_lifecycle_contribute
  
translation_lifecycle_contribute_rolei18n:textmetadata_lifecycle_contribute_role/i18n:text/translation_lifecycle_contribute_role
  
translation_lifecycle_contribute_entityi18n:textmetadata_lifecycle_contribute_entity/i18n:text/translation_lifecycle_contribute_entity
  
translation_lifecycle_contribute_datei18n:textmetadata_lifecycle_contribute_date/i18n:text/translation_lifecycle_contribute_date

  !-- Metadata --
  

Catching exceptions when not using ESQL:ERROR-RESULTS

2003-06-29 Thread Luís Góis
Hi everybody!

Look at this piece of code from Donald Ball I've found (November 2000) about catching 
exceptions without using esql:error-results tag:


xsp:logic
  try {
esql:connection
  ...
/esql:connection
  } catch (MyException e) {
...
  } catch (MyOtherException e) {
...
  }
/xsp:logic

In my code I wan't to use a slight variant (is it meaningfull?):

xsp:logic
  try {
esql:execute-query
  ...
/esql:execute-query
  } catch (MyException e) {
...
  } catch (MyOtherException e) {
...
  }
/xsp:logic

Looking directly to the esql.xsl from cocoon 2.0.3, when not using the 
esql:error-results tag, a new RuntimeException is thrown. So, unless I'm wrong and in 
that case please correct me, I can only catch this kind of exception, whatever happens 
inside the esql:execute-query.

Unless I parse the getMessage() output, do I have any other way to catch different 
exceptions?

TIA
Luís Góis


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



Re: about Xindice

2003-06-29 Thread Josema Alonso
Hi, Yury.

It could be due to a number of reasons. It could depend on JDK version
you're using, if you're using DOM or SAX, the XPath expression you're using,
if you're validating data or not...or even a bug...you have provided very
little info.

Anyway, I suggest you should try at [EMAIL PROTECTED] which is
more suitable for this kind of questions. And maybe you could try to search
its archives (http://marc.theaimsgroup.com/?l=xindice-users). I remember
questions like these surfaced recently.

Best.


- Original Message -
From: Yury Mikhienko [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, June 29, 2003 4:35 PM
Subject: about Xindice


 Hi cocooners!

 I implements the news system on my Web-site based on xindice 1.1b, but
time of time
 database works is very slow :(( (big timeout on response ) .
 It's strange behaviour, because in collection I stored no more 150
documents.
 Can I make the work of xindice database more faster?
 Any solutions for tuning?

 Thanks all for advise!

 --

 Best regards,
 Yury Mikhienko.
 IT engineer, ZAO Mobicom-Kavkaz

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



xsp-request:get-parameter into xsl:variable problem

2003-06-29 Thread C Bram Dit Saint Amand
This is an extract from request_attributes.xsl, a logicsheet which is
called by some_page.xsp


xsl:template match=request-attributes:get/webaction
xsl:variable name=webaction-valuexsp-request:get-parameter
name=webaction//xsl:variable
xsl:if test=contains($webaction-value, 'add_to_favourites_session')
and contains('add_to_favourites_session', $webaction-value)
esql:connection
  esql:poolperso-mysql/esql:pool
  esql:execute-query
esql:queryINSERT INTO FavouritesBasketSession(SessionID,
URL) VALUES('xsp-session:get-id/', 'xsp-request:get-attribute
name=relative-url/');/esql:query
  /esql:execute-query
/esql:connection
/xsl:if /xsl:template



When I access some_page.xsp?webaction=add_to_favourites_session, the
template is executed: the xsl:variable is created, but what is inside
the xsl:if *isn't* executed, which suggests that there is a problem with
the xsl:variable. For information, displaying the variable's content
with xsl:copy-of works (it correctly displays
'add_to_favourites_session'), but with xsl:value-of it doesn't display
anything.


The questions:
--
- Why doesn't it work?
- I'm a Cocoon newbie, so if you have any comments on my code (how to
write it better), I'm open to suggestions.


Thanks in advance.


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



lucene and authentication f/w

2003-06-29 Thread rob
Hi,

can anyone advise on the best way to create a lucene
 index of resources that are protected by the authentication
framework ?

Thanks,

Rob Gregory


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



Re: svgz to jpeg ?

2003-06-29 Thread rob
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]



Re: xsp-request:get-parameter into xsl:variable problem

2003-06-29 Thread François Parlant
I'm not an expert (sorry) so this is only a suggestion

1)  some whitespaces might interfere between the string
'add_to_favourites_session' and the value of the $webaction-value variable.
I would suggest a formula more like ;

normalize-space($query)

 xsl:if test=contains(normalize-space($webaction-value),
'add_to_favourites_session')
and contains('add_to_favourites_session',
normalize-space($webaction-value))

...just to make sure.


2) In xsl, calling a variable by xsl:value-of only selects the string part
of the nodes (the text()). It means that if the variable is more than simple
text and include nodes around it or inside it (it's called a node-set or
nodeset because it contains tags and text, hope I'm not making too much
mistakes saying that), only the text will appear when asking for
xsl:value-of.

xsl-copy-of on the other hand, copies all what is inside the variable, nodes
(tags) and text and attributes ...

The best referenc is at the xsl FAQ (in the variable  page):
http://www.dpawson.co.uk/xsl/sect2/N8090.html#d8123e583

Solution (if that is the problem, which is not sure at all):
Most xsl processor have a node-set or nodeset function which is an
extension of the xsl specification. For xalan it's xalan:nodeset, but you've
got some for saxon or xt. (beware, you've got to add the specific namespace
of your processor on top of your page for this tags to be executed)

This stuff enable you to check parts by parts the inside of the variable,
for exemple calling by templates for each part (nodes attributes and text)

Hope it helps, but I guess you might want better information. The xsl list
is very active.

XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

François Parlant


- Original Message - 
From: C Bram Dit Saint Amand [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Sunday, June 29, 2003 10:50 PM
Subject: xsp-request:get-parameter into xsl:variable problem


 This is an extract from request_attributes.xsl, a logicsheet which is
 called by some_page.xsp

 
 xsl:template match=request-attributes:get/webaction
 xsl:variable name=webaction-valuexsp-request:get-parameter
 name=webaction//xsl:variable
 xsl:if test=contains($webaction-value, 'add_to_favourites_session')
 and contains('add_to_favourites_session', $webaction-value)
 esql:connection
   esql:poolperso-mysql/esql:pool
   esql:execute-query
 esql:queryINSERT INTO FavouritesBasketSession(SessionID,
 URL) VALUES('xsp-session:get-id/', 'xsp-request:get-attribute
 name=relative-url/');/esql:query
   /esql:execute-query
 /esql:connection
 /xsl:if /xsl:template
 


 When I access some_page.xsp?webaction=add_to_favourites_session, the
 template is executed: the xsl:variable is created, but what is inside
 the xsl:if *isn't* executed, which suggests that there is a problem with
 the xsl:variable. For information, displaying the variable's content
 with xsl:copy-of works (it correctly displays
 'add_to_favourites_session'), but with xsl:value-of it doesn't display
 anything.


 The questions:
 --
 - Why doesn't it work?
 - I'm a Cocoon newbie, so if you have any comments on my code (how to
 write it better), I'm open to suggestions.


 Thanks in advance.



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



XSP+SVG in cocoon-2.0.4

2003-06-29 Thread Gautam Ganguly
hi there,
I want to display an SVG image along side the web page content on
the users browser(user has Adobe SVG Viewer3.0 installed ) by putting
the SVG document within my XSP page.
As long as  my pipeline displays the svg as png raster image
using the SVG2PNG serializer,it works fine.But the associated image
properties such as Zoom-In or Zoom-out are lost. For the user to keep
using these properties through IE,i want to pass the raw SVG content to
the users browser which then will handle the responsibility of
displaying the SVG .
   
My xsp documents looks something like this:
?xml version=1.0?
xsp:page language=java xmlns:xsp=http://apache.org/xsp;
  document
 header
titleTest SVG Page/title
 /header
 body
 s1 title=SVG Image
   pYou can use the mouse right click event to Zoom-In 
   or Zoom-Out  
   /p 
   p
 img src=batikFX.svg/
   /p
   /s1
 /body
/document
/xsp:page

Currently my sitemap pipeline looks like this:
   map:match pattern=*.svg
   map:generate src=resources/svg/{1}.svg/
map:serialize type=svg2png/
  /map:match

  What is the bext possible way to go about these? Can anyone help me
out on these?

regards,
Gautam






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