Re: i18n

2003-06-25 Thread Konstantin Piroumian



Take a look at i18n transformer 
configuration in your sitemap. Probably it defines the 'untranslated-text' 
parameter which is used instead of the key value.

-- Konstantin

  - Original Message - 
  From: 
  Kavitha Ramesh 
  To: [EMAIL PROTECTED] 
  
  Sent: Tuesday, June 24, 2003 18:30
  Subject: i18n 
  
  Hi,
  
  I read the following in a documentation:
  
  untranslated-text: text used for untranslated keys 
  (default is to output the key name).
  
  But when I dont have translations in my messages.xml, i get something 
  like "untranslated-text".Actually it should display the key name.I use IBM 
  Websphere 4.0 with Cocoon 2.0.
  If someone has any solutions pls tell me.
  
  Regards
  Kavitha Ramesh.
  
  
  Do you Yahoo!?SBC 
  Yahoo! DSL - Now only $29.95 per month!


Re: i18n not working

2003-06-04 Thread Konstantin Piroumian
From: Mato Mira, Fernando [EMAIL PROTECTED]
  From: Mato Mira, Fernando [mailto:[EMAIL PROTECTED]
 
I am placing the i18n transformer just before serialization
  and it's not
  working. The namespace
  is declared in the i18n:translate element itself.
 
  Cocoon version: 2.1m2

 The transformer does not accept the 2.0 namespace. It has to be the 2.1
 for it to work. I guess this is a bug.


Ah, I see.

If you read the warning message carefully, then you'll see that it's not a
bug, but a feature. If you are using i18n transformer from Cocoon 2.1 or
higher then you should update your stylesheets also, because the syntax was
slightly changed and that's why a new namespace used.

I don't think that it was a good decision to drop support for the old
syntax, but otherwise you wouldn't know about the changes in syntax and I
had no enough time to maintain that. Also, I think that it's quite easy to
implement an XSLT stylesheet to make automatic conversion of your pages. Any
help with it is apreciated.

-- Konstantin



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



Re: i18n not working

2003-06-03 Thread Konstantin Piroumian
From: Mato Mira, Fernando [EMAIL PROTECTED]

 Hello

   I am placing the i18n transformer just before serialization and it's not
 working. The namespace
 is declared in the i18n:translate element itself.

Please post the relevant snippet from your XML here.
Having i18n transformer just before serialization is not a problem, that
worked before and hopefully should work now.

Check that you have correct input to the i18n transformer.

Regards,
  Konstantin


 Cocoon version: 2.1m2

 Thanks

 --
 Fernando D. Mato Mira   [EMAIL PROTECTED]
 Thomson Dialog
 www.dialog.com

 E-MAIL NOTICE:
 This message (plus any attachments) is confidential and may be subject
 to lawyer-client privilege.  Use without permission is strictly
 prohibited.


 -
 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: i18n not working

2003-06-03 Thread Mato Mira, Fernando
 From: Mato Mira, Fernando [mailto:[EMAIL PROTECTED]

   I am placing the i18n transformer just before serialization 
 and it's not
 working. The namespace
 is declared in the i18n:translate element itself.
 
 Cocoon version: 2.1m2

The transformer does not accept the 2.0 namespace. It has to be the 2.1
for it to work. I guess this is a bug.

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



Re: i18n translation with attributes: 2 questions

2003-01-30 Thread Joerg Heinicke
Hello Cyril,

Cyril Vidal wrote:

Hi,

If some of you would have some tips for these two questions, I would be very
grateful:

1°) Under Cocoon 2.0.4 and Windows 2000:
 I use a i18n Transformer (with french and english dictionnaries), and all's
working fine with elements' translation. But not for attributes.
I have basicaly a HTML form with a submit button.
As described in the Cocoon's doc, I write the following in my stylesheet to
be translated:
input TYPE=submit NAME=submit i18n:attr=value/

and in my French dictionary:
message key=valueSoumettre la requête/message

in my English dictionary:

message key=valueSubmit the request/message

WHen I call http://localhost:8080/cocoon/tutoriel?locale=fr, I can see the
correct value of the button, ie: 'Soumettre la requête'.
But when I call english translation with
http://localhost:8080/cocoon/tutoriel?locale=en, I still obtain the same
french message, although I've specified the english version for this
button's value in the english dictionary.
Could it have to handle with the xerces's bug described in the doc??


No, it works a bt different with attributes. In i18n:attr=... you 
specify the attributes, that shell be translated. You have value in 
your above example, but there is no attribute value, only TYPE and 
NAME. So change it to i18n:attr=NAME to get the value of the 
attribute NAME translated or add an attribute value, which is used 
for the text on the button AFAIK. Furthermore the value of the attribute 
to translate is the key (above example: NAME=submit = key = 
submit). This key must be used in the dictionary (= message 
key=submit/).
With the Xerces bug you won't get anything as output I think. At least 
you would have a stack trace in the log files.

2°)  In my styleshhet, I've got a second hidden input area.

For each one, I have to use i18n:attr=value in the sitemap and
message key=valueSome text/message in the dictionary, I want to
internationalise both (That's I want to do precisely...).

So, Is it possible to make a difference between them?

FORM METHOD=GET ACTION=

bi18n:textchoix/i18n:text/b

a href=?locale=fri18n:textchoix_langue_fr/i18n:text/a | a
href=?locale=eni18n:textchoix_langue_en/i18n:text/a

input type=hidden name=locale value=fr/ //First attribute value to
internationalise = fr in french and en in english


Knowing the above at 1° this is no longer a problem:

input type=hidden name=locale value=locale i18n:attr=value/
---this is the key^^
dictionary:
message key=localeen/message (or fr in the french dictionary)


fieldset class=etiquette style=padding: 10px; font-weight:bold;
font-family:'Comic Sans MS'; color: #1E94D3 ; border: outset 5px;

legendi18n:texttrier/i18n:text/legend

input TYPE=radio NAME=tri
VALUE=nomi18n:textboutonNom/i18n:text/input

input TYPE=radio NAME=tri
VALUE=prénomi18n:textboutonPrenom/i18n:text/input

input TYPE=radio NAME=tri
VALUE=titrei18n:textboutonTitre/i18n:text/input

input TYPE=radio NAME=tri
VALUE=organismei18n:textboutonOrganisme/i18n:text/input

/fieldset

br/

input TYPE=submit NAME=submit i18n:attr=value/ //Second attribute
ton internationalise: Soumettre la requête in French Submit the request in
English


Same here:
input TYPE=submit NAME=submit value=submit i18n:attr=value/

dictionary:
message key=submitSoumettre la requête/message


/FORM

thanks in advance for your repsnses,

Best,

Cyril.


Regards

Joerg


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: i18n translation with attributes: 2 questions

2003-01-30 Thread Cyril Vidal

Hello Joerg,

Thank you very much for your response.
I think I've done what you told me.
in my stylesheet:

input type=submit name=submit i18n:attr=name/

and in my dictionaries
french:
message key=submitSoumettre la requête/message

english:

message key=submitSubmit the request/message

But unfortunately (I've stopped and restarded Tomcat), I always have the
same french message on the button, even when I ask for the english version!

Did I still make something wrong?

Regards,

Cyril.




 Hello Cyril,

 Cyril Vidal wrote:
  Hi,
 
  If some of you would have some tips for these two questions, I would be
very
  grateful:
 
  1°) Under Cocoon 2.0.4 and Windows 2000:
   I use a i18n Transformer (with french and english dictionnaries), and
all's
  working fine with elements' translation. But not for attributes.
  I have basicaly a HTML form with a submit button.
  As described in the Cocoon's doc, I write the following in my stylesheet
to
  be translated:
  input TYPE=submit NAME=submit i18n:attr=value/
 
  and in my French dictionary:
  message key=valueSoumettre la requête/message
 
  in my English dictionary:
 
  message key=valueSubmit the request/message
 
  WHen I call http://localhost:8080/cocoon/tutoriel?locale=fr, I can see
the
  correct value of the button, ie: 'Soumettre la requête'.
  But when I call english translation with
  http://localhost:8080/cocoon/tutoriel?locale=en, I still obtain the same
  french message, although I've specified the english version for this
  button's value in the english dictionary.
  Could it have to handle with the xerces's bug described in the doc??

 No, it works a bt different with attributes. In i18n:attr=... you
 specify the attributes, that shell be translated. You have value in
 your above example, but there is no attribute value, only TYPE and
 NAME. So change it to i18n:attr=NAME to get the value of the
 attribute NAME translated or add an attribute value, which is used
 for the text on the button AFAIK. Furthermore the value of the attribute
 to translate is the key (above example: NAME=submit = key =
 submit). This key must be used in the dictionary (= message
 key=submit/).
 With the Xerces bug you won't get anything as output I think. At least
 you would have a stack trace in the log files.

  2°)  In my styleshhet, I've got a second hidden input area.
 
  For each one, I have to use i18n:attr=value in the sitemap and
  message key=valueSome text/message in the dictionary, I want to
  internationalise both (That's I want to do precisely...).
 
  So, Is it possible to make a difference between them?
 
  FORM METHOD=GET ACTION=
 
  bi18n:textchoix/i18n:text/b
 
  a href=?locale=fri18n:textchoix_langue_fr/i18n:text/a | a
  href=?locale=eni18n:textchoix_langue_en/i18n:text/a
 
  input type=hidden name=locale value=fr/ //First attribute value
to
  internationalise = fr in french and en in english

 Knowing the above at 1° this is no longer a problem:

 input type=hidden name=locale value=locale i18n:attr=value/
 ---this is the key^^
 dictionary:
 message key=localeen/message (or fr in the french dictionary)

  fieldset class=etiquette style=padding: 10px; font-weight:bold;
  font-family:'Comic Sans MS'; color: #1E94D3 ; border: outset 5px;
 
  legendi18n:texttrier/i18n:text/legend
 
  input TYPE=radio NAME=tri
  VALUE=nomi18n:textboutonNom/i18n:text/input
 
  input TYPE=radio NAME=tri
  VALUE=prénomi18n:textboutonPrenom/i18n:text/input
 
  input TYPE=radio NAME=tri
  VALUE=titrei18n:textboutonTitre/i18n:text/input
 
  input TYPE=radio NAME=tri
  VALUE=organismei18n:textboutonOrganisme/i18n:text/input
 
  /fieldset
 
  br/
 
  input TYPE=submit NAME=submit i18n:attr=value/ //Second
attribute
  ton internationalise: Soumettre la requête in French Submit the request
in
  English

 Same here:
 input TYPE=submit NAME=submit value=submit i18n:attr=value/

 dictionary:
 message key=submitSoumettre la requête/message

  /FORM
 
  thanks in advance for your repsnses,
 
  Best,
 
  Cyril.

 Regards

 Joerg


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




Re: i18n translation with attributes: 2 questions

2003-01-30 Thread Joerg Heinicke
As I mentioned in my last mail, I guess you must use the value 
attribute for changing the text on the button:

input type=submit value=submit i18n:attr=value/

The name is only interesting for DOM processings like 
document.form[0].elements[name of the form element].

Regards,

Joerg

Cyril Vidal wrote:
Hello Joerg,

Thank you very much for your response.
I think I've done what you told me.
in my stylesheet:

input type=submit name=submit i18n:attr=name/

and in my dictionaries
french:
message key=submitSoumettre la requête/message

english:

message key=submitSubmit the request/message

But unfortunately (I've stopped and restarded Tomcat), I always have the
same french message on the button, even when I ask for the english version!

Did I still make something wrong?

Regards,

Cyril.






Hello Cyril,

Cyril Vidal wrote:


Hi,

If some of you would have some tips for these two questions, I would be


very


grateful:

1°) Under Cocoon 2.0.4 and Windows 2000:
I use a i18n Transformer (with french and english dictionnaries), and


all's


working fine with elements' translation. But not for attributes.
I have basicaly a HTML form with a submit button.
As described in the Cocoon's doc, I write the following in my stylesheet


to


be translated:
input TYPE=submit NAME=submit i18n:attr=value/

and in my French dictionary:
message key=valueSoumettre la requête/message

in my English dictionary:

message key=valueSubmit the request/message

WHen I call http://localhost:8080/cocoon/tutoriel?locale=fr, I can see


the


correct value of the button, ie: 'Soumettre la requête'.
But when I call english translation with
http://localhost:8080/cocoon/tutoriel?locale=en, I still obtain the same
french message, although I've specified the english version for this
button's value in the english dictionary.
Could it have to handle with the xerces's bug described in the doc??


No, it works a bt different with attributes. In i18n:attr=... you
specify the attributes, that shell be translated. You have value in
your above example, but there is no attribute value, only TYPE and
NAME. So change it to i18n:attr=NAME to get the value of the
attribute NAME translated or add an attribute value, which is used
for the text on the button AFAIK. Furthermore the value of the attribute
to translate is the key (above example: NAME=submit = key =
submit). This key must be used in the dictionary (= message
key=submit/).
With the Xerces bug you won't get anything as output I think. At least
you would have a stack trace in the log files.



2°)  In my styleshhet, I've got a second hidden input area.

For each one, I have to use i18n:attr=value in the sitemap and
message key=valueSome text/message in the dictionary, I want to
internationalise both (That's I want to do precisely...).

So, Is it possible to make a difference between them?

FORM METHOD=GET ACTION=

bi18n:textchoix/i18n:text/b

a href=?locale=fri18n:textchoix_langue_fr/i18n:text/a | a
href=?locale=eni18n:textchoix_langue_en/i18n:text/a

input type=hidden name=locale value=fr/ //First attribute value


to


internationalise = fr in french and en in english


Knowing the above at 1° this is no longer a problem:

input type=hidden name=locale value=locale i18n:attr=value/
---this is the key^^
dictionary:
message key=localeen/message (or fr in the french dictionary)



fieldset class=etiquette style=padding: 10px; font-weight:bold;
font-family:'Comic Sans MS'; color: #1E94D3 ; border: outset 5px;

legendi18n:texttrier/i18n:text/legend

input TYPE=radio NAME=tri
VALUE=nomi18n:textboutonNom/i18n:text/input

input TYPE=radio NAME=tri
VALUE=prénomi18n:textboutonPrenom/i18n:text/input

input TYPE=radio NAME=tri
VALUE=titrei18n:textboutonTitre/i18n:text/input

input TYPE=radio NAME=tri
VALUE=organismei18n:textboutonOrganisme/i18n:text/input

/fieldset

br/

input TYPE=submit NAME=submit i18n:attr=value/ //Second


attribute


ton internationalise: Soumettre la requête in French Submit the request


in


English


Same here:
input TYPE=submit NAME=submit value=submit i18n:attr=value/

dictionary:
message key=submitSoumettre la requête/message


/FORM

thanks in advance for your repsnses,

Best,

Cyril.


Regards

Joerg


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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





-
Please check that your question  has not already been 

Re: i18n + XSLT transformation

2003-01-30 Thread Joerg Heinicke
Hello Cyril,

found this message just now (I still have nearly 500 unread Cocoon 
messages since the weekend). Did you solve the problem? The sitemap 
looks ok, maybe the namespace declaration in the XSLT is wrong?

Joerg

Cyril Vidal wrote:
Hi,

Just to go more deeply into Cocoon's comprehension, I've yesterday built a
little example with the load of two differents stylesheets
(participantsFR.xsl and participantsEN.xsl) depending of the value of a
parameter passed in HTTP Request, and with the help of this mailing-list,
I've achieved this.

Now, I would like to perform exactly the same task, but by another way: via
the use of i18n Transformer.

To translate a static xml file, I've no difficult, and the following except
of sitemap.xmap, (supposed I've created a catalogue directory named
translation with message_en.xml and message_fr.xml) works well:

map:match pattern=try_it

map:generate src=documents/essai.xml/

map:transform type=i18n

map:parameter name=use-request-parameters value=true/

/map:transform

map:serialize type=xml/

/map:match

The following adresses
http://localhost:8080/cocoon/hellococoon/try_it?locale=fr and
http://localhost:8080/cocoon/hellococoon/try_it?locale=en display the
specified translation.



But now, I would like to mix a XSLT transformation with the i18n
Transformation. (I mean, the different

i18n:texttext to be translated/i18n:text  appear now in the XSLT file
participantsIN.xsl)

To perform this task, I've tried the following code (overlapping the i18n
transformation inside the XSLT transformation...):

map:match pattern=try_it1

map:parameter name=parameters value=true/

map:generate src=documents/participants.xml/

map:transform src=stylesheets/participantsIN.xsl

map:transform type=i18n

map:parameter name=use-request-parameters value=true/

/map:transform

/map:transform

map:serialize type=html/

/map:match

But when I try by example the following adress:

http://localhost:8080/cocoon/hellococoon/try_it1?locale=en

I receive no error message but nor is the i18n transformation done:

I the HTML result, I have all my i18n:texttext to be
translated/i18n:text elements, without any effective translation.

Waht I have to change in sitemap to fix the problem?

Thanks again for your help,

Cyril.



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: i18n translation with attributes: 2 questions

2003-01-30 Thread Cyril Vidal
Yes, of course;-)) it runs well now..
Thanks for your help, Joerg.

PS:Something quite strange is happening: I see the answers of my messages
but not my messages themselves on the mailing-list...

- Original Message -
From: Joerg Heinicke [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 30, 2003 8:33 PM
Subject: Re: i18n translation with attributes: 2 questions


 As I mentioned in my last mail, I guess you must use the value
 attribute for changing the text on the button:

 input type=submit value=submit i18n:attr=value/

 The name is only interesting for DOM processings like
 document.form[0].elements[name of the form element].

 Regards,

 Joerg

 Cyril Vidal wrote:
  Hello Joerg,
 
  Thank you very much for your response.
  I think I've done what you told me.
  in my stylesheet:
 
  input type=submit name=submit i18n:attr=name/
 
  and in my dictionaries
  french:
  message key=submitSoumettre la requête/message
 
  english:
 
  message key=submitSubmit the request/message
 
  But unfortunately (I've stopped and restarded Tomcat), I always have the
  same french message on the button, even when I ask for the english
version!
 
  Did I still make something wrong?
 
  Regards,
 
  Cyril.
 
 
 
 
 
 Hello Cyril,
 
 Cyril Vidal wrote:
 
 Hi,
 
 If some of you would have some tips for these two questions, I would be
 
  very
 
 grateful:
 
 1°) Under Cocoon 2.0.4 and Windows 2000:
  I use a i18n Transformer (with french and english dictionnaries), and
 
  all's
 
 working fine with elements' translation. But not for attributes.
 I have basicaly a HTML form with a submit button.
 As described in the Cocoon's doc, I write the following in my
stylesheet
 
  to
 
 be translated:
 input TYPE=submit NAME=submit i18n:attr=value/
 
 and in my French dictionary:
 message key=valueSoumettre la requête/message
 
 in my English dictionary:
 
 message key=valueSubmit the request/message
 
 WHen I call http://localhost:8080/cocoon/tutoriel?locale=fr, I can see
 
  the
 
 correct value of the button, ie: 'Soumettre la requête'.
 But when I call english translation with
 http://localhost:8080/cocoon/tutoriel?locale=en, I still obtain the
same
 french message, although I've specified the english version for this
 button's value in the english dictionary.
 Could it have to handle with the xerces's bug described in the doc??
 
 No, it works a bt different with attributes. In i18n:attr=... you
 specify the attributes, that shell be translated. You have value in
 your above example, but there is no attribute value, only TYPE and
 NAME. So change it to i18n:attr=NAME to get the value of the
 attribute NAME translated or add an attribute value, which is used
 for the text on the button AFAIK. Furthermore the value of the attribute
 to translate is the key (above example: NAME=submit = key =
 submit). This key must be used in the dictionary (= message
 key=submit/).
 With the Xerces bug you won't get anything as output I think. At least
 you would have a stack trace in the log files.
 
 
 2°)  In my styleshhet, I've got a second hidden input area.
 
 For each one, I have to use i18n:attr=value in the sitemap and
 message key=valueSome text/message in the dictionary, I want to
 internationalise both (That's I want to do precisely...).
 
 So, Is it possible to make a difference between them?
 
 FORM METHOD=GET ACTION=
 
 bi18n:textchoix/i18n:text/b
 
 a href=?locale=fri18n:textchoix_langue_fr/i18n:text/a | a
 href=?locale=eni18n:textchoix_langue_en/i18n:text/a
 
 input type=hidden name=locale value=fr/ //First attribute value
 
  to
 
 internationalise = fr in french and en in english
 
 Knowing the above at 1° this is no longer a problem:
 
 input type=hidden name=locale value=locale i18n:attr=value/
 ---this is the key^^
 dictionary:
 message key=localeen/message (or fr in the french dictionary)
 
 
 fieldset class=etiquette style=padding: 10px; font-weight:bold;
 font-family:'Comic Sans MS'; color: #1E94D3 ; border: outset 5px;
 
 legendi18n:texttrier/i18n:text/legend
 
 input TYPE=radio NAME=tri
 VALUE=nomi18n:textboutonNom/i18n:text/input
 
 input TYPE=radio NAME=tri
 VALUE=prénomi18n:textboutonPrenom/i18n:text/input
 
 input TYPE=radio NAME=tri
 VALUE=titrei18n:textboutonTitre/i18n:text/input
 
 input TYPE=radio NAME=tri
 VALUE=organismei18n:textboutonOrganisme/i18n:text/input
 
 /fieldset
 
 br/
 
 input TYPE=submit NAME=submit i18n:attr=value/ //Second
 
  attribute
 
 ton internationalise: Soumettre la requête in French Submit the request
 
  in
 
 English
 
 Same here:
 input TYPE=submit NAME=submit value=submit i18n:attr=value/
 
 dictionary:
 message key=submitSoumettre la requête/message
 
 /FORM
 
 thanks in advance for your repsnses,
 
 Best,
 
 Cyril.
 
 Regards
 
 Joerg
 
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org

Re: i18n + XSLT transformation

2003-01-30 Thread Cyril Vidal
Thanks for your help Joerg!!

Yes, I found a solution to my problem but I can't really explain it...

This runs well:
map:match pattern=essai1

map:generate src=documents/participants.xml/

map:transform src=stylesheets/participantsINT.xsl
type=xslt-with-parameters/

map:transform type=i18n

/map:transform

map:serialize type=html/

/map:match

with the declaration of transformer xslt-with-param as bellow:

map:transformer name=xslt-with-parameters
src=org.apache.cocoon.transformation.TraxTransformer

use-request-parameterstrue/use-request-parameters

/map:transformer



but this does'nt work:

map:match pattern=essai1

map:generate src=documents/participants.xml/

map:transform src=stylesheets/participantsINT.xsl

map:parameter name=use-request-parameters value=true/

map:transform type=i18n

/map:transform

map:serialize type=html/

/map:match

map:transform type=i18n

/map:transform

map:serialize type=html/

/map:match

I thought both syntaxes were valid, aren't they?

Regards,

Cyril.

- Original Message -
From: Joerg Heinicke [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 30, 2003 8:36 PM
Subject: Re: i18n + XSLT transformation


 Hello Cyril,

 found this message just now (I still have nearly 500 unread Cocoon
 messages since the weekend). Did you solve the problem? The sitemap
 looks ok, maybe the namespace declaration in the XSLT is wrong?

 Joerg

 Cyril Vidal wrote:
  Hi,
 
  Just to go more deeply into Cocoon's comprehension, I've yesterday built
a
  little example with the load of two differents stylesheets
  (participantsFR.xsl and participantsEN.xsl) depending of the value of a
  parameter passed in HTTP Request, and with the help of this
mailing-list,
  I've achieved this.
 
  Now, I would like to perform exactly the same task, but by another way:
via
  the use of i18n Transformer.
 
  To translate a static xml file, I've no difficult, and the following
except
  of sitemap.xmap, (supposed I've created a catalogue directory named
  translation with message_en.xml and message_fr.xml) works well:
 
  map:match pattern=try_it
 
  map:generate src=documents/essai.xml/
 
  map:transform type=i18n
 
  map:parameter name=use-request-parameters value=true/
 
  /map:transform
 
  map:serialize type=xml/
 
  /map:match
 
  The following adresses
  http://localhost:8080/cocoon/hellococoon/try_it?locale=fr and
  http://localhost:8080/cocoon/hellococoon/try_it?locale=en display the
  specified translation.
 
 
 
  But now, I would like to mix a XSLT transformation with the i18n
  Transformation. (I mean, the different
 
  i18n:texttext to be translated/i18n:text  appear now in the XSLT
file
  participantsIN.xsl)
 
  To perform this task, I've tried the following code (overlapping the
i18n
  transformation inside the XSLT transformation...):
 
  map:match pattern=try_it1
 
  map:parameter name=parameters value=true/
 
  map:generate src=documents/participants.xml/
 
  map:transform src=stylesheets/participantsIN.xsl
 
  map:transform type=i18n
 
  map:parameter name=use-request-parameters value=true/
 
  /map:transform
 
  /map:transform
 
  map:serialize type=html/
 
  /map:match
 
  But when I try by example the following adress:
 
  http://localhost:8080/cocoon/hellococoon/try_it1?locale=en
 
  I receive no error message but nor is the i18n transformation done:
 
  I the HTML result, I have all my i18n:texttext to be
  translated/i18n:text elements, without any effective translation.
 
  Waht I have to change in sitemap to fix the problem?
 
  Thanks again for your help,
 
  Cyril.


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




Re: i18n + XSLT transformation

2003-01-30 Thread Joerg Heinicke
Oh, I didn't see that in the original mail. Your elements are wrongly 
nested. map:transform/ in map:transform/ is not possible.

map:match pattern=essai1
  map:generate src=documents/participants.xml/
  map:transform src=stylesheets/participantsINT.xsl
map:parameter name=use-request-parameters value=true/
  /map:transform
  map:transform type=i18n/
  map:serialize type=html/
/map:match

So it should work. Do you really need the request parameters in XSL? 
Because XSLT is always cached with the passed params, you thwart more or 
less effective caching.

Regards,

Joerg

Cyril Vidal wrote:
Thanks for your help Joerg!!

Yes, I found a solution to my problem but I can't really explain it...

This runs well:
map:match pattern=essai1

map:generate src=documents/participants.xml/

map:transform src=stylesheets/participantsINT.xsl
type=xslt-with-parameters/

map:transform type=i18n

/map:transform

map:serialize type=html/

/map:match

with the declaration of transformer xslt-with-param as bellow:

map:transformer name=xslt-with-parameters
src=org.apache.cocoon.transformation.TraxTransformer

use-request-parameterstrue/use-request-parameters

/map:transformer



but this does'nt work:

map:match pattern=essai1

map:generate src=documents/participants.xml/

map:transform src=stylesheets/participantsINT.xsl

map:parameter name=use-request-parameters value=true/

map:transform type=i18n

/map:transform

map:serialize type=html/

/map:match

map:transform type=i18n

/map:transform

map:serialize type=html/

/map:match

I thought both syntaxes were valid, aren't they?

Regards,

Cyril.

- Original Message -
From: Joerg Heinicke [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, January 30, 2003 8:36 PM
Subject: Re: i18n + XSLT transformation




Hello Cyril,

found this message just now (I still have nearly 500 unread Cocoon
messages since the weekend). Did you solve the problem? The sitemap
looks ok, maybe the namespace declaration in the XSLT is wrong?

Joerg

Cyril Vidal wrote:


Hi,

Just to go more deeply into Cocoon's comprehension, I've yesterday built


a


little example with the load of two differents stylesheets
(participantsFR.xsl and participantsEN.xsl) depending of the value of a
parameter passed in HTTP Request, and with the help of this


mailing-list,


I've achieved this.

Now, I would like to perform exactly the same task, but by another way:


via


the use of i18n Transformer.

To translate a static xml file, I've no difficult, and the following


except


of sitemap.xmap, (supposed I've created a catalogue directory named
translation with message_en.xml and message_fr.xml) works well:

map:match pattern=try_it

map:generate src=documents/essai.xml/

map:transform type=i18n

map:parameter name=use-request-parameters value=true/

/map:transform

map:serialize type=xml/

/map:match

The following adresses
http://localhost:8080/cocoon/hellococoon/try_it?locale=fr and
http://localhost:8080/cocoon/hellococoon/try_it?locale=en display the
specified translation.



But now, I would like to mix a XSLT transformation with the i18n
Transformation. (I mean, the different

i18n:texttext to be translated/i18n:text  appear now in the XSLT


file


participantsIN.xsl)

To perform this task, I've tried the following code (overlapping the


i18n


transformation inside the XSLT transformation...):

map:match pattern=try_it1

map:parameter name=parameters value=true/

map:generate src=documents/participants.xml/

map:transform src=stylesheets/participantsIN.xsl

map:transform type=i18n

map:parameter name=use-request-parameters value=true/

/map:transform

/map:transform

map:serialize type=html/

/map:match

But when I try by example the following adress:

http://localhost:8080/cocoon/hellococoon/try_it1?locale=en

I receive no error message but nor is the i18n transformation done:

I the HTML result, I have all my i18n:texttext to be
translated/i18n:text elements, without any effective translation.

Waht I have to change in sitemap to fix the problem?

Thanks again for your help,

Cyril.



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.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/faq/index.html

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

Re: i18n problem with i18n:attr : ArrayIndexOutOfBoundsException

2003-01-22 Thread Konstantin Piroumian
A typical parser/classpath problem.
You'll find the answer here (scroll to the bottom):

http://wiki.cocoondev.org/Wiki.jsp?page=FAQs

--
  Konstantin

- Original Message -
From: Thomas Haselberger [EMAIL PROTECTED]
To: Cocoon-Users (E-mail) [EMAIL PROTECTED]
Sent: Tuesday, January 21, 2003 12:52
Subject: i18n problem with i18n:attr : ArrayIndexOutOfBoundsException


I use cocoon 2.0.4 in tomcat 4.1.18 with j2sdk1.4.0_03.

the i18n samples that use i18n:attr work ok, but my i18n transformation
throws an
ArrayIndexOutOfBoundsException.

this is my source xml:
=
?xml version=1.0 encoding=UTF-8?

wml xmlns:i18n=http://apache.org/cocoon/i18n/2.0;
  card i18n:attr=title title=ol id=main
p mode=nowrap
  emi18n:textol/i18n:text/em
  br/a href=new/1/i18n:textnew/i18n:text/a
/p
  /card
/wml
=

this is my sitemap matcher entry:
=
!-- i18n test --
map:match pattern=**i18ntest**
  map:generate src=content/wml_for_i18n.xml/
  map:transform type=i18n label=rmns/
  map:serialize type=xml/
/map:match
=

and that's the error log entry generated:
=
ERROR   (2003-01-21) 10:50.44:761   [sitemap] (/idc/i18ntest/bla)
Thread-15/sitemap_xmap: Sitemap
org.apache.cocoon.ProcessingException: Exception during processing of
file:/D:/java/jakarta-tomcat-4.1.18/webapps/idc/content/wml_for_i18n.xml:
java.lang.ArrayIndexOutOfBoundsException
at
org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStrea
mSource.java:214)
at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:143)
at
org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEv
entPipeline.java:250)
at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingS
treamPipeline.java:395)
at
org.apache.cocoon.www.sitemap_xmap.matchN400126(D:\java\jakarta-tomcat-4.1.1
8\work\Standalone\localhost\idc\cocoon-files\org/apache/cocoon/www\sitemap_x
map.java:1345)
at
org.apache.cocoon.www.sitemap_xmap.process(D:\java\jakarta-tomcat-4.1.18\wor
k\Standalone\localhost\idc\cocoon-files\org/apache/cocoon/www\sitemap_xmap.j
ava:1185)
at
org.apache.cocoon.www.sitemap_xmap.process(D:\java\jakarta-tomcat-4.1.18\wor
k\Standalone\localhost\idc\cocoon-files\org/apache/cocoon/www\sitemap_xmap.j
ava:1128)
at org.apache.cocoon.sitemap.Handler.process(Handler.java:227)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:173)
at org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:152)
at org.apache.cocoon.Cocoon.process(Cocoon.java:579)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1043)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415
)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at 

RE: i18n more!!!!!!!!! :(

2003-01-22 Thread Alireza Fattahi
Title: i18n more! :(









See: http://www.anassina.com/struts/i18n/i18n.html



-Original Message-
From: Hong Gia Dinh
[mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, January 22, 2003 2:29 PM
To: [EMAIL PROTECTED]
Subject: i18n more! :(



Hi all 

I am deploying my application on JBoss 3.0.4 and jdk
1.4 and cocoon 2.0.4 
i can set and change language with
static values OK but! 
when my request sent with unicode
value and CR values in the text , the ressponse always displays error
characters and all CR are deleted!! ???

i dont know how to fix it as wella s sometimes it
keeps on confuses between {../../locale} and {../../../locale}when
upgrading cocoon version??? why? i am nearly dont know how and why those
bug, althpough i read all cocoon examples carefully??

cant you all tell me how to fix those bugs???


All your information are very appreciated!!

thanks a lot much! 

GD 








Re: i18n again

2003-01-16 Thread Konstantin Piroumian
Title: i18n again



Currently there is no way to do it.
It was in my todo list fora long time and probably 
someday or someone will implement multiple dictionary support (or dictionary 
include/import) capabilities. I'll take a look at it if I have 
time.

Another possibility is to use aggregation of dictionaries and 
use 'cocoon:/' protocol to specify the catalogue location.

Konstantin

  - Original Message - 
  From: 
  Hong Gia Dinh 
  
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, January 16, 2003 
  04:38
  Subject: RE: i18n again
  
  Thanks. I had a look there and also applied it! 
  I 
  have a question, can i have a common.xml and common_xx.xml including common 
  vocabularies that will be used in many files!! (the example uses aggregate to 
  get it) but in case i dont use aggregate, so how can i use??? (i dont want to 
  copy and paste common vocabularies in for example search_xx.xml, edit_xx.xml 
  . . .)
  
  Thanks a lot in advance
  GD
  
-Original Message-From: Konstantin Piroumian 
[mailto:[EMAIL PROTECTED]]Sent: 14 January 2003 
15:35To: [EMAIL PROTECTED]Subject: Re: i18n 
again
Again, please take a look at i18n samples (either in 2.0.3 
or 2.1 versions) and you'll see that it's possible to specify the message 
catalogue name on pipeline level, so you can have different pipelines using 
different message catalogues. In i18n samples there are two message 
catalogues: messages_xx.xml and menu_xx.xml and they are used in different 
pipelines.

Konstantin

  - Original Message - 
  From: 
  Hong Gia 
  Dinh 
  To: [EMAIL PROTECTED] 
  
  Sent: Tuesday, January 14, 2003 
  06:32
  Subject: i18n again
  
  Hi all, 
  I have rather large messages files! Can i have any way 
  to define many messages for each language??? My 
  messages_en.xml contains too many data! and i dont want a too large 
  message, because it is very hard to managed and supervised! now i want to 
  separate into number of messages such as messages_en_1.xml 
  messages_en_1_1.xml . . . . can i do something like that or can i separate 
  into small files to manage clearer?
  Thanks a lot in advance GD 
  


RE: i18n again

2003-01-16 Thread Hong Gia Dinh
Title: i18n again



Thanks 
a lot
GD

  -Original Message-From: Konstantin Piroumian 
  [mailto:[EMAIL PROTECTED]]Sent: 16 January 2003 
  16:05To: [EMAIL PROTECTED]Subject: Re: i18n 
  again
  Currently there is no way to do it.
  It was in my todo list fora long time and probably 
  someday or someone will implement multiple dictionary support (or dictionary 
  include/import) capabilities. I'll take a look at it if I have 
  time.
  
  Another possibility is to use aggregation of dictionaries 
  and use 'cocoon:/' protocol to specify the catalogue location.
  
  Konstantin
  
- Original Message - 
From: 
Hong Gia Dinh 

To: [EMAIL PROTECTED] 

Sent: Thursday, January 16, 2003 
04:38
Subject: RE: i18n again

Thanks. I had a look there and also applied it! 
I 
have a question, can i have a common.xml and common_xx.xml including common 
vocabularies that will be used in many files!! (the example uses aggregate 
to get it) but in case i dont use aggregate, so how can i use??? (i dont 
want to copy and paste common vocabularies in for example search_xx.xml, 
edit_xx.xml . . .)

Thanks a lot in advance
GD

  -Original Message-From: Konstantin Piroumian 
  [mailto:[EMAIL PROTECTED]]Sent: 14 January 2003 
  15:35To: [EMAIL PROTECTED]Subject: Re: 
  i18n again
  Again, please take a look at i18n samples (either in 
  2.0.3 or 2.1 versions) and you'll see that it's possible to specify the 
  message catalogue name on pipeline level, so you can have different 
  pipelines using different message catalogues. In i18n samples there are 
  two message catalogues: messages_xx.xml and menu_xx.xml and they are used 
  in different pipelines.
  
  Konstantin
  
- Original Message - 
From: 
Hong Gia 
Dinh 
To: [EMAIL PROTECTED] 

Sent: Tuesday, January 14, 2003 
06:32
Subject: i18n again

Hi all, 
I have rather large messages files! Can i have any 
way to define many messages for each language??? My messages_en.xml contains too many data! and i dont want a too 
large message, because it is very hard to managed and supervised! now i 
want to separate into number of messages such as messages_en_1.xml 
messages_en_1_1.xml . . . . can i do something like that or can i 
separate into small files to manage clearer?
Thanks a lot in advance GD 



RE: i18n again

2003-01-15 Thread Hong Gia Dinh
Title: i18n again



Thanks. I had a look there and also applied it! 
I have 
a question, can i have a common.xml and common_xx.xml including common 
vocabularies that will be used in many files!! (the example uses aggregate to 
get it) but in case i dont use aggregate, so how can i use??? (i dont want to 
copy and paste common vocabularies in for example search_xx.xml, edit_xx.xml 
. . .)

Thanks 
a lot in advance
GD

  -Original Message-From: Konstantin Piroumian 
  [mailto:[EMAIL PROTECTED]]Sent: 14 January 2003 
  15:35To: [EMAIL PROTECTED]Subject: Re: i18n 
  again
  Again, please take a look at i18n samples (either in 2.0.3 
  or 2.1 versions) and you'll see that it's possible to specify the message 
  catalogue name on pipeline level, so you can have different pipelines using 
  different message catalogues. In i18n samples there are two message 
  catalogues: messages_xx.xml and menu_xx.xml and they are used in different 
  pipelines.
  
  Konstantin
  
- Original Message - 
From: 
Hong Gia Dinh 

To: [EMAIL PROTECTED] 

Sent: Tuesday, January 14, 2003 
06:32
Subject: i18n again

Hi all, 
I have rather large messages files! Can i have any way 
to define many messages for each language??? My 
messages_en.xml contains too many data! and i dont want a too large message, 
because it is very hard to managed and supervised! now i want to separate 
into number of messages such as messages_en_1.xml messages_en_1_1.xml . . . 
. can i do something like that or can i separate into small files to manage 
clearer?
Thanks a lot in advance GD 



Re: i18n again

2003-01-14 Thread Konstantin Piroumian
Title: i18n again



Again, please take a look at i18n samples (either in 2.0.3 or 
2.1 versions) and you'll see that it's possible to specify the message catalogue 
name on pipeline level, so you can have different pipelines using different 
message catalogues. In i18n samples there are two message catalogues: 
messages_xx.xml and menu_xx.xml and they are used in different 
pipelines.

Konstantin

  - Original Message - 
  From: 
  Hong Gia Dinh 
  
  To: [EMAIL PROTECTED] 
  
  Sent: Tuesday, January 14, 2003 
  06:32
  Subject: i18n again
  
  Hi all, 
  I have rather large messages files! Can i have any way to 
  define many messages for each language??? My 
  messages_en.xml contains too many data! and i dont want a too large message, 
  because it is very hard to managed and supervised! now i want to separate into 
  number of messages such as messages_en_1.xml messages_en_1_1.xml . . . . can i 
  do something like that or can i separate into small files to manage 
  clearer?
  Thanks a lot in advance GD 



Re: i18n again!!!!

2003-01-13 Thread Kim Jelmoni

you can for example:

in xml :

?xml version=1.0 encoding=UTF-8?

imageheader xmlns:i18n=http://apache.org/cocoon/i18n/2.0;
  topmenu name=HEADER_CHLOCALE_G i18n:attr=name
target=groups.html?locale=de_CH height=7 width=10/
  topmenu name=HEADER_CHLOCALE_F i18n:attr=name
target=groups.html?locale=fr_CH height=7 width=11/
  topmenu name=HEADER_CHLOCALE_E i18n:attr=name
target=groups.html?locale=en_CH height=7 width=11/
/imageheader

and in message catalog file :

message key=HEADER_CHLOCALE_Gimages/de.gif/message


On Tue, 2003-01-14 at 04:57, Hong Gia Dinh wrote:
 Hi all,
 I know that we can change language from text, button, attribute 
 now if i want to change image according to languages!!! because some
 of my images having the text on it!! how can i do that?? with cocoon
 2.0.3 ??
 because i cant use i18n:when in cocoon 2.0.3 how can i change image
 as well as i change the text 
  
 Thanks a lot
 GD


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: i18n Transformation problem

2003-01-08 Thread Konstantin Piroumian
From: Murari Dhoot [EMAIL PROTECTED]

 Hello Friends,
 I am applying a i18n Transformation on the following button

   input value=Search type=submit name=cocoon-action
 i18n:attr=value/input

 Actually depending upon the value of Button i.e. Search , i am calling a
 method, but if i apply i18n transformaion the value of button changed and
i
 m not able to call that method.
 So what i need display value of button should change but passing value
 should always be Search using i18n???
 how to do this

Take a look at MultiAction and use this:
   input value=Search type=submit name=cocoon-action-search
 i18n:attr=value/input

then use the name of the button and not the value to call a method.

Hope this helps.

Konstantin

 Thanks in advance


 Thanks and Regards,
 Murari Dhoot



 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




Re: i18n catalogue and sql

2003-01-08 Thread Konstantin Piroumian
From: Cocoon User [EMAIL PROTECTED]

 hi martin this is a way to send a parameter inside your xsl file (pretty
 good) but i need something else

 i want to use a request parameter as a variable inside my sitemap

 example

 if i have http://../...?locale=el

 src={locale}_data.xml

 point to el_data.xml

 (i have do something similar using a action just like in i18n example from
 2.1 version of cocoon but i'm wondering if there is another way to do this
 without action)

Another possibility is to create an InputModule that will act exactly like
the LocaleAction, so you'll be able to use it like this:

src={i18n:locale}_data.xml

and even now you can use the 'request-param' module for that:

src={request-param:locale}_data.xml

Konstantin


 thnx stavros


 On 5 Jan 2003, Martin Lüthi wrote:

 
  You can use the request parameter like this:
 
map:transform src=stylesheets/mystyle.xsl
   map:parameter name=use-request-parameters value=true/
   map:parameter name=region value={request:locale}/
/map:transform
 
  Cheers Martin
 
 
  Cocoon User [EMAIL PROTECTED] writes:
 
   i know how to make a src file selection based to requested url using
   matches
  
   http://./el/test
   http://./en/test
  
   map:match pattern=*/*
   map:generate src={1}_{2}.xml/
   /map:patch
  
   but how can do  something similar using parameter?
  
   http:///test?locale=el
   http:///test?locale=en
  
   using {1} or {2} i refer to first or second * in pattern
   but how can i refer to locale prameter value inside map:match/ ?
 
 


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: i18n catalogue and sql [act howto]

2003-01-08 Thread Cocoon User

hi konstantin

i plan to create an action that will create sitiemap variables for
specific request-parameters not for use only with i18n

is there any simple action or any howto create an action for cocoon?
i need just a point to start form (something for example)


thnx
stavros

On Wed, 8 Jan 2003, Konstantin Piroumian wrote:

 From: Cocoon User [EMAIL PROTECTED]

  hi martin this is a way to send a parameter inside your xsl file (pretty
  good) but i need something else
 
  i want to use a request parameter as a variable inside my sitemap
 
  example
 
  if i have http://../...?locale=el
 
  src={locale}_data.xml
 
  point to el_data.xml
 
  (i have do something similar using a action just like in i18n example from
  2.1 version of cocoon but i'm wondering if there is another way to do this
  without action)

 Another possibility is to create an InputModule that will act exactly like
 the LocaleAction, so you'll be able to use it like this:

 src={i18n:locale}_data.xml

 and even now you can use the 'request-param' module for that:

 src={request-param:locale}_data.xml

 Konstantin

 
  thnx stavros
 
 
  On 5 Jan 2003, Martin Lüthi wrote:
 
  
   You can use the request parameter like this:
  
 map:transform src=stylesheets/mystyle.xsl
map:parameter name=use-request-parameters value=true/
map:parameter name=region value={request:locale}/
 /map:transform
  
   Cheers Martin
  
  
   Cocoon User [EMAIL PROTECTED] writes:
  
i know how to make a src file selection based to requested url using
matches
   
http://./el/test
http://./en/test
   
map:match pattern=*/*
map:generate src={1}_{2}.xml/
/map:patch
   
but how can do  something similar using parameter?
   
http:///test?locale=el
http:///test?locale=en
   
using {1} or {2} i refer to first or second * in pattern
but how can i refer to locale prameter value inside map:match/ ?
  
  


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




Re: i18n catalogue and sql [act howto]

2003-01-08 Thread Konstantin Piroumian
From: Cocoon User [EMAIL PROTECTED]


 hi konstantin

 i plan to create an action that will create sitiemap variables for
 specific request-parameters not for use only with i18n

There is already such action in Cocoon:
src\java\org\apache\cocoon\acting\RequestParamAction.java

But I'd prefer to use already implemented input module, which looks much
better in the sitemap.

Konstantin


 is there any simple action or any howto create an action for cocoon?
 i need just a point to start form (something for example)


 thnx
 stavros

 On Wed, 8 Jan 2003, Konstantin Piroumian wrote:

  From: Cocoon User [EMAIL PROTECTED]
 
   hi martin this is a way to send a parameter inside your xsl file
(pretty
   good) but i need something else
  
   i want to use a request parameter as a variable inside my sitemap
  
   example
  
   if i have http://../...?locale=el
  
   src={locale}_data.xml
  
   point to el_data.xml
  
   (i have do something similar using a action just like in i18n example
from
   2.1 version of cocoon but i'm wondering if there is another way to do
this
   without action)
 
  Another possibility is to create an InputModule that will act exactly
like
  the LocaleAction, so you'll be able to use it like this:
 
  src={i18n:locale}_data.xml
 
  and even now you can use the 'request-param' module for that:
 
  src={request-param:locale}_data.xml
 
  Konstantin
 
  
   thnx stavros
  
  
   On 5 Jan 2003, Martin Lüthi wrote:
  
   
You can use the request parameter like this:
   
  map:transform src=stylesheets/mystyle.xsl
 map:parameter name=use-request-parameters value=true/
 map:parameter name=region value={request:locale}/
  /map:transform
   
Cheers Martin
   
   
Cocoon User [EMAIL PROTECTED] writes:
   
 i know how to make a src file selection based to requested url
using
 matches

 http://./el/test
 http://./en/test

 map:match pattern=*/*
 map:generate src={1}_{2}.xml/
 /map:patch

 but how can do  something similar using parameter?

 http:///test?locale=el
 http:///test?locale=en

 using {1} or {2} i refer to first or second * in pattern
 but how can i refer to locale prameter value inside map:match/ ?
   
   
 
 
  -
  Please check that your question  has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.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/faq/index.html

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




RE: i18n in combination with xsp:attribute

2003-01-07 Thread Nico Bekema
Hi,

unfortunately that did not help and I am still wondering what is causing this.

i18n:text
  xsp:attribute name=key prefix=i18n
myKey
  /xsp:attribute
  defaultValue
/i18n:text

This always results in the defaultValue (myKey is defined)
If I look at the an intermediate result using a cocoon view it all looks fine but the 
end result will always return defaultValue.
Just using:
i18n:text i18n:key=myKey
  defaultValue
/i18n:text
does result in the translated text using myKey.

thx,
Nico


 [EMAIL PROTECTED] 01/07/03 12:15AM 

From:   [EMAIL PROTECTED]
Sent:   Tuesday, January 07, 2003 12:15 AM
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Subject:RE: i18n in combination with xsp:attribute
Priority:   Normal

Hi Nico,

I believe the problem is in trying to set the namespace via the name
attribute.  xsp:attribute has two attributes (uri and prefix) for setting
the namespace.  Go to this page:

http://wiki.cocoondev.org/Wiki.jsp?page=XSPSyntax 

And scroll down to the section on xsp:attribute.  Hope that helps!

Harry


-Original Message-
From: Nico Bekema [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 06, 2003 4:48 PM
To: [EMAIL PROTECTED] 
Subject: i18n in combination with xsp:attribute


Hi,

can somebody explain to me why the following piece of xsp does not work

i18n:text
  xsp:attribute name=i18n:key
myKey
  /xsp:attribute
  defaultValue
/i18n:text

while this piece does work

i18n:text i18n:key=myKey
  defaultValue
/i18n:text

I would like to dynamically create the i18n:text element by getting the
i18n:key and the default value from a database.

thx,
Nico


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.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/faq/index.html

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




RE: i18n in combination with xsp:attribute

2003-01-07 Thread Lai, Harry
Hi Nico,

You need to use BOTH the prefix and uri attributes.  So you should have:

xsp:attribute name=key prefix=i18n
uri=http://apache.org/cocoon/i18n/2.0;
myKey
/xsp:attribute

Just as a caveat, I haven't actually tried this, but based on the
documentation, that should work.  =)

Harry

-Original Message-
From: Nico Bekema [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 07, 2003 2:37 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: i18n in combination with xsp:attribute


Hi,

unfortunately that did not help and I am still wondering what is causing
this.

i18n:text
  xsp:attribute name=key prefix=i18n
myKey
  /xsp:attribute
  defaultValue
/i18n:text

This always results in the defaultValue (myKey is defined)
If I look at the an intermediate result using a cocoon view it all looks
fine but the end result will always return defaultValue.
Just using:
i18n:text i18n:key=myKey
  defaultValue
/i18n:text
does result in the translated text using myKey.

thx,
Nico


 [EMAIL PROTECTED] 01/07/03 12:15AM 

From:   [EMAIL PROTECTED]
Sent:   Tuesday, January 07, 2003 12:15 AM
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Subject:RE: i18n in combination with xsp:attribute
Priority:   Normal

Hi Nico,

I believe the problem is in trying to set the namespace via the name
attribute.  xsp:attribute has two attributes (uri and prefix) for setting
the namespace.  Go to this page:

http://wiki.cocoondev.org/Wiki.jsp?page=XSPSyntax 

And scroll down to the section on xsp:attribute.  Hope that helps!

Harry


-Original Message-
From: Nico Bekema [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 06, 2003 4:48 PM
To: [EMAIL PROTECTED] 
Subject: i18n in combination with xsp:attribute


Hi,

can somebody explain to me why the following piece of xsp does not work

i18n:text
  xsp:attribute name=i18n:key
myKey
  /xsp:attribute
  defaultValue
/i18n:text

while this piece does work

i18n:text i18n:key=myKey
  defaultValue
/i18n:text

I would like to dynamically create the i18n:text element by getting the
i18n:key and the default value from a database.

thx,
Nico


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.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/faq/index.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/faq/index.html

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




RE: i18n in combination with xsp:attribute

2003-01-07 Thread Nico Bekema
Hi Harry,

you are absolutely right.
It's working fine now.
thx very much.

Nico

 [EMAIL PROTECTED] 01/07/03 04:53PM 

From:   [EMAIL PROTECTED]
Sent:   Tuesday, January 07, 2003 4:53 PM
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Subject:RE: i18n in combination with xsp:attribute
Priority:   Normal

Hi Nico,

You need to use BOTH the prefix and uri attributes.  So you should have:

xsp:attribute name=key prefix=i18n
uri=http://apache.org/cocoon/i18n/2.0;
myKey
/xsp:attribute

Just as a caveat, I haven't actually tried this, but based on the
documentation, that should work.  =)

Harry

-Original Message-
From: Nico Bekema [mailto:[EMAIL PROTECTED]] 
Sent: Tuesday, January 07, 2003 2:37 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED] 
Subject: RE: i18n in combination with xsp:attribute


Hi,

unfortunately that did not help and I am still wondering what is causing
this.

i18n:text
  xsp:attribute name=key prefix=i18n
myKey
  /xsp:attribute
  defaultValue
/i18n:text

This always results in the defaultValue (myKey is defined)
If I look at the an intermediate result using a cocoon view it all looks
fine but the end result will always return defaultValue.
Just using:
i18n:text i18n:key=myKey
  defaultValue
/i18n:text
does result in the translated text using myKey.

thx,
Nico


 [EMAIL PROTECTED] 01/07/03 12:15AM 

From:   [EMAIL PROTECTED] 
Sent:   Tuesday, January 07, 2003 12:15 AM
To: '[EMAIL PROTECTED]' [EMAIL PROTECTED]
Subject:RE: i18n in combination with xsp:attribute
Priority:   Normal

Hi Nico,

I believe the problem is in trying to set the namespace via the name
attribute.  xsp:attribute has two attributes (uri and prefix) for setting
the namespace.  Go to this page:

http://wiki.cocoondev.org/Wiki.jsp?page=XSPSyntax 

And scroll down to the section on xsp:attribute.  Hope that helps!

Harry


-Original Message-
From: Nico Bekema [mailto:[EMAIL PROTECTED]] 
Sent: Monday, January 06, 2003 4:48 PM
To: [EMAIL PROTECTED] 
Subject: i18n in combination with xsp:attribute


Hi,

can somebody explain to me why the following piece of xsp does not work

i18n:text
  xsp:attribute name=i18n:key
myKey
  /xsp:attribute
  defaultValue
/i18n:text

while this piece does work

i18n:text i18n:key=myKey
  defaultValue
/i18n:text

I would like to dynamically create the i18n:text element by getting the
i18n:key and the default value from a database.

thx,
Nico


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.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/faq/index.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/faq/index.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/faq/index.html

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




Re: i18n catalogue and sql

2003-01-06 Thread Darren Petrie
You can access a request parameter variable inside your sitemap via a 
matcher or a selector

map:matcher  name=request-parameter 
src=org.apache.cocoon.matching.RequestParameterMatcher/
map:selector name=request-parameter 
src=org.apache.cocoon.selection.RequestSelector/

As a matcher---

map:match pattern=mydoc
	map:match type=request-parameter pattern=locale
		map:generate src=xdocs/mydoc-{1}.xml/
	/map:match
	map:serialize type=xml/
/map:match

As a selector---

map:match pattern=mydoc		
	map:select type=request-parameter
		map:parameter name=parameter-name value=locale/
			
		map:when test=en
			..do something
		/map:when
			
		map:otherwise
			..do something else
		/map:otherwise
	/map:select
/map:match

Hope that answers your question.

Darren



On Sunday, January 5, 2003, at 03:12 PM, Cocoon User wrote:

hi martin this is a way to send a parameter inside your xsl file 
(pretty
good) but i need something else

i want to use a request parameter as a variable inside my sitemap

example

if i have http://../...?locale=el

src={locale}_data.xml

point to el_data.xml

(i have do something similar using a action just like in i18n example 
from
2.1 version of cocoon but i'm wondering if there is another way to do 
this
without action)

thnx stavros


On 5 Jan 2003, Martin Lüthi wrote:


You can use the request parameter like this:

  map:transform src=stylesheets/mystyle.xsl
 map:parameter name=use-request-parameters value=true/
 map:parameter name=region value={request:locale}/
  /map:transform

Cheers Martin


Cocoon User [EMAIL PROTECTED] writes:


i know how to make a src file selection based to requested url using
matches

http://./el/test
http://./en/test

map:match pattern=*/*
	map:generate src={1}_{2}.xml/
/map:patch

but how can do  something similar using parameter?

http:///test?locale=el
http:///test?locale=en

using {1} or {2} i refer to first or second * in pattern
but how can i refer to locale prameter value inside map:match/ ?






-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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



Darren Petrie
[EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: i18n in combination with xsp:attribute

2003-01-06 Thread Lai, Harry
Hi Nico,

I believe the problem is in trying to set the namespace via the name
attribute.  xsp:attribute has two attributes (uri and prefix) for setting
the namespace.  Go to this page:

http://wiki.cocoondev.org/Wiki.jsp?page=XSPSyntax

And scroll down to the section on xsp:attribute.  Hope that helps!

Harry


-Original Message-
From: Nico Bekema [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 06, 2003 4:48 PM
To: [EMAIL PROTECTED]
Subject: i18n in combination with xsp:attribute


Hi,

can somebody explain to me why the following piece of xsp does not work

i18n:text
  xsp:attribute name=i18n:key
myKey
  /xsp:attribute
  defaultValue
/i18n:text

while this piece does work

i18n:text i18n:key=myKey
  defaultValue
/i18n:text

I would like to dynamically create the i18n:text element by getting the
i18n:key and the default value from a database.

thx,
Nico


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




Re: i18n catalogue and sql

2003-01-05 Thread Martin Lüthi

You can use the request parameter like this:

  map:transform src=stylesheets/mystyle.xsl
 map:parameter name=use-request-parameters value=true/
 map:parameter name=region value={request:locale}/
  /map:transform

Cheers Martin


Cocoon User [EMAIL PROTECTED] writes:

 i know how to make a src file selection based to requested url using
 matches
 
 http://./el/test
 http://./en/test
 
 map:match pattern=*/*
   map:generate src={1}_{2}.xml/
 /map:patch
 
 but how can do  something similar using parameter?
 
 http:///test?locale=el
 http:///test?locale=en
 
 using {1} or {2} i refer to first or second * in pattern
 but how can i refer to locale prameter value inside map:match/ ?

-- 
Martin Lüthi [EMAIL PROTECTED]



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: i18n catalogue and sql

2003-01-05 Thread Cocoon User
hi martin this is a way to send a parameter inside your xsl file (pretty
good) but i need something else

i want to use a request parameter as a variable inside my sitemap

example

if i have http://../...?locale=el

src={locale}_data.xml

point to el_data.xml

(i have do something similar using a action just like in i18n example from
2.1 version of cocoon but i'm wondering if there is another way to do this
without action)

thnx stavros


On 5 Jan 2003, Martin Lüthi wrote:


 You can use the request parameter like this:

   map:transform src=stylesheets/mystyle.xsl
  map:parameter name=use-request-parameters value=true/
  map:parameter name=region value={request:locale}/
   /map:transform

 Cheers Martin


 Cocoon User [EMAIL PROTECTED] writes:

  i know how to make a src file selection based to requested url using
  matches
 
  http://./el/test
  http://./en/test
 
  map:match pattern=*/*
  map:generate src={1}_{2}.xml/
  /map:patch
 
  but how can do  something similar using parameter?
 
  http:///test?locale=el
  http:///test?locale=en
 
  using {1} or {2} i refer to first or second * in pattern
  but how can i refer to locale prameter value inside map:match/ ?




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: i18n Transformation problem

2003-01-05 Thread Cocoon User

i have a similar problem solved using child element and not attributes

input
valuei18n:text i18n:key=key_textsome text/i18n:text/value
/input

then i have 2 step transformation
first i18n transformation to replace i18n tags with the right content
secend xslt tranformation to generete the element i want with attributes

input value=some i18n transformed text/


maybe this can help you

regards
Stavros

On Sun, 5 Jan 2003, Murari Dhoot wrote:

 Hello Friends,
 I am applying a i18n Transformation on the following button

   input value=Search type=submit name=cocoon-action
 i18n:attr=value/input

 Actually depending upon the value of Button i.e. Search , i am calling a
 method, but if i apply i18n transformaion the value of button changed and i
 m not able to call that method.
 So what i need display value of button should change but passing value
 should always be Search using i18n???
 how to do this
 Thanks in advance


 Thanks and Regards,
 Murari Dhoot



 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




Re: i18n Transformation problem

2003-01-05 Thread Karel Vervaeke
A possible solution for this problem can be found at
http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_10148478.html

(it's the first page that http://google.com/search?q=javascript+button+pressed gives 
me :)

In short, you add a hidden variable to the form, and you change that variable using 
onclick=this.form.my_var='search' in the submit button.  


 Hello Friends,
 I am applying a i18n Transformation on the following button
 
   input value=Search type=submit name=cocoon-action
 i18n:attr=value/input
 
 Actually depending upon the value of Button i.e. Search , i am calling a
 method, but if i apply i18n transformaion the value of button changed and i
 m not able to call that method.
 So what i need display value of button should change but passing value
 should always be Search using i18n???
 how to do this
 Thanks in advance
 
 
 Thanks and Regards,
 Murari Dhoot
 


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: i18n catalogue and sql

2003-01-05 Thread aps olute


  In an article by Steve Punte of candlelightsoftware.com, he uses
xsl:value-of
select=/http:request/http:requestParameters/http:parameter/http:value/

to pickoff input=5  in a url of  http://localhost/mypage?input=5

and passed it to a template like this:

xsl:call-template name=factorial
  xsl:with-param name=input select=/http:request/
http:requestParameters/http:parameter/http:value/
/xsl:call-template


Can anyone perhaps elaborate on how input=5 from that select? what if the the
parameters where http://localhost/mypage?input=5input2=7  instead?

aps

__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: i18n catalogue and sql

2003-01-01 Thread Cocoon User


hi konstantin

i know how to make a src file selection based to requested url using
matches

http://./el/test
http://./en/test

map:match pattern=*/*
map:generate src={1}_{2}.xml/
/map:patch

but how can do  something similar using parameter?

http:///test?locale=el
http:///test?locale=en

using {1} or {2} i refer to first or second * in pattern
but how can i refer to locale prameter value inside map:match/ ?




thnx
stavros






On Mon, 30 Dec 2002, Konstantin Piroumian wrote:

 From: Cocoon User [EMAIL PROTECTED]

 
  hy people
 
  i have found very usefull the i18n processing
  but what happend when you  have large text?

 It's not recommended to use i18n transformer for large texts. There are
 several other ways to solve that task: use XInclude/CInclude, XSLT with
 document() function, sitemap aggregation, etc. Another possibility is to use
 separate content files for different languages, e.g: index_en.xml,
 index_ru.xml, ..., and then use an action or an input module to retrieve the
 needed one based on the user's locale (you can use LocaleAction and its
 'language' sitemap parameter).

 
 
 
  is it possible for catalogues to retrieve data from an sql server
  mySQL for example

 Recently there was commited a patch that allowed to use any source as input
 for the XML catalogue, so you can easily use 'cocoon:/' protocol or any
 other to retrieve your dictionary data from a database. Note, that
 implementation of i18n and especially the catalogue handling part is quite
 different in 2.0.x and 2.1-dev versions.

 Konstantin

 
 
  xml page -ID- catalogue -ID- data from SQL
 
 
  thnx
 
  stavros
 
 
 
  -
  Please check that your question  has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.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/faq/index.html

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




Re: i18n catalogue and sql

2002-12-30 Thread Konstantin Piroumian
From: Cocoon User [EMAIL PROTECTED]


 hy people

 i have found very usefull the i18n processing
 but what happend when you  have large text?

It's not recommended to use i18n transformer for large texts. There are
several other ways to solve that task: use XInclude/CInclude, XSLT with
document() function, sitemap aggregation, etc. Another possibility is to use
separate content files for different languages, e.g: index_en.xml,
index_ru.xml, ..., and then use an action or an input module to retrieve the
needed one based on the user's locale (you can use LocaleAction and its
'language' sitemap parameter).




 is it possible for catalogues to retrieve data from an sql server
 mySQL for example

Recently there was commited a patch that allowed to use any source as input
for the XML catalogue, so you can easily use 'cocoon:/' protocol or any
other to retrieve your dictionary data from a database. Note, that
implementation of i18n and especially the catalogue handling part is quite
different in 2.0.x and 2.1-dev versions.

Konstantin



 xml page -ID- catalogue -ID- data from SQL


 thnx

 stavros



 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




Re: i18n best practice

2002-12-19 Thread Konstantin Piroumian
Hi!

My mail application could not open your message correctly due to some error
in encoding, so my answers are marked by [KP]:

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, December 19, 2002 14:22
Subject: i18n best practice


Hello

The i18n transformer is a great solution for the creation of multilingual
content. So far I have found no documentation on how to best implement
language change. ATM I see two possibilities:

[KP] i18n transformer is not responsible for language selection, it accepts
a 'locale' parameter (since C2.0.4) which can be generated by a variety of
ways: URI parts, request parameters, retrieved from a DB and of course
generated by the LocaleAction.

(1) create URL's with ?locale=xx_YY

[KP] This is a common technic for 'changing' the current language (which
will be stored in session by LocaleAction if configured)

(2) store the state of the actual user locale in the session

[KP] This is possible for ages by the LocaleAction. And even more, you can
also store locale in a cookie, so that when the user re-visits your site
you'll get the locale that he's selected last time.

While (1) is straightforward to achieve with stylesheet parameters, it feels
somewhat messy. Solution (2) seems more elegant, however I need some advice
how to:

[KP] For (1) you will need to add '?locale=xx_YY' only in one place - this
link for language change.

(2a) store and change the locale in the session
(2b) query the locale from the session and handle it to the i18n-transformer

I guess (2b) is what LocaleAction is for.

[KP] LocaleAction is both: for 2a and 2b. Simply take a look at the i18n
samples in /webapp/samples/i18n directory). (Note, that there is also the
old i18n directory in /webapp/i18n in C2.0.x versions - it should be
removed, do not look at it).

[KP] Konstantin

Thanks for all hints

Martin


--
Martin L?thi [EMAIL PROTECTED]




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




Re: i18n best practice

2002-12-19 Thread Martin Lüthi
Thank you Konstantin!

Konstantin Piroumian [EMAIL PROTECTED] writes:
 My mail application could not open your message correctly due to some error
 in encoding, so my answers are marked by [KP]:

Gnus wanted to know the encoding style (latin-1), sorry!

 [KP] i18n transformer is not responsible for language selection, it accepts
 a 'locale' parameter (since C2.0.4) which can be generated by a variety of
 ways: URI parts, request parameters, retrieved from a DB and of course
 generated by the LocaleAction.

That's what I understood from the samples and experimentation.

 (1) create URL's with ?locale=xx_YY
 
 [KP] This is a common technic for 'changing' the current language (which
 will be stored in session by LocaleAction if configured)

This is what I tried. My problem was, that subsequent requests used again the
first locale. With a little experimentation I found that this depends on
cookies (of course, the session identification!).  This is why I asked

 (2) store the state of the actual user locale in the session
 
 [KP] This is possible for ages by the LocaleAction. And even more, you can
 also store locale in a cookie, so that when the user re-visits your site
 you'll get the locale that he's selected last time.
 
 While (1) is straightforward to achieve with stylesheet parameters, it feels
 somewhat messy. Solution (2) seems more elegant, however I need some advice
 how to:
 
 [KP] For (1) you will need to add '?locale=xx_YY' only in one place - this
 link for language change.

ok

 (2a) store and change the locale in the session
 (2b) query the locale from the session and handle it to the i18n-transformer
 
 I guess (2b) is what LocaleAction is for.
 
 [KP] LocaleAction is both: for 2a and 2b. Simply take a look at the i18n
 samples in /webapp/samples/i18n directory). (Note, that there is also the
 old i18n directory in /webapp/i18n in C2.0.x versions - it should be
 removed, do not look at it).

Well, as far as I see, everything works now when cookies are enabled. Would
URL-rewriting be an options if no cookies are allowed? 

Martin

-- 
Martin Lüthi [EMAIL PROTECTED]



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: i18n best practice

2002-12-19 Thread Konstantin Piroumian
From: [EMAIL PROTECTED]

 Thank you Konstantin!

Not at all.


 Konstantin Piroumian [EMAIL PROTECTED] writes:
  My mail application could not open your message correctly due to some
error
  in encoding, so my answers are marked by [KP]:

 Gnus wanted to know the encoding style (latin-1), sorry!

  [KP] i18n transformer is not responsible for language selection, it
accepts
  a 'locale' parameter (since C2.0.4) which can be generated by a variety
of
  ways: URI parts, request parameters, retrieved from a DB and of course
  generated by the LocaleAction.

 That's what I understood from the samples and experimentation.

  (1) create URL's with ?locale=xx_YY
 
  [KP] This is a common technic for 'changing' the current language (which
  will be stored in session by LocaleAction if configured)

 This is what I tried. My problem was, that subsequent requests used again
the
 first locale. With a little experimentation I found that this depends on
 cookies (of course, the session identification!).  This is why I asked

  (2) store the state of the actual user locale in the session
 
  [KP] This is possible for ages by the LocaleAction. And even more, you
can
  also store locale in a cookie, so that when the user re-visits your site
  you'll get the locale that he's selected last time.
 
  While (1) is straightforward to achieve with stylesheet parameters, it
feels
  somewhat messy. Solution (2) seems more elegant, however I need some
advice
  how to:
 
  [KP] For (1) you will need to add '?locale=xx_YY' only in one place -
this
  link for language change.

 ok

  (2a) store and change the locale in the session
  (2b) query the locale from the session and handle it to the
i18n-transformer
 
  I guess (2b) is what LocaleAction is for.
 
  [KP] LocaleAction is both: for 2a and 2b. Simply take a look at the i18n
  samples in /webapp/samples/i18n directory). (Note, that there is also
the
  old i18n directory in /webapp/i18n in C2.0.x versions - it should be
  removed, do not look at it).

 Well, as far as I see, everything works now when cookies are enabled.
Would
 URL-rewriting be an options if no cookies are allowed?

Usually, the URL-rewriting is performed by the server (in WebLogic at least
and AFAIR in Tomcat too) if client does not support cookies. From the
application developer's POV the session tracking mechanism is transparent,
so you don't have to bother how is your session tracked. The only thing to
remember is that when you have external links (that refer to another
application context) or redirects then you'll have to explicitely encode the
session id in your URLs.

I hope you've found the needed configuration parameters that you need to set
to allow the locale information to be saved in session (and create a session
if needed).

Konstantin


 Martin

 --
 Martin Lüthi [EMAIL PROTECTED]



 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




Re: i18n - greek sample

2002-12-16 Thread Konstantin Piroumian
Great!

The official way of submiting patches is through Bugzilla, but it'd be
faster if you send it directly me by [EMAIL PROTECTED]

Please, include also the image of the Greece flag.

Konstantin

From: Cocoon User [EMAIL PROTECTED]


 we have add greek language in i18n refactored sample

 where can we send all this files to be part of the official
 i18n refactored samples


 Stavros Kounis
 http://www.osmosis.gr



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: i18n and xmlform combination- HELP

2002-12-11 Thread Konstantin Piroumian
i18n and xmlform combination- HELPPlease do not use HTML messages!

Try to remove the LocaleAction and leave the:
map:transform type=i18n /
map:parameter name=locale value=vi/
/map:transform

if this helps, move the action to the beginning of the matcher and wrap with
it all the contents. Do not forget to change other parameters, e.g.:

map:generate type=serverpages src=wizard/{../page}.xsp/
---^

Konstantin


- Original Message -
From: Hong Gia Dinh
To: [EMAIL PROTECTED]
Sent: Wednesday, December 11, 2002 13:23
Subject: i18n and xmlform combination- HELP





-Original Message-
From: Hong Gia Dinh
Sent: 10 December 2002 15:10
To: '[EMAIL PROTECTED]'
Subject: RE: i18n and xmlform combination-HELP


I just applied i18n into the XMLForm sample of Cocoon2.1 like this, but it
cant apply i18n
in sitemap i declare :
map:match pattern=*
map:act type=WizardAction
map:parameter name=xmlform-validator-schema-ns
value=http://www.ascc.net/xml/schematron/
map:parameter name=xmlform-validator-schema
value=wizard/validate.xml/
map:parameter name=xmlform-id value=form-feedback/
map:parameter name=xmlform-scope value=session/
map:parameter name=xmlform-model
value=org.apache.cocoon.samples.xmlform.UserBean/

map:generate type=serverpages src=wizard/{page}.xsp/
map:transform type=xmlform label=xml/
map:transform src=stylesheets/translate.xsl/
map:act type=locale
map:transform type=i18n
map:parameter name=locale value=vi/
/map:transform
/map:act

map:transform type=xalan src=stylesheets/wizard2html.xsl/
map:transform src=stylesheets/xmlform2html.xsl/

map:act type=locale
map:transform type=i18n
map:parameter name=locale value=vi/
/map:transform
/map:act

map:serialize type=html/
/map:act
/map:match
and my start.xsp like this:
?xml version=1.0?
xsp:page language=java xmlns:xsp=http://apache.org/xsp;
xmlns:xsp-request=http://apache.org/xsp/request/2.0;
xmlns:i18n=http://apache.org/cocoon/i18n/2.0;
document
menu
lang
hrefstart?locale=en/href
titleEnglish/title
/lang
lang
hrefstart?locale=fr/href
titleFrench/title
/lang
/menu
br/
br/
br/
table align=center width=50% cellspacing=20
tr
td align=center
h3
a href=wizard?cocoon-action-start=true
i18n:texthomepage/i18n:text
/a
/h3
/td
/tr
/table
/document
/xsp:page
and my userIdentity.xsp like this :
?xml version=1.0?
xsp:page language=java xmlns:xsp=http://apache.org/xsp;
xmlns:xsp-request=http://apache.org/xsp/request/2.0;
xmlns:i18n=http://apache.org/cocoon/i18n/2.0;
document xmlns:xf=http://xml.apache.org/cocoon/xmlform/2002;
menu
lang

hrefwizard?cocoon-action-start=trueamp;locale=en/href
titleEnglish/title
/lang
lang

hrefwizard?cocoon-action-start=trueamp;locale=fr/href

titleFrench/title
/lang
/menu
xf:form id=form-feedback view=userIdentity
action=wizard method=GET
xf:caption
i18n:textpersonal_information/i18n:text
/xf:caption
.
and wizard2html.xsl :



?xml version=1.0 encoding=UTF-8?
xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xmlns:xf=http://xml.apache.org/cocoon/xmlform/2002;
exclude-result-prefixes=xalan
xmlns:i18n=http://apache.org/cocoon/i18n/2.0;
xsl:template match=document
html
head

titleXMLForm - Cocoon Feedback Wizard/title
/head
body
xsl:apply-templates /
/body
/html
/xsl:template

xsl:template match=menu
xsl:for-each select=lang
a href={href}xsl:value-of select=title//a
/xsl:for-each
/xsl:template

but every time i click to change from english to french in the userIdentify
form and even in the english form the part 
xf:caption
i18n:textpersonal_information/i18n:text
/xf:caption
 always display

RE: i18n and xmlform combination-HELP

2002-12-10 Thread Hong Gia Dinh
Title: RE: i18n and xmlform combination-HELP





I just applied i18n into the XMLForm sample of Cocoon2.1 like this, but it cant apply i18n


in sitemap i declare :
map:match pattern=*
 map:act type=WizardAction
 map:parameter name=xmlform-validator-schema-ns value=http://www.ascc.net/xml/schematron/
 map:parameter name=xmlform-validator-schema value=wizard/validate.xml/
 map:parameter name=xmlform-id value=form-feedback/
 map:parameter name=xmlform-scope value=session/
 map:parameter name=xmlform-model value=org.apache.cocoon.samples.xmlform.UserBean/
  
 map:generate type=serverpages src="">


 map:transform type=xmlform label=xml/
 map:transform src="">
 map:act type=locale
  map:transform type=i18n
   map:parameter name=locale value=vi/
  /map:transform
 /map:act
 
 map:transform type=xalan src="">
 map:transform src="">
 
 map:act type=locale
  map:transform type=i18n
   map:parameter name=locale value=vi/
  /map:transform
 /map:act
   
 map:serialize type=html/
/map:act
/map:match


and my start.xsp like this:


?xml version=1.0?
xsp:page language=java xmlns:xsp=http://apache.org/xsp xmlns:xsp-request=http://apache.org/xsp/request/2.0 xmlns:i18n=http://apache.org/cocoon/i18n/2.0

document
 menu
  lang
  hrefstart?locale=en/href
  titleEnglish/title
  /lang
  lang
   hrefstart?locale=fr/href
  titleFrench/title
  /lang
 /menu
 br/
 br/
 br/
 table align=center width=50% cellspacing=20
  tr
   td align=center
h3
   a href=""   i18n:texthomepage/i18n:text

  /a
 /h3
/td
   /tr
  /table
 /document
/xsp:page


and my userIdentity.xsp like this :


?xml version=1.0?
xsp:page language=java xmlns:xsp=http://apache.org/xsp xmlns:xsp-request=http://apache.org/xsp/request/2.0 xmlns:i18n=http://apache.org/cocoon/i18n/2.0

 document xmlns:xf=http://xml.apache.org/cocoon/xmlform/2002
  menu
   lang
hrefwizard?cocoon-action-start=trueamp;locale=en/href


titleEnglish/title
   /lang
   lang
hrefwizard?cocoon-action-start=trueamp;locale=fr/href

titleFrench/title
   /lang
  /menu
  xf:form id=form-feedback view=userIdentity action="" method=GET
   xf:caption
i18n:textpersonal_information/i18n:text
   /xf:caption


.


and wizard2html.xsl :




?xml version=1.0 encoding=UTF-8?
xsl:stylesheet version=1.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform
 xmlns:xf=http://xml.apache.org/cocoon/xmlform/2002
 exclude-result-prefixes=xalan xmlns:i18n=http://apache.org/cocoon/i18n/2.0
 xsl:template match=document
  html
   head
  
   titleXMLForm - Cocoon Feedback Wizard/title
   /head
   body
xsl:apply-templates /
   /body
  /html
 /xsl:template
 
 xsl:template match=menu
  xsl:for-each select=lang
   a href="" select=title//a
  /xsl:for-each
 /xsl:template



but every time i click to change from english to french in the userIdentify form and even in the english form the part 

   xf:caption
i18n:textpersonal_information/i18n:text
   /xf:caption


 always display 'personal_information' (message key)- not 'Personal Information'


although i define the messages files and in sitemap :


   map:transformer logger=sitemap.transformer.i18n name=i18n src="">

catalogue-namemessages/catalogue-name
catalogue-locationtranslation/catalogue-location
cache-at-startuptrue/cache-at-startup
   /map:transformer


for the directory and the file


i am really getting crazy with it!!


can somebody tell me what i did wrong ???


thanks very very much in advance
GD












-Original Message-
From: Kirchhoff, Lars [mailto:[EMAIL PROTECTED]]
Sent: 10 December 2002 13:54
To: '[EMAIL PROTECTED]'
Subject: AW: i18n and xmlform combination-HELP



have you set the {locale} variable correctly or are you sure this working. 


my sitemap looks like this:


- code -
map:act type=locale   
 map:transform type=i18n
 map:parameter name=locale value={locale}/
 /map:transform
/map:act 
- /code 


try to set the locale parameter to a hard coded value to see if this is
working:
eg. map:parameter name=locale value=tw/


to reference a dictionary like dict_tw.xml


ciao Lars


-Ursprüngliche Nachricht-
Von: Hong Gia Dinh [mailto:[EMAIL PROTECTED]]
Gesendet: Montag, 9. Dezember 2002 18:38
An: [EMAIL PROTECTED]
Betreff: i18n and xmlform combination-HELP



could sb explain me why i cant use the message key in the message when i use
i18n and xmlform ? 
i applied the sample in the how-to i18n and xml form for my application but
it cant read the message key ? 



what will the link i will call for translation in xmlform? 
thanks very much in advance 
GD 


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html


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





Re: i18n transformer and serializer charset

2002-12-10 Thread Konstantin Piroumian
From: Kirchhoff, Lars [EMAIL PROTECTED]

 Hello

 I'm currently trying to create an application, which should be running
 in english, german, thai and several other asian languages.
 The i18n transformer is working correctly, but to display the characters
 in the correct manner it is needed to use the specific charset in the meta
 tag of html.
 Therefore I tried to setup the sitemap with different serializers
according
 the different languages and tried to use the locale variable to select one
 of the serializers. But this doesn't work.

 here are some snippets of my sitemap:

 - code -
 ...
  map:serializer name=html_th mime-type=text/html
  src=org.apache.cocoon.serialization.HTMLSerializer
encodingTIS-620/encoding
  /map:serializer
  map:serializer name=html_de mime-type=text/html
  src=org.apache.cocoon.serialization.HTMLSerializer
encodingUTF-8/encoding
  /map:serializer

Why don't you use UTF-8 for all the languages? That works in the Cocoon 2.1
i18n sample for such languages as Japanese, Chinese and Korean (and many
others).


 ...

  map:act type=locale
map:serialize type=html_{locale} label=debug/
  /map:act

I'm not sure that this is supported. Are you using the compiled sitemap
engine or interpreted?


 ...
 - code -

 At first is this possible at all? As far as I read the documentation or
the
 mailling list archives I could find anything.
 At second is it possible to get the http request paramater oder session
 parameter in the sitemap.

You can easily get either request parameters, request and session attributes
in the sitemap using input modules from the latest release, e.g.:

map:parameter name=locale value=request-param:locale /

See Input modules sample (/samples/module) in C2.1 for details.

Konstantin


 Any help is appreciated. thanks

 ciao Lars

 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




Re: i18n and XMLForm declaration in sitemap

2002-12-09 Thread Josema Alonso
i18n and XMLForm declaration in
sitemaphttp://xml.apache.org/cocoon/howto/howto-i18n-xmlform.html

ps: please, no HTML email next time, thanks.

- Original Message -
From: Hong Gia Dinh
To: [EMAIL PROTECTED]
Sent: Monday, December 09, 2002 8:19 AM
Subject: i18n and XMLForm declaration in sitemap


hello
can somebody show me how to declare XMLForm using i18n by calling action
(both are actions) in sitemap?
thanks a lot much
GD



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: i18n and XMLForm declaration in sitemap

2002-12-09 Thread Hong Gia Dinh
Title: RE: i18n and XMLForm declaration in sitemap





as far as i know and found there does not exist that link.
could you please recheck it?
Thanks


-Original Message-
From: Josema Alonso [mailto:[EMAIL PROTECTED]]
Sent: 09 December 2002 15:34
To: [EMAIL PROTECTED]
Subject: Re: i18n and XMLForm declaration in sitemap



i18n and XMLForm declaration in
sitemaphttp://xml.apache.org/cocoon/howto/howto-i18n-xmlform.html


ps: please, no HTML email next time, thanks.


- Original Message -
From: Hong Gia Dinh
To: [EMAIL PROTECTED]
Sent: Monday, December 09, 2002 8:19 AM
Subject: i18n and XMLForm declaration in sitemap



hello
can somebody show me how to declare XMLForm using i18n by calling action
(both are actions) in sitemap?
thanks a lot much
GD




-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html


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





RE: i18n and XMLForm declaration in sitemap

2002-12-09 Thread Hong Gia Dinh
Title: RE: i18n and XMLForm declaration in sitemap





thanks, i found it!!!


-Original Message-
From: Josema Alonso [mailto:[EMAIL PROTECTED]]
Sent: 09 December 2002 15:34
To: [EMAIL PROTECTED]
Subject: Re: i18n and XMLForm declaration in sitemap



i18n and XMLForm declaration in
sitemaphttp://xml.apache.org/cocoon/howto/howto-i18n-xmlform.html


ps: please, no HTML email next time, thanks.


- Original Message -
From: Hong Gia Dinh
To: [EMAIL PROTECTED]
Sent: Monday, December 09, 2002 8:19 AM
Subject: i18n and XMLForm declaration in sitemap



hello
can somebody show me how to declare XMLForm using i18n by calling action
(both are actions) in sitemap?
thanks a lot much
GD




-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html


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





Re: i18n translator and thai support

2002-11-27 Thread Konstantin Piroumian
Hi!

Probably, you are using a wrong editor to edit your dictionary files and it
somehow mangles the encoding.
I usually use XML Spy to edit this kind of exotic languages and I've
successfully edited the Chinese, Japanese and Korean translations (they are
in C2.1 only).

Regards,
  Konstantin


- Original Message -
From: Kirchhoff, Lars [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, November 26, 2002 12:06
Subject: i18n translator and thai support


 Hi,

 I played around with the i18n translator and it worked perfectly for
german
 and english translation. But now I tried to create a dictonary for thai
 language and it's not working. I always get the english dictonary. I
figured
 out that, if the dictonary file [for instances messages_th.xml] is wrong
or
 has wrong statements in it, the other dictonaries are tried.
 After this I simply tried to put some thai characters in the xsp code and
 got the following error:

  error ===
 The org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode
notifies
 that org.apache.cocoon.ProcessingException says:

 Invalid byte 2 of 2-byte UTF-8 sequence.

 More precisely:

 org.apache.cocoon.ProcessingException: Invalid byte 2 of 2-byte UTF-8
 sequence.: java.io.UTFDataFormatException: Invalid byte 2 of 2-byte UTF-8
 sequence.
  /error ===

 can anyone give me a suggestions what I can do? The funny thing is that
the
 date-time function of i18n transformer is working and shows the date in
thai
 fonts.

 Thanks in advance

 best regards
 Lars Kirchhoff

 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




Re: i18n more!!

2002-11-27 Thread Kavitha Ramesh
hi GD,

If you want to get a good idea about i18n, go to the
welcome page of your cocoon(after cocoon installation,
 go to the url, http://localhost:8080/cocoon), you
have a title Internationalization.Click the link and
explore.Also in your cocoon directory you will have a
folder i18n, explore that too.

In your case you should have messages.xml(for english)
and messages_fr (for french).In the browser go to the
menu Extras-Internet options-Language-Choose French
and bring the French language above all the other
languages and click OK button.Your pages will have all
the messages in French.

Have Fun!

Kavitha.


--- Hong Gia Dinh [EMAIL PROTECTED] wrote:
 I 'm a new user in cocoon, 
 I have the case :
 i have a web site trying to apply cocoon into it.
 i have 2 languages, english and french
 now if in one page i choose a language such as
 'french' i want all next page
 from that on will be in french. how can i do that?
 how can i know the current language i chose?
 can u all tell me?
 cheers
 GD
 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: i18n more!!

2002-11-27 Thread Konstantin Piroumian
i18n more!!Take a look at the LocaleAction.
It provides mechanism for setting user's locale for a session, request, in a
cookie. And it uses either request parameter or the client's locale or a
cookie to determine selected locale for the first time.

See
http://xml.apache.org/cocoon/apidocs/org/apache/cocoon/acting/LocaleAction.h
tml for more.

Konstantin

- Original Message -
From: Hong Gia Dinh
To: [EMAIL PROTECTED]
Sent: Wednesday, November 27, 2002 12:54
Subject: i18n more!!


I 'm a new user in cocoon,
I have the case :
i have a web site trying to apply cocoon into it.
i have 2 languages, english and french
now if in one page i choose a language such as 'french' i want all next page
from that on will be in french. how can i do that?
how can i know the current language i chose?
can u all tell me?
cheers
GD


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: i18n with sub sitemaps

2002-10-07 Thread Piroumian Konstantin

 From: Majcen, Kurt [mailto:[EMAIL PROTECTED]] 
 
 Hi all!
 
 Is it possible to tell the i18n transformer to use a fixed 
 catalogue-location from the projects root directory (so 
 something like '/translations' instead of 'translations')
 
 I'm working with mounted sitemaps in sub-directories. This 
 always creates a wrong path when entering such a sub sitemap.

Try to use context://path-to-catalogue. Not sure that it will work though.

Konstantin  

 
 Thanks
 Kurt
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




RE: i18n language choice

2002-10-02 Thread Piroumian Konstantin

Passing the locale name using a sitemap parameter was added since version
2.0.2 or even 2.0.3. In the older versions the i18n transformer uses
LocaleAction's method internally to obtain the locale.

Check the sitemap in latest i18n samples (/cocoon/samples/i18n/) - they use
LocaleAction to get the locale and then pass it to the i18n transformer. And
it works. 

This functionality is implemented in 2.1 versions as well.

Regards,
  Konstantin

 -Original Message-
 From: Lorenzo De Sio [mailto:[EMAIL PROTECTED]] 
 Sent: Wednesday, October 02, 2002 4:17 PM
 To: Cocoon Users (E-mail)
 Subject: i18n language choice
 
 
 Hi,
 
 I'm starting some work with the i18n transformer, and I'm 
 facing a problem. I want to choose the i18n language with a 
 sitemap parameter, but passing the locale parameter seems 
 to not work.
 
 BTW, Everything works if I choose the language with a query 
 string locale param.
 
 Here are a few sitemap fragments:
 
 [...]
 
map:transformer
   logger=sitemap.transformer.i18n
   name=i18n
   src=org.apache.cocoon.transformation.I18nTransformer
 catalogue-namemessages/catalogue-name
 catalogue-locationi18n/catalogue-location
/map:transformer
 
 [...]
 
 map:transform type=i18n
   map:parameter name=locale value=en/
 /map:transform
 
 
 
 Thanks in advance,
 
 L.
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




RE: i18n language choice

2002-10-02 Thread Piroumian Konstantin

 From: Lorenzo De Sio [mailto:[EMAIL PROTECTED]] 
 
 Hmmm...I'm working with 2.0.3.

Yes, you are right. I was sure that I've ported that behavior also to 2.0.3,
but the source shows that I didn't. Although, the example shows parameter
usage and it doesn't work, actually. :(

 
 Actually, I've noticed this behavior:
 
 in my example, i18n transformation is not embedded into any 
 LocaleAction;

Actually, the LocaleAction is called internally, so it will lookup for a
'locale' in:
- request parameters
- session attributes
- cookies
- user's locale (request locale)

And all the above is the consequence of the LocaleAction usage.

Seems that I have to think about porting sitemap parameter usage to
2.0.3-dev as well... At least for the sample to work correctly.

Konstantin

 
 - if I don't pass anything, neither in sitemap, request or 
 session, the client locale is used (I can tell since server 
 is English, clients are Italian :-));
 
 - if I pass a sitemap parameter directly, as in previous 
 example (map:parameter name=locale value=en/), it 
 simply gets ignored, and client locale (Italian) is still used;
 
 - if I pass a request parameter ( URI?locale=en ), it 
 correctly switches to English;
 
 - if I set somewhere a session parameter 
 (xsp-session:set-attribute 
 name=localeen/xsp-session:set-attribute), it correctly 
 switches to English;
 
 Sure I'm doing something wrong. Anyway, this is fine for me, 
 since I'm going to store preferences in a session attribute.
 
 
 Thanks again,
 
 L.
 
 
 -Messaggio originale-
 Da: Piroumian Konstantin [mailto:[EMAIL PROTECTED]]
 Inviato: mercoledÍ 2 ottobre 2002 14.49
 A: '[EMAIL PROTECTED]'
 Oggetto: RE: i18n language choice
 
 
 Passing the locale name using a sitemap parameter was added 
 since version 2.0.2 or even 2.0.3. In the older versions the 
 i18n transformer uses LocaleAction's method internally to 
 obtain the locale.
 
 Check the sitemap in latest i18n samples 
 (/cocoon/samples/i18n/) - they use LocaleAction to get the 
 locale and then pass it to the i18n transformer. And it works. 
 
 This functionality is implemented in 2.1 versions as well.
 
 Regards,
   Konstantin
 
  -Original Message-
  From: Lorenzo De Sio [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, October 02, 2002 4:17 PM
  To: Cocoon Users (E-mail)
  Subject: i18n language choice
  
  
  Hi,
  
  I'm starting some work with the i18n transformer, and I'm
  facing a problem. I want to choose the i18n language with a 
  sitemap parameter, but passing the locale parameter seems 
  to not work.
  
  BTW, Everything works if I choose the language with a query
  string locale param.
  
  Here are a few sitemap fragments:
  
  [...]
  
 map:transformer
  logger=sitemap.transformer.i18n
  name=i18n
  src=org.apache.cocoon.transformation.I18nTransformer
  catalogue-namemessages/catalogue-name
  catalogue-locationi18n/catalogue-location
 /map:transformer
  
  [...]
  
  map:transform type=i18n
  map:parameter name=locale value=en/
  /map:transform
  
  
  
  Thanks in advance,
  
  L.
  
  
 -
  Please check that your question  has not already been 
 answered in the
  FAQ before posting. 
 http://xml.apache.org/cocoon/faq/index.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/faq/index.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/faq/index.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/faq/index.html

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




RE: i18n question

2002-09-25 Thread Piroumian Konstantin

 From: Mathias Ochsendorf [mailto:[EMAIL PROTECTED]] 
 
  a href=/test
 img
  xsl:attribute name=src
  i18n:translate
  
 i18n:text/images/test.svg?label_text={0}amp;label_color={1}
 /i18n:text

There is no need for i18n:text wrapper here if don't want to translate the
'/images/...' string itself.

  
 i18n:parami18n:texthello/i18n:text/i18n:param
  
 i18n:parami18n:textred/i18n:text/i18n:param
  /i18n:translate
  /xsl:attribute
 /img
  /a
 
 unfortunately this approach doesn't work. it causes a
 nullpointerexception:

It should work. The error happens somewhere during XSLT transformation and
not the i18n. Try the i18n without XSLT transformation to see if it works.

--
  Konstantin

 
 Original exception :
 org.apache.avalon.excalibur.xml.xslt.XSLTProcessorException: 
 Exception in
 creating Transform Handler
 at
 org.apache.avalon.excalibur.xml.xslt.XSLTProcessorImpl.getTran
 sformerHandlerAndValidity(XSLTProcessorImpl.java:287)
 at
 org.apache.cocoon.transformation.TraxTransformer.setup(TraxTra
 nsformer.java:333)
 
 ...
 
 
 
 Best,
 -- 
 Mathias
 
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




Re: i18n question

2002-09-19 Thread Mathias Ochsendorf

Hi list,

thanks for your help and advices :)


 Sure it will couse a nullpointerexception. First of all you need to to get
 from this snip something like this:

 a href=/test
 img
   xsl:attribute name=src
   /images/test.svg?label_text=helloamp;label_color=red
   /xsl:attribute
 /img
  /a

 and than use this stylesheet

 See example:

 Your sitemap should have:

 map:match pattern=stylesheets/*.xsl
   map:generate src=stylesheets/{1}.xsl/
   map:transform type=i18n/ !-- will generate a valid xsl without i18n
 tags, and it will not couse an error anymore --
   map:serialize type=xml/
 /map:match

 map:match pattern=...
   map:generate src=you-source/
   map:transform src=cocoon:/stylesheets/stylesheet-with-my-snip.xsl/ !--
 use stylesheet generated by previous pipeline --
   map:serialize/
 /map:match

-- 
Mathias Ochsendorf
www: www.ochsendorf.net | www.ochsendorf.de
ICQ: 68556900


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: i18n question

2002-09-18 Thread Ivan Luzyanin

On Tuesday 17 September 2002 19:25, Mathias Ochsendorf wrote:
 hi together,

 I'm looking for a way to substitute/translate
 the following statement with i18n-transformations:

 a href=/test
img src=/images/test.svg?label_text={0}#38;label_color={1}/
 /a

 to:
 a href=/test
img src=/images/test.svg?label_text=hello#38;label_color=red/
 /a

Try this way:
a href=/test
   img
xsl:attribute name=src
i18n:translate

i18n:text/images/test.svg?label_text={0}amp;label_color={1}/i18n:text
i18n:parami18n:texthello/i18n:text/i18n:param
i18n:parami18n:textred/i18n:text/i18n:param
/i18n:translate
/xsl:attribute
   /img
/a

I'm not exactly understand why you need it, but hope it solves you problem.

Regards!
Ivan Luzyanin.




-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: i18n question

2002-09-18 Thread Mathias Ochsendorf

 a href=/test
img
   xsl:attribute name=src
   i18n:translate
   
i18n:text/images/test.svg?label_text={0}amp;label_color={1}/i18n:text
   i18n:parami18n:texthello/i18n:text/i18n:param
   i18n:parami18n:textred/i18n:text/i18n:param
   /i18n:translate
   /xsl:attribute
/img
 /a

unfortunately this approach doesn't work. it causes a
nullpointerexception:

Original exception :
org.apache.avalon.excalibur.xml.xslt.XSLTProcessorException: Exception in
creating Transform Handler
at
org.apache.avalon.excalibur.xml.xslt.XSLTProcessorImpl.getTransformerHandlerAndValidity(XSLTProcessorImpl.java:287)
at
org.apache.cocoon.transformation.TraxTransformer.setup(TraxTransformer.java:333)

...



Best,
-- 
Mathias


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: i18n question

2002-09-18 Thread Ivan Luzyanin

On Wednesday 18 September 2002 17:09, Mathias Ochsendorf wrote:
  a href=/test
 img
  xsl:attribute name=src
  i18n:translate
  
i18n:text/images/test.svg?label_text={0}amp;label_color={1}/i18n:t
 ext i18n:parami18n:texthello/i18n:text/i18n:param
  i18n:parami18n:textred/i18n:text/i18n:param
  /i18n:translate
  /xsl:attribute
 /img
  /a

 unfortunately this approach doesn't work. it causes a
 nullpointerexception:

 Original exception :
 org.apache.avalon.excalibur.xml.xslt.XSLTProcessorException: Exception in
 creating Transform Handler
 at
 org.apache.avalon.excalibur.xml.xslt.XSLTProcessorImpl.getTransformerHandle
rAndValidity(XSLTProcessorImpl.java:287) at
 org.apache.cocoon.transformation.TraxTransformer.setup(TraxTransformer.java
:333)

Sure it will couse a nullpointerexception. First of all you need to to get 
from this snip something like this:

a href=/test
img
xsl:attribute name=src
/images/test.svg?label_text=helloamp;label_color=red
/xsl:attribute
/img
 /a

and than use this stylesheet

See example:

Your sitemap should have:

map:match pattern=stylesheets/*.xsl
map:generate src=stylesheets/{1}.xsl/
map:transform type=i18n/ !-- will generate a valid xsl without i18n 
tags, and it will not couse an error anymore --
map:serialize type=xml/
/map:match

map:match pattern=...
map:generate src=you-source/
map:transform src=cocoon:/stylesheets/stylesheet-with-my-snip.xsl/ !-- 
use stylesheet generated by previous pipeline --
map:serialize/
/map:match

Regards!
Ivan Luzyanin.

-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




Re: i18n transformer empty message element ignored?

2002-09-02 Thread Joerg Heinicke

The non-breaking space (in XML:  # 160;) is a non whitespace character and 
should not be removed.

Regards,

Joerg


Dr. Hans M. Rupp wrote:
 Hallo!
 
 Sometimes we need the behavior, that the i18n transformer replaces
 something with nothing. Somehow this does not seem to work.
 E.g: pre i18n:
 td align=right class=TextNO i18n:text
 i18n:key=Unit.NO_UNITNO_UNIT/i18n:text (08:00 h)/td
 catalogue entry:
 message key=Unit.NO_UNIT/message
 output:
 NO NO_UNIT
 When I replace the zero length string in the catalogue with bla the
 output
 is
 NO bla
 so the catalogue entry can be found.
 A single space or more spaces as the element contents also seem to be
 ignored.
 
 Any ideas for a work-around or solution?
 
 
 Many thanks,
 Hans

-- 

System Development
VIRBUS AG
Fon  +49(0)341-979-7419
Fax  +49(0)341-979-7409
[EMAIL PROTECTED]
www.virbus.de


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: i18n transformer empty message element ignored?

2002-09-02 Thread Piroumian Konstantin

 From: Dr. Hans M. Rupp [mailto:[EMAIL PROTECTED]] 
 
 Hallo!
 
 Sometimes we need the behavior, that the i18n transformer replaces
 something with nothing. Somehow this does not seem to work.

Yes, it doesn't work. A support for empty messages was requested a while ago
(from Michael Enke) and I remember about it, but unformtunately I am very
limited in time now to work on it. See possible workarounds below:

 E.g: pre i18n:
 td align=right class=TextNO i18n:text
 i18n:key=Unit.NO_UNITNO_UNIT/i18n:text (08:00 h)/td

Try to replace NO_UNIT by a space character, if it doesn't help then try the
nbsp;. I know that this can result in layout problems, but don't know a
better solution yet. Sorry.

 catalogue entry:
 message key=Unit.NO_UNIT/message
 output:
 NO NO_UNIT
 When I replace the zero length string in the catalogue with bla the
 output
 is
 NO bla
 so the catalogue entry can be found.
 A single space or more spaces as the element contents also seem to be
 ignored.

Did you try a space inside of the i18n:text element? 

 
 Any ideas for a work-around or solution?

Another solution is to comment out the trim() function in source code where
the string is retrieved from a dictionary.

Konstantin

 
 
 Many thanks,
 Hans
 
 
 Dr. Hans M. Rupp
 danet Internet Solutions GmbH
 Waldburgstr. 17-19
 70563 Stuttgart
 Germany
 
 Fon +49 711 133 53 50
 Fax +49 711 133 53 53
 
 --
 
 
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




Re: i18n transformer problem II

2002-08-26 Thread Dr. Hans M. Rupp

Ok

what I get before i18n  (using a pre_i18n view)

i18n:text i18n:key=x2TEMPERATURE_CURRENT/i18n:text
this originates from the master-stylesheet and is translated by the
transformer correctly.

further down in the file:
i18n:text i18n:key=x2TEMPERATURE_CURRENT/i18n:text
this originated from a named template in  included stylesheet. This is not
translated.

To me those two lines look exactly the same.

Any ideas??

This is really driving me nuts. :-(

Many thanks,

Hans



Piroumian Konstantin wrote:

  From: Dr. Hans M. Rupp [mailto:[EMAIL PROTECTED]]
 ...
 
  And the i18n tags in the main stylesheet are all processed
  correctly, only
  those coming from the included stylesheet with the named template are
  ignored.

 Try to remove the i18n transformer from the pipeline and serialize as XML to
 see what is the output. Maybe there are problems with the namespace that
 comes from another stylesheet. Maybe the namespace is redeclared for the
 i18n prefix and i18n transformer does not process them?

 Konstantin

 
  Many thanks,
 
  Hans
 
  Piroumian Konstantin wrote:
 
From: Dr. Hans M. Rupp [mailto:[EMAIL PROTECTED]]
   
Hallo!
   
When have the following problem.
i18n tags which are included in xsl templates which
  produce the main
body of the html output are processed correctly.
However at some times I want to call a named template which is
physically located in a different xsl file to produce the
right i18n tag
like:
   
xsl:template name=MapWeatherCriterionEnum
 xsl:param name=constant /
 xsl:variable name=enumType select='WeatherCriterionEnum' /
 xsl:choose
  xsl:when test=$constant='WEATHER'i18n:text
   
  i18n:key=WeatherCriterionEnum.WEATHERWEATHER/i18n:text/xsl:when
  xsl:when test=$constant='TEMPERATURE_CURRENT'i18n:text
i18n:key=WeatherCriterionEnum.TEMPERATURE_CURRENTTEMPERATUR
E_CURRENT/i18n:text/xsl:when
   
...
   
The i18n tags produced by named templates are never touched
by the i18n
Transformer!
  
   This can mean only that i18n transformer is not present in
  your pipeline.
   You should run i18n transformer after the XSLT
  transformation. Check your
   sitemap.
  
   Konstantin
  
   
The output before i18n:
   
td class=Texti18n:text
i18n:key=WeatherCriterionEnum.TEMPERATURE_CURRENTTEMPERATUR
E_CURRENT/i18n:text/td
   
output after i18n:
   
td class=Text
i18n:text
i18n:key=WeatherCriterionEnum.TEMPERATURE_CURRENTTEMPERATUR
E_CURRENT/i18n:text
   
/td
   
We use Cocoon 2.03
   
I would be gratefull for any ideas.
   
Many thanks,
   
Hans
   
   

Dr. Hans M. Rupp
danet Internet Solutions GmbH
Waldburgstr. 17-19
70563 Stuttgart
Germany
   
Fon +49 711 133 53 50
Fax +49 711 133 53 53
   
--
   
   
   
   
  -
Please check that your question  has not already been
  answered in the
FAQ before posting.
  http://xml.apache.org/cocoon/faq/index.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/faq/index.html
  
   To
  unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail:
  [EMAIL PROTECTED]
 
  --
  
  Dr. Hans M. Rupp
  danet Internet Solutions GmbH
  Waldburgstr. 17-19
  70563 Stuttgart
  Germany
 
  Fon +49 711 133 53 50
  Fax +49 711 133 53 53
 
  --
 
 
 
  -
  Please check that your question  has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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

--

Dr. Hans M. Rupp
danet Internet Solutions GmbH
Waldburgstr. 17-19
70563 Stuttgart
Germany

Fon +49 711 133 53 50
Fax +49 711 133 53 53

--



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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

RE: i18n transformer problem II

2002-08-26 Thread Piroumian Konstantin

 From: Dr. Hans M. Rupp [mailto:[EMAIL PROTECTED]] 
 
 Ok
 
 what I get before i18n  (using a pre_i18n view)
 
 i18n:text i18n:key=x2TEMPERATURE_CURRENT/i18n:text
 this originates from the master-stylesheet and is translated by the
 transformer correctly.
 
 further down in the file:
 i18n:text i18n:key=x2TEMPERATURE_CURRENT/i18n:text
 this originated from a named template in  included 
 stylesheet. This is not
 translated.
 
 To me those two lines look exactly the same.

Absolutely. Except that they can be mapped to different namespaces depending
on their parent elements. Check that you don't have anything like bla
xmlns:i18n=something wrong / wrapping the second result.

 
 Any ideas??

No other ideas. If you send relevant files then I'll try to find out what's
wrong.

Konstantin

 
 This is really driving me nuts. :-(
 
 Many thanks,
 
 Hans
 
 
 
 Piroumian Konstantin wrote:
 
   From: Dr. Hans M. Rupp [mailto:[EMAIL PROTECTED]]
  ...
  
   And the i18n tags in the main stylesheet are all processed
   correctly, only
   those coming from the included stylesheet with the named 
 template are
   ignored.
 
  Try to remove the i18n transformer from the pipeline and 
 serialize as XML to
  see what is the output. Maybe there are problems with the 
 namespace that
  comes from another stylesheet. Maybe the namespace is 
 redeclared for the
  i18n prefix and i18n transformer does not process them?
 
  Konstantin
 
  
   Many thanks,
  
   Hans
  
   Piroumian Konstantin wrote:
  
 From: Dr. Hans M. Rupp [mailto:[EMAIL PROTECTED]]

 Hallo!

 When have the following problem.
 i18n tags which are included in xsl templates which
   produce the main
 body of the html output are processed correctly.
 However at some times I want to call a named template which is
 physically located in a different xsl file to produce the
 right i18n tag
 like:

 xsl:template name=MapWeatherCriterionEnum
  xsl:param name=constant /
  xsl:variable name=enumType 
 select='WeatherCriterionEnum' /
  xsl:choose
   xsl:when test=$constant='WEATHER'i18n:text

   
 i18n:key=WeatherCriterionEnum.WEATHERWEATHER/i18n:text/xsl:when
   xsl:when test=$constant='TEMPERATURE_CURRENT'i18n:text
 i18n:key=WeatherCriterionEnum.TEMPERATURE_CURRENTTEMPERATUR
 E_CURRENT/i18n:text/xsl:when

 ...

 The i18n tags produced by named templates are never touched
 by the i18n
 Transformer!
   
This can mean only that i18n transformer is not present in
   your pipeline.
You should run i18n transformer after the XSLT
   transformation. Check your
sitemap.
   
Konstantin
   

 The output before i18n:

 td class=Texti18n:text
 i18n:key=WeatherCriterionEnum.TEMPERATURE_CURRENTTEMPERATUR
 E_CURRENT/i18n:text/td

 output after i18n:

 td class=Text
 i18n:text
 i18n:key=WeatherCriterionEnum.TEMPERATURE_CURRENTTEMPERATUR
 E_CURRENT/i18n:text

 /td

 We use Cocoon 2.03

 I would be gratefull for any ideas.

 Many thanks,

 Hans


 
 Dr. Hans M. Rupp
 danet Internet Solutions GmbH
 Waldburgstr. 17-19
 70563 Stuttgart
 Germany

 Fon +49 711 133 53 50
 Fax +49 711 133 53 53

 --




   
 -
 Please check that your question  has not already been
   answered in the
 FAQ before posting.
   http://xml.apache.org/cocoon/faq/index.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/faq/index.html
   
To
   unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail:
   [EMAIL PROTECTED]
  
   --
   
   Dr. Hans M. Rupp
   danet Internet Solutions GmbH
   Waldburgstr. 17-19
   70563 Stuttgart
   Germany
  
   Fon +49 711 133 53 50
   Fax +49 711 133 53 53
  
   --
  
  
  
   
 -
   Please check that your question  has not already been 
 answered in the
   FAQ before posting. 
 http://xml.apache.org/cocoon/faq/index.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/faq/index.html
 
  To 
 unsubscribe, e-mail: 

Re: i18n key generation with xalan

2002-07-30 Thread Joerg Heinicke

I assume you are trying to use the i18n transformer with Xalan command 
line version only? It's part of Cocoon, not of Xalan, so it won't work.

Or is it only a problem with creating the i18n keys? Then you should 
provide some more code. Maybe on another list too.

Joerg

Albert Cervera Areny wrote:
 Hi,
 I've got a problem trying to generate the i18n key files with xalan. I
 use the following instruction
 
 xalan -IN login.xml -XSL merge.xsl -OUT login_es.xml -PARAM mode keys
 -PARAM new-lang es -PARAM keep-lang ca
 
 as specified in the i18n information. Obviously with the correct
 merge.xsl file. However, the generated file login_es.xml is exactly the
 same as login.xml. It'd say it has to do with xalan not using the
 parameters (I realised this with other testings) but I can't believe
 xalan doesn't use params. It's strange.
 
 Xalan version is 1.2.0
 
 Has someone had the same problem? Any ideas may help!
 
 Thanks.
 
 PS: Sorry, if it's a matter of xalan and has nothing to do with cocoon.
 I'd post it in xalan users list if so.


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: == I18N question ==

2002-07-29 Thread Alex Romayev

Konstantin,

Thanks for the link to the forest-dev thread.  I've
been going back and forth around the 1 vs. many files
issue for a while now.  I'm migrating my website from
JSP to Cocoon and looking for a better approach to
what I have at the moment.

My website does not use a database -- it's a pretty
simple site and I'm trying to keep it XML only. 
Because of this I have a number of business entities
stored as XML records.  For example:

person id=1 sex=male
dateOfBirth1923-08-09/dateOfBirth
firstNameAlex/firstName
lastNameRomayev/lastName
...
/person.

Currently I have a file per language, e.g.,
people_en.xml, people_ru.xml, etc.  This causes data
duplication (id, sex, dateOfBirth, etc) and
synchronisation issues when non-translatable data
changes -- basically the people in different files
effectively become different entities and you have to
work hard at keeping them the same.

The option of referencing the translatable elements
from the translation files seems really awkward you
still have your business entity scatted across several
files and it doesn't sound like translation of
elements outside context is a very intuitive task.

I'm leaning toward the third option, which is what
Sylvain was suggesting, i.e:

person id=1 sex=male
dateOfBirth1923-08-09/dateOfBirth
firstName lang=enAlex/firstName
lastName lang=enRomayev/lastName
firstName lang=frFrench Alex/firstName
lastName lang=frFrench Romayev/lastName
...
/person.

However, it seems that it is not being favoured much
by the community.  Is there some other option that I'm
missing?  Also, you've mentioned that you had a
different version of I18nTransformer -- would it be
able to filter out language specific attributes?

Thanks,
-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. http://xml.apache.org/cocoon/faq/index.html

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




RE: == I18N question ==

2002-07-29 Thread Alex Romayev

That's excellent!  How would I get a copy of that?

 From: Alex Romayev [mailto:[EMAIL PROTECTED]] 
 
 Konstantin,
 
 Thanks for the link to the forest-dev thread.  I've
 been going back and forth around the 1 vs. many
files
 issue for a while now.  I'm migrating my website
from
 JSP to Cocoon and looking for a better approach to
 what I have at the moment.
 
 My website does not use a database -- it's a pretty
 simple site and I'm trying to keep it XML only. 
 Because of this I have a number of business
entities
 stored as XML records.  For example:
 
 person id=1 sex=male
 dateOfBirth1923-08-09/dateOfBirth
 firstNameAlex/firstName
 lastNameRomayev/lastName
 ...
 /person.
 
 Currently I have a file per language, e.g.,
 people_en.xml, people_ru.xml, etc.  This causes data
 duplication (id, sex, dateOfBirth, etc) and
 synchronisation issues when non-translatable data
 changes -- basically the people in different files
 effectively become different entities and you have
to
 work hard at keeping them the same.

Yup.

 
 The option of referencing the translatable elements
 from the translation files seems really awkward you
 still have your business entity scatted across
several
 files and it doesn't sound like translation of
 elements outside context is a very intuitive task.

Yup.

 
 I'm leaning toward the third option, which is what
 Sylvain was suggesting, i.e:
 
 person id=1 sex=male
 dateOfBirth1923-08-09/dateOfBirth
 firstName lang=enAlex/firstName
 lastName lang=enRomayev/lastName
 firstName lang=frFrench Alex/firstName
 lastName lang=frFrench Romayev/lastName
 ...
 /person.

To be exact, he were suggesting:

...
 firstName xml:lang=enAlex/firstName
 lastName xml:lang=enRomayev/lastName
...

 
 However, it seems that it is not being favoured much
 by the community.  Is there some other option that
I'm
 missing?  Also, you've mentioned that you had a
 different version of I18nTransformer -- would it be
 able to filter out language specific attributes?

Yes, the new version have inline translation
capabilities, e.g.:

i18n:when locale=enOne/i18n:when
i18n:when locale=ruoDIN/i18n:when
etc.

It already works and probably this week I'll perform
some cleanup and 
will
commit it (I need to synchronize it with the current
CVS, cause my 
working
version is rather old).

Konstantin

 
 Thanks,
 -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. http://xml.apache.org/cocoon/faq/index.html

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




RE: == I18N question ==

2002-07-24 Thread Piroumian Konstantin

 From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]] 
  From: Piroumian Konstantin [mailto:[EMAIL PROTECTED]]
  
  I think that this discussion that happened at Forrest 
 project will help you
  a little: http://marc.theaimsgroup.com/?t=10240438142r=1w=2
 
 or you can simply do something (don't know exactly):
 
 map:act type=lang
   !-- suppose it returns {lang} variable --
 
   map:generate src=dir/file_{lang}.xml/
   ...
 /map:act

Note, that type=lang action was used for the LangSelect action which is
deprecated in 2.0.3 and were removed from the 2.1. The correct version will
look like:

 map:act type=locale
   !-- suppose it returns {locale, lang, country and variant } variables
--
 
   map:generate src=dir/file_{locale}.xml/
   ...
 /map:act

  
 You can even check existence of the file with 
 ResourceExistAction and return default language if 
 translation is not available.

You can check if the translation is present in this order:
locale = lang_country_variant (e.g. de_AT_EURO)
lang_country (e.g. en_US)
lang (e.g. en)

This is how i18n trasformer looks for dictionary files.

Maybe something like an new LocalizedFileAction action would be more
convenient for this task. It can check for the existence of required
resource then return the first matched one or the default file name, e.g.:

 map:act type=localized-file
   !-- returns {file} variable --
   map:generate src=dir/{file}.xml/
   ...
 /map:act

Konstantin

 
 
 Vadim
 
 
  --
  Konstantin Piroumian
  [EMAIL PROTECTED]
  
  
   -Original Message-
   From: JИrТme Iffrig [mailto:[EMAIL PROTECTED]]
   Sent: Monday, July 22, 2002 4:36 PM
   To: [EMAIL PROTECTED]
   Subject: == I18N question ==
  
  
   Hi,
  
   I am new with Cocoon, so I am not sure this is the rigth
   channel to ask question, please accept my apology if it is
   not.
   I would like to internationalize my Site - NOT the site
   itself, but rather its CONTAINT. e.g. I would like to, let
   say, localise the HELP page of my site in 4 langages and
   rely on Cocoon for the localisation (depending on the
   preferences of the visitor). Which means that on one hand I
   would like to have the XML files for the content in
   different languages (I would like to have one XML file per
   language for administration ease), and on the other hand, I
   would like to have my Cocoon style file. At the end all the
   localised content files would be parsed according to the
   style file to he coherent in the styles with different
   languages.
   Have anyone of you done this before? I can see tutorials on
   how to create dictionaries and how to replace strings
   (Cocoon official website), but nothing realy clear
   regarding my question.
  
   Thanks for your time.
   Jé-
   __
   Boîte aux lettres - Caramail - http://www.caramail.com
 
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




RE: == I18N question ==

2002-07-23 Thread Vadim Gritsenko

 From: Piroumian Konstantin [mailto:[EMAIL PROTECTED]]
 
 I think that this discussion that happened at Forrest project will help you
 a little: http://marc.theaimsgroup.com/?t=10240438142r=1w=2

or you can simply do something (don't know exactly):

map:act type=lang
  !-- suppose it returns {lang} variable --

  map:generate src=dir/file_{lang}.xml/
  ...
/map:act
 
You can even check existence of the file with ResourceExistAction and return default 
language if translation is not available.


Vadim


 --
 Konstantin Piroumian
 [EMAIL PROTECTED]
 
 
  -Original Message-
  From: JИrТme Iffrig [mailto:[EMAIL PROTECTED]]
  Sent: Monday, July 22, 2002 4:36 PM
  To: [EMAIL PROTECTED]
  Subject: == I18N question ==
 
 
  Hi,
 
  I am new with Cocoon, so I am not sure this is the rigth
  channel to ask question, please accept my apology if it is
  not.
  I would like to internationalize my Site - NOT the site
  itself, but rather its CONTAINT. e.g. I would like to, let
  say, localise the HELP page of my site in 4 langages and
  rely on Cocoon for the localisation (depending on the
  preferences of the visitor). Which means that on one hand I
  would like to have the XML files for the content in
  different languages (I would like to have one XML file per
  language for administration ease), and on the other hand, I
  would like to have my Cocoon style file. At the end all the
  localised content files would be parsed according to the
  style file to he coherent in the styles with different
  languages.
  Have anyone of you done this before? I can see tutorials on
  how to create dictionaries and how to replace strings
  (Cocoon official website), but nothing realy clear
  regarding my question.
 
  Thanks for your time.
  Jé-
  __
  Boîte aux lettres - Caramail - http://www.caramail.com


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: i18n inside XSL

2002-07-15 Thread Piroumian Konstantin

 From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]] 
 
 Hi,
   I've been able to use an HTML file (which I've not designed) as my
   stylesheet and in which I call each XML document I want to 
 process. I
   get this XML file as a parameter to the stylesheet.  The 
 thing is now that I'd like to be able to translate the file I'm
   gonna call and it is a problem because the i18n provided by 
 cocoon is a
   transformer and should be called within the 'sitemap.xmap'  
 I think this is not the way cocoon it's been designed to work but I'm
   really tight to the HTML file the web designers have made 
 me available.

I don't quite understand how are you going to use an HTML file as a
stylesheet.

And would you serve your content without sitemap.xmap? From what you tell I
understood this:
1) you have a stylesheet that you can't change
2) you get your XML file name from a request parameter
3) the XML file should be translated before transformation by the stylesheet
Correct?

If so, then everything can be perfectly done in the sitemap. Simply setup a
pipeline using RequestParameterAction (or an RequestInput module in Cocoon
2.1) that will propogate the filename to the sitemap. The rest is classics:
1) generate you file
2) i18n
3) xslt

And that's all.

Does this solve your issue?

Konstantin


   Any suggestion will be appreciated.
 Thanks.
 
 
 -- 
 Albert Cervera Areny
 Dept. Informàtica Sedifa, S.L.
 
 
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




RE: i18n inside XSL

2002-07-15 Thread Albert Cervera Areny

I think I didn't explain it very well.
The thing is that I've got an XSL file that calls throw
xsl:apply-templates select=document($document)/
Where $document is a parameter I give to the stylesheet (forget about the
thing of the HTML, it's as you said I can't modify it).How would you translate the XML 
file pointed by $document?

 From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]]

 Hi,
   I've been able to use an HTML file (which I've not designed) as my
   stylesheet and in which I call each XML document I want to
 process. I
   get this XML file as a parameter to the stylesheet.  The
 thing is now that I'd like to be able to translate the file I'm
   gonna call and it is a problem because the i18n provided by
 cocoon is a
   transformer and should be called within the 'sitemap.xmap'
 I think this is not the way cocoon it's been designed to work but I'm
   really tight to the HTML file the web designers have made
 me available.

 I don't quite understand how are you going to use an HTML file as a
 stylesheet.

 And would you serve your content without sitemap.xmap? From what you
 tell I understood this:
 1) you have a stylesheet that you can't change
 2) you get your XML file name from a request parameter
 3) the XML file should be translated before transformation by the
 stylesheet Correct?

 If so, then everything can be perfectly done in the sitemap. Simply
 setup a pipeline using RequestParameterAction (or an RequestInput
 module in Cocoon 2.1) that will propogate the filename to the sitemap.
 The rest is classics: 1) generate you file
 2) i18n
 3) xslt

 And that's all.

 Does this solve your issue?

 Konstantin


   Any suggestion will be appreciated.
 Thanks.


 --
 Albert Cervera Areny
 Dept. Informàtica Sedifa, S.L.



 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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


-- 
Albert Cervera Areny
Dept. Informàtica Sedifa, S.L.



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: i18n inside XSL

2002-07-15 Thread Piroumian Konstantin

 From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]] 
 
 I think I didn't explain it very well.
 The thing is that I've got an XSL file that calls throw
 xsl:apply-templates select=document($document)/
 Where $document is a parameter I give to the stylesheet 
 (forget about the
 thing of the HTML, it's as you said I can't modify it).How 
 would you translate the XML file pointed by $document?

I would not say that using document() function is not a good idea for
serving content, maybe you have reasons for doing so. However, I'd suggest
that you rething that approach and try to perform it using the sitemap.

I don't know how document() function loads files, but if it does not use
Cocoon's source resolver then I don't see how you can achieve what you need.
Just a guess: try to point the document() to a Cocoon pipeline and not the
file directly using 'cocoon://' protocol, e.g.:
document('cocoon://{$document}'). 

Konstantin

 
  From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]]
 
  Hi,
I've been able to use an HTML file (which I've not 
 designed) as my
stylesheet and in which I call each XML document I want to
  process. I
get this XML file as a parameter to the stylesheet.  The
  thing is now that I'd like to be able to translate the file I'm
gonna call and it is a problem because the i18n provided by
  cocoon is a
transformer and should be called within the 'sitemap.xmap'
  I think this is not the way cocoon it's been designed to 
 work but I'm
really tight to the HTML file the web designers have made
  me available.
 
  I don't quite understand how are you going to use an HTML file as a
  stylesheet.
 
  And would you serve your content without sitemap.xmap? From what you
  tell I understood this:
  1) you have a stylesheet that you can't change
  2) you get your XML file name from a request parameter
  3) the XML file should be translated before transformation by the
  stylesheet Correct?
 
  If so, then everything can be perfectly done in the sitemap. Simply
  setup a pipeline using RequestParameterAction (or an RequestInput
  module in Cocoon 2.1) that will propogate the filename to 
 the sitemap.
  The rest is classics: 1) generate you file
  2) i18n
  3) xslt
 
  And that's all.
 
  Does this solve your issue?
 
  Konstantin
 
 
Any suggestion will be appreciated.
  Thanks.
 
 
  --
  Albert Cervera Areny
  Dept. Informàtica Sedifa, S.L.
 
 
 
  
 -
  Please check that your question  has not already been 
 answered in the
  FAQ before posting. 
 http://xml.apache.org/cocoon/faq/index.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/faq/index.html
 
  To 
 unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail:   
 [EMAIL PROTECTED]
 
 
 -- 
 Albert Cervera Areny
 Dept. Informàtica Sedifa, S.L.
 
 
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




RE: i18n inside XSL

2002-07-15 Thread Vadim Gritsenko

 From: Piroumian Konstantin [mailto:[EMAIL PROTECTED]]
 
  From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]]
 
  I think I didn't explain it very well.
  The thing is that I've got an XSL file that calls throw
  xsl:apply-templates select=document($document)/
  Where $document is a parameter I give to the stylesheet
  (forget about the
  thing of the HTML, it's as you said I can't modify it).How
  would you translate the XML file pointed by $document?
 
 I would not say that using document() function is not a good idea for
 serving content, maybe you have reasons for doing so. However, I'd
suggest
 that you rething that approach and try to perform it using the
sitemap.
 
 I don't know how document() function loads files, but if it does

It does.

 not use
 Cocoon's source resolver then I don't see how you can achieve what you
need.
 Just a guess: try to point the document() to a Cocoon pipeline and not
the
 file directly using 'cocoon://' protocol, e.g.:
 document('cocoon://{$document}').

This works.

Vadim


 
 Konstantin
 
 
   From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]]
  
   Hi,
 I've been able to use an HTML file (which I've not
  designed) as my
 stylesheet and in which I call each XML document I want to
   process. I
 get this XML file as a parameter to the stylesheet.  The
   thing is now that I'd like to be able to translate the file I'm
 gonna call and it is a problem because the i18n provided by
   cocoon is a
 transformer and should be called within the 'sitemap.xmap'
   I think this is not the way cocoon it's been designed to
  work but I'm
 really tight to the HTML file the web designers have made
   me available.
  
   I don't quite understand how are you going to use an HTML file as
a
   stylesheet.
  
   And would you serve your content without sitemap.xmap? From what
you
   tell I understood this:
   1) you have a stylesheet that you can't change
   2) you get your XML file name from a request parameter
   3) the XML file should be translated before transformation by the
   stylesheet Correct?
  
   If so, then everything can be perfectly done in the sitemap.
Simply
   setup a pipeline using RequestParameterAction (or an RequestInput
   module in Cocoon 2.1) that will propogate the filename to
  the sitemap.
   The rest is classics: 1) generate you file
   2) i18n
   3) xslt
  
   And that's all.
  
   Does this solve your issue?
  
   Konstantin
  
  
 Any suggestion will be appreciated.
   Thanks.
  
  
   --
   Albert Cervera Areny
   Dept. Informàtica Sedifa, S.L.


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: i18n inside XSL

2002-07-15 Thread Albert Cervera Areny

Yes, it works! Thank you very much!

 From: Piroumian Konstantin [mailto:[EMAIL PROTECTED]]

  From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]]
 
  I think I didn't explain it very well.
  The thing is that I've got an XSL file that calls throw
  xsl:apply-templates select=document($document)/
  Where $document is a parameter I give to the stylesheet
  (forget about the
  thing of the HTML, it's as you said I can't modify it).How
  would you translate the XML file pointed by $document?

 I would not say that using document() function is not a good idea for
 serving content, maybe you have reasons for doing so. However, I'd
 suggest
 that you rething that approach and try to perform it using the
 sitemap.

 I don't know how document() function loads files, but if it does

 It does.

 not use
 Cocoon's source resolver then I don't see how you can achieve what you
 need.
 Just a guess: try to point the document() to a Cocoon pipeline and not
 the
 file directly using 'cocoon://' protocol, e.g.:
 document('cocoon://{$document}').

 This works.

 Vadim



 Konstantin

 
   From: Albert Cervera Areny [mailto:[EMAIL PROTECTED]]
  
   Hi,
 I've been able to use an HTML file (which I've not
  designed) as my
 stylesheet and in which I call each XML document I want to
   process. I
 get this XML file as a parameter to the stylesheet.  The
   thing is now that I'd like to be able to translate the file I'm
 gonna call and it is a problem because the i18n provided by
   cocoon is a
 transformer and should be called within the 'sitemap.xmap'
   I think this is not the way cocoon it's been designed to
  work but I'm
 really tight to the HTML file the web designers have made
   me available.
  
   I don't quite understand how are you going to use an HTML file as
 a
   stylesheet.
  
   And would you serve your content without sitemap.xmap? From what
 you
   tell I understood this:
   1) you have a stylesheet that you can't change
   2) you get your XML file name from a request parameter
   3) the XML file should be translated before transformation by the
   stylesheet Correct?
  
   If so, then everything can be perfectly done in the sitemap.
 Simply
   setup a pipeline using RequestParameterAction (or an RequestInput
   module in Cocoon 2.1) that will propogate the filename to
  the sitemap.
   The rest is classics: 1) generate you file
   2) i18n
   3) xslt
  
   And that's all.
  
   Does this solve your issue?
  
   Konstantin
  
  
 Any suggestion will be appreciated.
   Thanks.
  
  
   --
   Albert Cervera Areny
   Dept. Informàtica Sedifa, S.L.


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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


-- 
Albert Cervera Areny
Dept. Informàtica Sedifa, S.L.



-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.html

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




RE: i18n seems to work, but does not translate

2002-07-11 Thread Piroumian Konstantin

 From: Volker Schneider [mailto:[EMAIL PROTECTED]] 
 
 Dear colleagues,
 
 on Windows NT with WebSphere Application Deveolper 4.0.2 we have our
 application working. When we deploy it to a Solaris machine 
 we have the
 effect, that i18n seems to work (the log files told us so) 
 but there isn't a
 really translation on the screen. We see the keys instead of 
 the transation.

Usually, keys are shown when translations are not found.

 
 The language settings are OK, and the catalog files can be found.
 
 Does somebody know what can be wrong?

Try to experiment with the 'cache-at-startup' option of i18n transformer.
And please tell me what is the version of Cocoon you are using.

Konstantin

 
 Best regards
 - Volker -
 
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




RE: i18n seems to work, but does not translate

2002-07-11 Thread Volker Schneider

Hi Konstantin,

thanks for your reply. We're using Cocoon 2.0.2.

Unfortunately we can find the key in the catalog file. Is it possible that
it's a problem with the character set?

On both machines we are using UTF-8. With Windows 2000 it works fine, but
not with Solaris.

Best regards
- Volker -

-Original Message-
From: Piroumian Konstantin [mailto:[EMAIL PROTECTED]]
Sent: Donnerstag, 11. Juli 2002 11:04
To: '[EMAIL PROTECTED]'
Subject: RE: i18n seems to work, but does not translate


 From: Volker Schneider [mailto:[EMAIL PROTECTED]]

 Dear colleagues,

 on Windows NT with WebSphere Application Deveolper 4.0.2 we have our
 application working. When we deploy it to a Solaris machine
 we have the
 effect, that i18n seems to work (the log files told us so)
 but there isn't a
 really translation on the screen. We see the keys instead of
 the transation.

Usually, keys are shown when translations are not found.


 The language settings are OK, and the catalog files can be found.

 Does somebody know what can be wrong?

Try to experiment with the 'cache-at-startup' option of i18n transformer.
And please tell me what is the version of Cocoon you are using.

Konstantin


 Best regards
 - Volker -


 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.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/faq/index.html

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




RE: i18n seems to work, but does not translate

2002-07-11 Thread Piroumian Konstantin

 From: Volker Schneider [mailto:[EMAIL PROTECTED]] 
 
 Hi Konstantin,
 
 thanks for your reply. We're using Cocoon 2.0.2.
 
 Unfortunately we can find the key in the catalog file. Is it 
 possible that
 it's a problem with the character set?

I don't think so. There must be no problems with UTF-8.
Check the log to see if i18n transformer really gets correct translations.
If possible post relevant snippet from logs here.

 
 On both machines we are using UTF-8. With Windows 2000 it 
 works fine, but
 not with Solaris.

Do you have any other transformations? Try to turn off everything except
generator and i18n transformer (serialize as XML) and see what happens.

Konstantin

 
 Best regards
 - Volker -
 
 -Original Message-
 From: Piroumian Konstantin [mailto:[EMAIL PROTECTED]]
 Sent: Donnerstag, 11. Juli 2002 11:04
 To: '[EMAIL PROTECTED]'
 Subject: RE: i18n seems to work, but does not translate
 
 
  From: Volker Schneider [mailto:[EMAIL PROTECTED]]
 
  Dear colleagues,
 
  on Windows NT with WebSphere Application Deveolper 4.0.2 we have our
  application working. When we deploy it to a Solaris machine
  we have the
  effect, that i18n seems to work (the log files told us so)
  but there isn't a
  really translation on the screen. We see the keys instead of
  the transation.
 
 Usually, keys are shown when translations are not found.
 
 
  The language settings are OK, and the catalog files can be found.
 
  Does somebody know what can be wrong?
 
 Try to experiment with the 'cache-at-startup' option of i18n 
 transformer.
 And please tell me what is the version of Cocoon you are using.
 
 Konstantin
 
 
  Best regards
  - Volker -
 
 
  
 -
  Please check that your question  has not already been 
 answered in the
  FAQ before posting. 
 http://xml.apache.org/cocoon/faq/index.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/faq/index.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/faq/index.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/faq/index.html

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




RE: i18n seems to work, but does not translate

2002-07-11 Thread Volker Schneider

Hi Konstantin,

by the way:

What features does i18n provide for translation of date and time and so on?

Thank you, best regards
- Volker -

-Original Message-
From: Piroumian Konstantin [mailto:[EMAIL PROTECTED]]
Sent: Donnerstag, 11. Juli 2002 13:16
To: '[EMAIL PROTECTED]'
Subject: RE: i18n seems to work, but does not translate


 From: Volker Schneider [mailto:[EMAIL PROTECTED]] 
 
 Hi Konstantin,
 
 thanks for your reply. We're using Cocoon 2.0.2.
 
 Unfortunately we can find the key in the catalog file. Is it 
 possible that
 it's a problem with the character set?

I don't think so. There must be no problems with UTF-8.
Check the log to see if i18n transformer really gets correct translations.
If possible post relevant snippet from logs here.

 
 On both machines we are using UTF-8. With Windows 2000 it 
 works fine, but
 not with Solaris.

Do you have any other transformations? Try to turn off everything except
generator and i18n transformer (serialize as XML) and see what happens.

Konstantin

 
 Best regards
 - Volker -
 
 -Original Message-
 From: Piroumian Konstantin [mailto:[EMAIL PROTECTED]]
 Sent: Donnerstag, 11. Juli 2002 11:04
 To: '[EMAIL PROTECTED]'
 Subject: RE: i18n seems to work, but does not translate
 
 
  From: Volker Schneider [mailto:[EMAIL PROTECTED]]
 
  Dear colleagues,
 
  on Windows NT with WebSphere Application Deveolper 4.0.2 we have our
  application working. When we deploy it to a Solaris machine
  we have the
  effect, that i18n seems to work (the log files told us so)
  but there isn't a
  really translation on the screen. We see the keys instead of
  the transation.
 
 Usually, keys are shown when translations are not found.
 
 
  The language settings are OK, and the catalog files can be found.
 
  Does somebody know what can be wrong?
 
 Try to experiment with the 'cache-at-startup' option of i18n 
 transformer.
 And please tell me what is the version of Cocoon you are using.
 
 Konstantin
 
 
  Best regards
  - Volker -
 
 
  
 -
  Please check that your question  has not already been 
 answered in the
  FAQ before posting. 
 http://xml.apache.org/cocoon/faq/index.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/faq/index.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/faq/index.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/faq/index.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/faq/index.html

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




RE: i18n seems to work, but does not translate

2002-07-11 Thread Piroumian Konstantin

 From: Volker Schneider [mailto:[EMAIL PROTECTED]] 
 
 Hi Konstantin,
 
 by the way:
 
 What features does i18n provide for translation of date and 
 time and so on?

It supports most of the JDK features for date/time and number formatting.
See the document about i18n transformer (somewhere in
userdocs/transformers/i18n-transformer.html) and i18n samples (better to
look at the C2.1 samples at '/cocoon/samples/i18n').

You can format date, time, date-time using patterns or predefined formats
(SHORT, MEDIUM, LONG, DEFAULT).
You can format number, currency, percent.
All in locale sensitive manner and also you can convert from one locale to
another using 'src-locale' and 'locale' attributes.

You can use parameter substitution.

And so on. 
(A new document including a table with all elements, attributes, examples,
etc. will be issued as soon as I have a little time to finish it).

Konstantin

 
 Thank you, best regards
 - Volker -
 
 -Original Message-
 From: Piroumian Konstantin [mailto:[EMAIL PROTECTED]]
 Sent: Donnerstag, 11. Juli 2002 13:16
 To: '[EMAIL PROTECTED]'
 Subject: RE: i18n seems to work, but does not translate
 
 
  From: Volker Schneider [mailto:[EMAIL PROTECTED]] 
  
  Hi Konstantin,
  
  thanks for your reply. We're using Cocoon 2.0.2.
  
  Unfortunately we can find the key in the catalog file. Is it 
  possible that
  it's a problem with the character set?
 
 I don't think so. There must be no problems with UTF-8.
 Check the log to see if i18n transformer really gets correct 
 translations.
 If possible post relevant snippet from logs here.
 
  
  On both machines we are using UTF-8. With Windows 2000 it 
  works fine, but
  not with Solaris.
 
 Do you have any other transformations? Try to turn off 
 everything except
 generator and i18n transformer (serialize as XML) and see 
 what happens.
 
 Konstantin
 
  
  Best regards
  - Volker -
  
  -Original Message-
  From: Piroumian Konstantin [mailto:[EMAIL PROTECTED]]
  Sent: Donnerstag, 11. Juli 2002 11:04
  To: '[EMAIL PROTECTED]'
  Subject: RE: i18n seems to work, but does not translate
  
  
   From: Volker Schneider [mailto:[EMAIL PROTECTED]]
  
   Dear colleagues,
  
   on Windows NT with WebSphere Application Deveolper 4.0.2 
 we have our
   application working. When we deploy it to a Solaris machine
   we have the
   effect, that i18n seems to work (the log files told us so)
   but there isn't a
   really translation on the screen. We see the keys instead of
   the transation.
  
  Usually, keys are shown when translations are not found.
  
  
   The language settings are OK, and the catalog files can be found.
  
   Does somebody know what can be wrong?
  
  Try to experiment with the 'cache-at-startup' option of i18n 
  transformer.
  And please tell me what is the version of Cocoon you are using.
  
  Konstantin
  
  
   Best regards
   - Volker -
  
  
   
  
 -
   Please check that your question  has not already been 
  answered in the
   FAQ before posting. 
  http://xml.apache.org/cocoon/faq/index.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/faq/index.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/faq/index.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/faq/index.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/faq/index.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/faq/index.html

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




RE: I18n

2002-07-11 Thread Alex Romayev

Hi Konstantin,

Thanks for your help -- it makes sense.  On that note,
do you happen to have any good patterns for modeling
I18nised data in both database and XML?  I understand,
why you'd want to keep it in the DB, but I would also
like to exchange my data with other applicatons via
the XML.

Thanks,
-Alex

__
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. http://xml.apache.org/cocoon/faq/index.html

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




RE: I18n

2002-07-11 Thread Piroumian Konstantin

 From: Alex Romayev [mailto:[EMAIL PROTECTED]] 
 
 Hi Konstantin,
 
 Thanks for your help -- it makes sense.  On that note,
 do you happen to have any good patterns for modeling
 I18nised data in both database and XML?  I understand,
 why you'd want to keep it in the DB, but I would also
 like to exchange my data with other applicatons via
 the XML.

We are still in progress of modeling i18n data and we will have both:
resource files (XML or property files) and data in the database.

For exchanging with other application I suppose that you'd need only the
business entity data, isn't it? So, you won't need i18n transformer in that
case to translate text, but maybe you can use it to format dates in standard
for XML way (I don't remember the standard URL, but it was somewhere on
W3C).

 
 Thanks,
 -Alex
 
 __
 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. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




RE: i18n

2002-07-08 Thread Piroumian Konstantin

 From: kavitha ramesh [mailto:[EMAIL PROTECTED]] 
 
 Hi,
 
 Iam working with i18n in cocoon.I have a page which displays 2 
 languages English and German.If I go to the Internet Option and 
 change the language to arabic , Iam getting an error Unable to 
 locate resources:message.Now I would like to set the default 
 language as English, whatever language I choose,,How to do 
 that?Please help me,,,

In your message catalogue you should have a dictionary file with no locale,
e.g.:
messages.xml -- this is the default bundle. Simply copy the english bundle.
messages_en.xml
messages_de.xml

Konstantin

 
 Kavitha
 _
 Click below  to experience Aishwarya Rai's beauty secrets. New 
 International Lux Skincare - It's not just soap, It's skincare.
 http://www.luxskincare.com
 
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




RE: i18n

2002-07-08 Thread Hahn Kurt (CHA)

Hi,
just a wild guess: If you create (actually re-create, because I think that
in a standard Cocoon installation, there is already one) a file messages.xml
in the same directory and with the same content as messages_en.xml, would
that work? Maybe you'll give it a try.

I'm not sure at all, but from the behaviour I observed, the file
messages.xml should contain the messages in the default language.

Kurt

-Message d'origine-
De : kavitha ramesh [mailto:[EMAIL PROTECTED]]
Envoyé : lundi, 8. juillet 2002 13:59
À : [EMAIL PROTECTED]
Objet : i18n


Hi,

Iam working with i18n in cocoon.I have a page which displays 2 
languages English and German.If I go to the Internet Option and 
change the language to arabic , Iam getting an error Unable to 
locate resources:message.Now I would like to set the default 
language as English, whatever language I choose,,How to do 
that?Please help me,,,

Kavitha
_
Click below  to experience Aishwarya Rai's beauty secrets. New 
International Lux Skincare - It's not just soap, It's skincare.
http://www.luxskincare.com


-
Please check that your question  has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




RE: i18n elements in FileGenerator

2002-06-11 Thread Piroumian Konstantin

The problem comes from the Batik libs that include out of date XML API
classes.
Either remove org.xml.sax.* classes and directories from batik-*.jar or get
it from CVS (2.0.3 already fixed, 2.1 will be ready in a few minutes).

--
Konstantin Piroumian 
[EMAIL PROTECTED]


 -Original Message-
 From: Marc Schupbach [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, June 11, 2002 12:25 PM
 To: [EMAIL PROTECTED]
 Subject: i18n elements in FileGenerator
 
 
 hello,
 
 i have a xml document containing i18n tags. when i let 
 process it by the
 FileGenerator it produces a ArrayIndexOutOfBoundsException. when i
 remove all i18n elements, it works. my file looks like :
 
 menu xmlns:i18n=http://apache.org/cocoon/i18n/2.0;
 
 š entry cmd=doc_menu
 ššš ref name=DOC_MENU i18n:attr=DOC_MENU window=_self
 target=docs.html?file=doc_menu
 š i18n:textDOC_MENU/i18n:text
 ššš /ref
 š /entry
 .
 /menu
 
 this sample worked well with cocoon2.0.2 but i updated to 2.0.3.
 š
 
 marc
 š
 š
 š
 
 
 -
 Please check that your question  has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faq/index.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/faq/index.html

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




RE: i18n where to do it?

2002-05-27 Thread Hahn Kurt (CHA)

In my transformations, I'm using the first method below. Thus, the i18n
transformer is the last (or second-last) transformer you have to invoke,
after having applied any other transformation in a  language-neutral way.

-Message d'origine-
De : Andres, Judith [mailto:[EMAIL PROTECTED]]
Envoyé : lundi, 27. mai 2002 10:19
À : '[EMAIL PROTECTED]'
Objet : AW: i18n where to do it?


Hi,

1) you could invoke the I18nTransformer after you invoke the
TraxTransformer. This implies that you use just keys instead of the real
text in the stylesheet. This way there would be no need to have the
semi-abstract level.

2) you could provide an action that writes the user locale into a sitemap
parameter - then you could use this parameter to select the stylesheet
map:act type=locale
  map:transform src=stylesheet_{locale}.xsl/
/map:act

Judith

 -Ursprüngliche Nachricht-
 Von:  [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
 Gesendet am:  Sonntag, 26. Mai 2002 13:10
 An:   [EMAIL PROTECTED]
 Betreff:  i18n where to do it?
 
 Hi! 
 
 I have just been thrown into a Cocoon project. I am still a newbie to
 Cocoon. 
 One major problem of the project seems to be i18n. 
 
 This has resulted in XML/XSP pages that describe the html/wml/pdf etc.
 pages to be produced on a kind of abstract level, but still all the
 elements which I would normally consider to belong only to the view level
 are described in the XML pages before XSLT-transformation. E.g. we have
 tags describing text, drop-down menues, checkboxes and so on on a XML-page
 which is used to show the contents of the users mailbox. Then we use a XSL
 stylesheet to transform this XML-page which is describing a HTML page into
 a HTML page. 
 
 I argued that this violates the principal of separation of business logic,
 data and presentation which is in my opinion the most fundamental design
 principle for multichannel-applications. 
 Also this approach causes redundancy. If we want to change a page (e.g the
 navigation on this page) we have to change the XSL-stylesheet (which is in
 reality to be supplied be a design company) and the XML/XSP page. 
 
 My idea is to have all the i18n issues to be resolved on the XSL-level,
 e.g. like it is describe in Eric M. Burke: Java and XSLT. Ch 8 with XSL
 variables and imports. 
 
 Stuff like You have mail -- Sie haben neue Emails and Drop down
 boxes are purely view and should not contaminate data and logic. The XML
 page used for the pages displaying mailbox-content would only contain
 data: 
 emails 
   email 
 header... /header 
 body ... /body 
   ... 
 
 My colleagues argue, the have to produce this mixing of data and
 presentation I have described because the way Cocoon handles i18n using
 the I18n-Transformer. 
 
 Isn't there a simple way to tell Cocoon which (language-specific)
 XSL-stylesheet to use according to the preference the user has chosen or
 according to the language preference of the browser? 
 Or perhaps have a lanugage-indenpendent XSP-page which produces a
 language-specific XSL-stylesheet on demand? (looks to be more complicated
 to be me) 
 
 Many thanks for any input, 
 
 Hans 
 

-
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: I18n Performance

2002-05-22 Thread Konstantin Piroumian

There were an activity in Avalon scratchpad a while ago on the i18n
resources abstractization, but AFAIK it was never finished. The idea was to
have a Bundle interface and use any implementation you like: a property
file, XML file or a database. Also, you could use different factories for
your bundles, say use a property file that is loaded from a DB, JNDI and so
on.

Current implementation of XMLResourceBundle is the first implementation from
the Avalon scratchpad. I know that the  approach in i18n transformer is very
limiting, but since nobody complained about it before (except for the
superfluous logging) I've never care about it.

Btw, I don't think that replacing XMLResourceBundle with a HashMap will
improve perfomance much in the long run, because the values are stored in a
HashMap on the first use, so there should be no much difference.

I've redesigned i18n samples and now working on the documentation to attract
more people to use it and therefore more people will be interested to
improve it.
But the time is everyone's problem...

Konstantin


- Original Message -
From: Torsten Curdt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, May 21, 2002 10:44 PM
Subject: Re: I18n Performance


  But IIRC the I18nTransformer is still not cachable - is he?

 doh! Yes, you're correct. (I'm using my own bastardization of the standard
 I18nTransformer over here. Cacheable + very fast since i replaced the
 XMLResoruceBundles with some hashmaps. Its on my list to package up +
 donate back, time is just very very slim :(

Same here *sigh*

Ages ago I proposed some changes on having a more abstract resource bundle
(we'd like serve our from db) which has a last modified stamp so we can
easily implement cacheable... but time you know ;-)

This would be a major(!) improvement... we haven't yet (and wouldn't) use
the
i18n transformer under the current circumstances.

My 2 cents
--
Torsten

-
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: I18n Performance

2002-05-22 Thread Volker Schneider

Hi Nicola,

working with WebSphereApplicationDeveloper my experience was, that the value
in web.xml helps to avoid WebSphere logs which decreases performance.

Best regards
- Volker -

-Original Message-
From: Nicola Ken Barozzi [mailto:[EMAIL PROTECTED]]
Sent: Dienstag, 21. Mai 2002 18:35
To: [EMAIL PROTECTED]
Subject: Re: I18n Performance


From: Michael Zehrer [EMAIL PROTECTED]

 I'm using I18n just for simple translations, no number, date,
 currency formatting and just one substitution. My log level is already
 ERROR.
 So nothing real special here. If I take out the I18n transformation,
 everything is quite ok, if it's in the cpu load is very high after a
 little while and pipeline processing takes very long.

 The machine is a Sun Netra X1 (500Mhz/2GB RAM)

Sorry if I'm being pedantic, but did you set your log-level in the
logkit.xconf file?
The one in web.xml is used only at startup and when logkit.xconf is absent.

--
Nicola Ken Barozzi   [EMAIL PROTECTED]
- verba volant, scripta manent -
   (discussions get forgotten, just code remains)
-


-
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: I18n Performance

2002-05-22 Thread Peter Royal

On Wednesday 22 May 2002 03:24 am, Konstantin Piroumian wrote:
 Btw, I don't think that replacing XMLResourceBundle with a HashMap will
 improve perfomance much in the long run, because the values are stored in a
 HashMap on the first use, so there should be no much difference.

Agreeed. One of our main problems was the first use though. In development it 
would take a minute or two to fully translate our menu file (large 
chunk-o-javascript) with the XMLResourceBundle based approach. While some of 
the abstractions of the XMLResourceBundle are nice, it isn't really 
neccessary to parse an XPath each time a value is retrieved.

I parse the i18n dictionaries at startup and store the key/values in an 
unsynchronized hashmap and the transformer flies now.

Perhaps we can abstract out an interface for the I18nTransformer to talk to a 
catalogue/dictionary source so the XMLResourceBundle usage is optional? I'd 
love for my changes to the I18nTransformer to be able to make it back to the 
main trunk.
-pete


-- 
peter royal - [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: I18n Performance

2002-05-22 Thread Konstantin Piroumian

From: Peter Royal [EMAIL PROTECTED]

 On Wednesday 22 May 2002 03:24 am, Konstantin Piroumian wrote:
  Btw, I don't think that replacing XMLResourceBundle with a HashMap will
  improve perfomance much in the long run, because the values are stored
in a
  HashMap on the first use, so there should be no much difference.

 Agreeed. One of our main problems was the first use though. In development
it
 would take a minute or two to fully translate our menu file (large
 chunk-o-javascript) with the XMLResourceBundle based approach. While some
of
 the abstractions of the XMLResourceBundle are nice, it isn't really
 neccessary to parse an XPath each time a value is retrieved.

As I've said, really cool abstractions (a Bundle and not XMLResourceBundle)
were never been finalized and remained in Avalon scratchpad.
XMLResourceBundle is used in a little unusual way now: it behaves just like
an XML property file, while it could provide an XML content using XPath
expressions and not the current hard-coded one.


 I parse the i18n dictionaries at startup and store the key/values in an
 unsynchronized hashmap and the transformer flies now.

Did you use the 'cache-at-startup' configuration parameter? I was sure that
it was for exactly the same thing, though my information can be our of date,
hadn't a look at it for a long time. Also, I can remember some Hashtables
there, they should be replaced by HashMaps too.


 Perhaps we can abstract out an interface for the I18nTransformer to talk
to a
 catalogue/dictionary source so the XMLResourceBundle usage is optional?
I'd
 love for my changes to the I18nTransformer to be able to make it back to
the
 main trunk.

Yes, that would be fine! I think that the best thing would be to separate
dictionary handling from the transformer at all and use either a custom
source, say: transform src=i18n:db:/catalogue/messages / or transform
src=i18n:xml:/catalogue/messages /, or configure it like an SQL
connection and use a short name of it for the transformer
configuration/parameterization:
transformer ...
bundle-factoryxml/bundle-factory
/transformer

or something like that.

What do you think? I'd also recommend you to look at the i18n stuff in the
Avalon scratchpad.

Konstantin

P.S. Unfortunately, I can help only with comments/suggestions for now
because of (as usual) a limited time.

 -pete


 --
 peter royal - [EMAIL PROTECTED]

 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: I18n Performance

2002-05-22 Thread Peter Royal

On Wednesday 22 May 2002 09:08 am, Konstantin Piroumian wrote:
 As I've said, really cool abstractions (a Bundle and not XMLResourceBundle)
 were never been finalized and remained in Avalon scratchpad.

Right, I looked at it and it was more complex than I was needing at the time.

 Did you use the 'cache-at-startup' configuration parameter? I was sure that
 it was for exactly the same thing, though my information can be our of
 date, hadn't a look at it for a long time. Also, I can remember some
 Hashtables there, they should be replaced by HashMaps too.

Yes, I did. It just moves the speed hit around a bit :)

Also due to how we use the I18nTransformer, we pass our content through 
multiple times (2-3) with the first stage generating lots of misses, also 
expensive time-wise.

 Yes, that would be fine! I think that the best thing would be to separate
 dictionary handling from the transformer at all and use either a custom
 source, say: transform src=i18n:db:/catalogue/messages / or transform
 src=i18n:xml:/catalogue/messages /, or configure it like an SQL
 connection and use a short name of it for the transformer
 configuration/parameterization:
 transformer ...
 bundle-factoryxml/bundle-factory
 /transformer

 or something like that.

 What do you think? I'd also recommend you to look at the i18n stuff in the
 Avalon scratchpad.

That sounds very good. The Excalibur Bundle pieces would be one example of a 
factory.

 P.S. Unfortunately, I can help only with comments/suggestions for now
 because of (as usual) a limited time.

me too. this is all going on my TODO tho :)
-pete

-- 
peter royal - [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: I18n Performance

2002-05-21 Thread Konstantin Piroumian

i18n transformer output too much data into logs, so changing the log level
from DEBUG to something else should help a lot.

Can you provide more info on what is the cause? Are you using number, date,
currency formatting? Are you using param substitution? The more info you'll
provide the more we would help you.

Konstantin

- Original Message -
From: Michael Zehrer [EMAIL PROTECTED]
To: Cocoon-Users (E-Mail) [EMAIL PROTECTED]
Sent: Tuesday, May 21, 2002 7:18 PM
Subject: I18n Performance


Hi List,

I experience very bad performance under high load using the I18n
Transformer, are there any tips for performance improving oder anybody
know about an alternative?

Cheers, Michael

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




RE: I18n Performance

2002-05-21 Thread Michael Zehrer

I'm using I18n just for simple translations, no number, date,
currency formatting and just one substitution. My log level is already
ERROR.
So nothing real special here. If I take out the I18n transformation,
everything is quite ok, if it's in the cpu load is very high after a
little while and pipeline processing takes very long.

The machine is a Sun Netra X1 (500Mhz/2GB RAM)

Michael

-Ursprüngliche Nachricht-
Von: Konstantin Piroumian [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 21. Mai 2002 17:26
An: [EMAIL PROTECTED]
Betreff: Re: I18n Performance


i18n transformer output too much data into logs, so changing the log
level
from DEBUG to something else should help a lot.

Can you provide more info on what is the cause? Are you using number,
date,
currency formatting? Are you using param substitution? The more info
you'll
provide the more we would help you.

Konstantin

- Original Message -
From: Michael Zehrer [EMAIL PROTECTED]
To: Cocoon-Users (E-Mail) [EMAIL PROTECTED]
Sent: Tuesday, May 21, 2002 7:18 PM
Subject: I18n Performance


Hi List,

I experience very bad performance under high load using the I18n
Transformer, are there any tips for performance improving oder anybody
know about an alternative?

Cheers, Michael

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: I18n Performance

2002-05-21 Thread Nicola Ken Barozzi

From: Michael Zehrer [EMAIL PROTECTED]

 I'm using I18n just for simple translations, no number, date,
 currency formatting and just one substitution. My log level is already
 ERROR.
 So nothing real special here. If I take out the I18n transformation,
 everything is quite ok, if it's in the cpu load is very high after a
 little while and pipeline processing takes very long.

 The machine is a Sun Netra X1 (500Mhz/2GB RAM)

Sorry if I'm being pedantic, but did you set your log-level in the
logkit.xconf file?
The one in web.xml is used only at startup and when logkit.xconf is absent.

--
Nicola Ken Barozzi   [EMAIL PROTECTED]
- verba volant, scripta manent -
   (discussions get forgotten, just code remains)
-


-
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: I18n Performance

2002-05-21 Thread Peter Royal

On Tuesday 21 May 2002 11:50 am, Michael Zehrer wrote:
 I'm using I18n just for simple translations, no number, date,
 currency formatting and just one substitution. My log level is already
 ERROR.
 So nothing real special here. If I take out the I18n transformation,
 everything is quite ok, if it's in the cpu load is very high after a
 little while and pipeline processing takes very long.

It is very slow. I would recommend optimizing your pipelines for cachability 
to the I18nTransformer is not executed on each request. 
-pete

-- 
peter royal - [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: I18n Performance

2002-05-21 Thread Torsten Curdt

On Tuesday 21 May 2002 19:02, Peter Royal wrote:
 On Tuesday 21 May 2002 11:50 am, Michael Zehrer wrote:
  I'm using I18n just for simple translations, no number, date,
  currency formatting and just one substitution. My log level is already
  ERROR.
  So nothing real special here. If I take out the I18n transformation,
  everything is quite ok, if it's in the cpu load is very high after a
  little while and pipeline processing takes very long.

 It is very slow. I would recommend optimizing your pipelines for
 cachability to the I18nTransformer is not executed on each request.

But IIRC the I18nTransformer is still not cachable - is he?
--
Torsten

-
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: I18n Performance

2002-05-21 Thread Torsten Curdt

  But IIRC the I18nTransformer is still not cachable - is he?

 doh! Yes, you're correct. (I'm using my own bastardization of the standard
 I18nTransformer over here. Cacheable + very fast since i replaced the
 XMLResoruceBundles with some hashmaps. Its on my list to package up +
 donate back, time is just very very slim :(

Same here *sigh*

Ages ago I proposed some changes on having a more abstract resource bundle 
(we'd like serve our from db) which has a last modified stamp so we can 
easily implement cacheable... but time you know ;-)

This would be a major(!) improvement... we haven't yet (and wouldn't) use the 
i18n transformer under the current circumstances.

My 2 cents
--
Torsten

-
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: I18n Performance

2002-05-21 Thread Michael Zehrer

How would I do this?

Michael

Am Die, 2002-05-21 um 19.02 schrieb Peter Royal:
 On Tuesday 21 May 2002 11:50 am, Michael Zehrer wrote:
  I'm using I18n just for simple translations, no number, date,
  currency formatting and just one substitution. My log level is already
  ERROR.
  So nothing real special here. If I take out the I18n transformation,
  everything is quite ok, if it's in the cpu load is very high after a
  little while and pipeline processing takes very long.
 
 It is very slow. I would recommend optimizing your pipelines for cachability 
 to the I18nTransformer is not executed on each request. 
 -pete
 
 -- 
 peter royal - [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]
 

-- 
Mit freundlichen Grüßen

Michael Zehrer


OPTIMAL SYSTEMS
Gesellschaft für innovative Computertechnologien mbH
Cicerostraße 26, 10709 Berlin
Tel.:   030 - 8 95 70 80
Fax:030 - 8 95 70 88 88
E-Mail: [EMAIL PROTECTED] 
Web:www.optimal-systems.de, www.epa.de, www.optimal-AS.de


-
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: I18n Performance

2002-05-21 Thread Peter Royal

On Tuesday 21 May 2002 02:44 pm, Torsten Curdt wrote:
 Ages ago I proposed some changes on having a more abstract resource bundle
 (we'd like serve our from db) which has a last modified stamp so we can
 easily implement cacheable... but time you know ;-)

I have 1/2 that :) 
We have bundles on disk that are our system translations and bundles in the 
DB that are user-defined that layer on top of the system ones. I haven't 
implemented last-modified support yet since I don't need it, but it wouldn't 
be bad.

 This would be a major(!) improvement... we haven't yet (and wouldn't) use
 the i18n transformer under the current circumstances.

I'll try and package it up sooner :)
-pete

-- 
peter royal - [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: I18n Performance

2002-05-21 Thread Stephen Ng

I think it would be swell if any transformer was cacheable, and the
cache was controllable from the sitemap; e.g. SQLTransformer.

 -Original Message-
 From: Peter Royal [mailto:[EMAIL PROTECTED]] 
 Sent: Tuesday, May 21, 2002 3:15 PM
 To: [EMAIL PROTECTED]
 Subject: Re: I18n Performance
 
 
 On Tuesday 21 May 2002 02:44 pm, Torsten Curdt wrote:
  Ages ago I proposed some changes on having a more abstract resource 
  bundle (we'd like serve our from db) which has a last 
 modified stamp 
  so we can easily implement cacheable... but time you know ;-)
 
 I have 1/2 that :) 
 We have bundles on disk that are our system translations and 
 bundles in the 
 DB that are user-defined that layer on top of the system 
 ones. I haven't 
 implemented last-modified support yet since I don't need it, 
 but it wouldn't 
 be bad.
 
  This would be a major(!) improvement... we haven't yet (and 
 wouldn't) 
  use the i18n transformer under the current circumstances.
 
 I'll try and package it up sooner :)
 -pete
 
 -- 
 peter royal - [EMAIL PROTECTED]
 
 -
 Please check that your question has not already been answered 
 in the FAQ before posting. 
http://xml.apache.org/cocoon/faqs.html

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


-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: i18n

2002-05-07 Thread Konstantin Piroumian

 Hi,

 I'm wondering what is the preferred use of i18n. I'm developing a
 bi-lingual site.

 I've looked at message catalogs, but I don't want to insert all my content
 in a single file (of course).

You don't have to. You can use as many files as you wish. See latest i18n
samples (/samples/i18n/).


 should I use the locale variable to choose between directories that have
 translated xml files with content ?

That depends on the nature of your site. If it's more information site then
it'll be better to have separate directories. But if it's data-driven
application, where most of the data comes from a database and you have a lot
of input forms, then it's worth using i18n transformer.

--
  Konstantin


 thanks
 Ricardo Trindade


 -
 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: i18n transformer problem

2002-04-26 Thread Konstantin Piroumian

Hi

 Hello,

 Can someone help me to understand why i18n transformer divides key?

This is the behavior of SAX parser. But I thought that I've fixed that. Are
you using the latest version (either from 2.0.3 branch or HEAD)?

This happens because SAX parser sometimes divides text into smaller chunks.
I18nTransformer was changed to buffer the text to prevent incomplete keys.
I'll check it, though, I've never seen this even with very long keys. Please
tell me what is your configuration? What is your parser?

--
Konstantin

 Input XML contains the following line:
 i18n:textLNG_LUB_Consultation_Fournisseurs/i18n:text

 In messages files appropriate translation is present:
 message key=LNG_LUB_Consultation_FournisseursConsultation
 Fournisseurs/message

 However in a browser I get untranslated-text and in sitemap.log I see
 that the transformer divides the key (other keys are translated though):

 DEBUG   (2002-04-26) 11:08.38:250   [sitemap.transformer.i18n]
 (/bdl/providers) HttpProcessor[8080][1]/I18nTransformer:
 I18nTransformer: Starting i18n element: text
 DEBUG   (2002-04-26) 11:08.38:250   [sitemap.transformer.i18n]
 (/bdl/providers) HttpProcessor[8080][1]/I18nTransformer:
 I18nTransformer: Start i18n element: text
 DEBUG   (2002-04-26) 11:08.38:250   [sitemap.transformer.i18n]
 (/bdl/providers) HttpProcessor[8080][1]/I18nTransformer:
 I18nTransformer: i18n message text = 'LNG_LUB_Cons'
 DEBUG   (2002-04-26) 11:08.38:250   [sitemap.transformer.i18n]
 (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
 returning from cache: /catalogue/message[@key='LNG_LUB_Cons']
 DEBUG   (2002-04-26) 11:08.38:250   [sitemap.transformer.i18n]
 (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
 cache_not_found contains: /catalogue/message[@key='LNG_LUB_Cons']
 DEBUG   (2002-04-26) 11:08.38:260   [sitemap.transformer.i18n]
 (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
 returning from cache: /catalogue/message[@key='LNG_LUB_Cons']
 DEBUG   (2002-04-26) 11:08.38:260   [sitemap.transformer.i18n]
 (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
 cache_not_found contains: /catalogue/message[@key='LNG_LUB_Cons']
 DEBUG   (2002-04-26) 11:08.38:280   [sitemap.transformer.i18n]
 (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
 caching not_found: /catalogue/message[@key='LNG_LUB_Cons']
 DEBUG   (2002-04-26) 11:08.38:280   [sitemap.transformer.i18n]
 (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
 caching not_found: /catalogue/message[@key='LNG_LUB_Cons']
 DEBUG   (2002-04-26) 11:08.38:280   [sitemap.transformer.i18n]
 (/bdl/providers) HttpProcessor[8080][1]/I18nTransformer:
 I18nTransformer: i18n message text = 'ultation_Fournisseurs'
 DEBUG   (2002-04-26) 11:08.38:290   [sitemap.transformer.i18n]
 (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
 returning from cache: /catalogue/message[@key='ultation_Fournisseurs']
 DEBUG   (2002-04-26) 11:08.38:290   [sitemap.transformer.i18n]
 (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
 cache_not_found contains:
 /catalogue/message[@key='ultation_Fournisseurs']
 DEBUG   (2002-04-26) 11:08.38:290   [sitemap.transformer.i18n]
 (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
 returning from cache: /catalogue/message[@key='ultation_Fournisseurs']
 DEBUG   (2002-04-26) 11:08.38:290   [sitemap.transformer.i18n]
 (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
 cache_not_found contains:
 /catalogue/message[@key='ultation_Fournisseurs']
 DEBUG   (2002-04-26) 11:08.38:300   [sitemap.transformer.i18n]
 (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
 caching not_found: /catalogue/message[@key='ultation_Fournisseurs']
 DEBUG   (2002-04-26) 11:08.38:300   [sitemap.transformer.i18n]
 (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
 caching not_found: /catalogue/message[@key='ultation_Fournisseurs']
 DEBUG   (2002-04-26) 11:08.38:300   [sitemap.transformer.i18n]
 (/bdl/providers) HttpProcessor[8080][1]/I18nTransformer:
 I18nTransformer: End i18n element: text
 DEBUG   (2002-04-26) 11:08.38:300   [sitemap.transformer.i18n]
 (/bdl/providers) HttpProcessor[8080][1]/I18nTransformer:
 I18nTransformer: End text element, translated_text: untranslated-text


 Thank you for your response.
 Roman


 -
 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 

Re: i18n transformer problem

2002-04-26 Thread KOZLOV Roman

Hello Konstantin,

Thank you for your reply. My configuration is Tomcat 4.0.1, Cocoon 2.0.1 with
its default parsers.

Roman

Konstantin Piroumian wrote:

 Hi

  Hello,
 
  Can someone help me to understand why i18n transformer divides key?

 This is the behavior of SAX parser. But I thought that I've fixed that. Are
 you using the latest version (either from 2.0.3 branch or HEAD)?

 This happens because SAX parser sometimes divides text into smaller chunks.
 I18nTransformer was changed to buffer the text to prevent incomplete keys.
 I'll check it, though, I've never seen this even with very long keys. Please
 tell me what is your configuration? What is your parser?

 --
 Konstantin

  Input XML contains the following line:
  i18n:textLNG_LUB_Consultation_Fournisseurs/i18n:text
 
  In messages files appropriate translation is present:
  message key=LNG_LUB_Consultation_FournisseursConsultation
  Fournisseurs/message
 
  However in a browser I get untranslated-text and in sitemap.log I see
  that the transformer divides the key (other keys are translated though):
 
  DEBUG   (2002-04-26) 11:08.38:250   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/I18nTransformer:
  I18nTransformer: Starting i18n element: text
  DEBUG   (2002-04-26) 11:08.38:250   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/I18nTransformer:
  I18nTransformer: Start i18n element: text
  DEBUG   (2002-04-26) 11:08.38:250   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/I18nTransformer:
  I18nTransformer: i18n message text = 'LNG_LUB_Cons'
  DEBUG   (2002-04-26) 11:08.38:250   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
  returning from cache: /catalogue/message[@key='LNG_LUB_Cons']
  DEBUG   (2002-04-26) 11:08.38:250   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
  cache_not_found contains: /catalogue/message[@key='LNG_LUB_Cons']
  DEBUG   (2002-04-26) 11:08.38:260   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
  returning from cache: /catalogue/message[@key='LNG_LUB_Cons']
  DEBUG   (2002-04-26) 11:08.38:260   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
  cache_not_found contains: /catalogue/message[@key='LNG_LUB_Cons']
  DEBUG   (2002-04-26) 11:08.38:280   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
  caching not_found: /catalogue/message[@key='LNG_LUB_Cons']
  DEBUG   (2002-04-26) 11:08.38:280   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
  caching not_found: /catalogue/message[@key='LNG_LUB_Cons']
  DEBUG   (2002-04-26) 11:08.38:280   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/I18nTransformer:
  I18nTransformer: i18n message text = 'ultation_Fournisseurs'
  DEBUG   (2002-04-26) 11:08.38:290   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
  returning from cache: /catalogue/message[@key='ultation_Fournisseurs']
  DEBUG   (2002-04-26) 11:08.38:290   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
  cache_not_found contains:
  /catalogue/message[@key='ultation_Fournisseurs']
  DEBUG   (2002-04-26) 11:08.38:290   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
  returning from cache: /catalogue/message[@key='ultation_Fournisseurs']
  DEBUG   (2002-04-26) 11:08.38:290   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
  cache_not_found contains:
  /catalogue/message[@key='ultation_Fournisseurs']
  DEBUG   (2002-04-26) 11:08.38:300   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
  caching not_found: /catalogue/message[@key='ultation_Fournisseurs']
  DEBUG   (2002-04-26) 11:08.38:300   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/XMLResourceBundle: messages:
  caching not_found: /catalogue/message[@key='ultation_Fournisseurs']
  DEBUG   (2002-04-26) 11:08.38:300   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/I18nTransformer:
  I18nTransformer: End i18n element: text
  DEBUG   (2002-04-26) 11:08.38:300   [sitemap.transformer.i18n]
  (/bdl/providers) HttpProcessor[8080][1]/I18nTransformer:
  I18nTransformer: End text element, translated_text: untranslated-text
 
 
  Thank you for your response.
  Roman
 
 
  -
  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: i18n in xslt

2002-04-23 Thread TREGAN Fabien

not sure this will help but...

my-space.xsl - logicsheet processing tag for other tags
template match=my-space:component
    missing an 
here
 struct
  item1any_link/item1
  item2/
 /struct
/template

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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




Re: i18n in xslt

2002-04-23 Thread Jerzy Kut

Sorry - of course. But it don't helps. I paste only abbrewiated snippets
into post.
But thank You.
Trouble is located somewhere in component.xslt i think, but i don't
understand why nullpointerexception is throwed...

- Original Message -
From: TREGAN Fabien [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 23, 2002 1:09 PM
Subject: RE: i18n in xslt


 not sure this will help but...

 my-space.xsl - logicsheet processing tag for other tags
 template match=my-space:component
 missing an

 here
  struct
   item1any_link/item1
   item2/
  /struct
 /template

 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html

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


-
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: i18n in xslt

2002-04-23 Thread KOZLOV Roman

Hello,

Do you specify request parameter locale with value for which
messages_lng.xml exists?

Roman

Jerzy Kut wrote:

 Sorry - of course. But it don't helps. I paste only abbrewiated snippets
 into post.
 But thank You.
 Trouble is located somewhere in component.xslt i think, but i don't
 understand why nullpointerexception is throwed...

 - Original Message -
 From: TREGAN Fabien [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, April 23, 2002 1:09 PM
 Subject: RE: i18n in xslt

  not sure this will help but...
 
  my-space.xsl - logicsheet processing tag for other tags
  template match=my-space:component
  missing an
 
  here
   struct
item1any_link/item1
item2/
   /struct
  /template
 
  -
  Please check that your question has not already been answered in the
  FAQ before posting. http://xml.apache.org/cocoon/faqs.html
 
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]

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




  1   2   >