RE: Antw: XSL parameter question

2002-02-14 Thread Gustav Liden

That was it! Thanks alot!

Gustav

 -Original Message-
 From: Johannes Schwarz [mailto:[EMAIL PROTECTED]]
 Sent: den 14 februari 2002 13:33
 To: [EMAIL PROTECTED]
 Subject: Antw: XSL parameter question
 
 
 Hi Gustav!
 
 Try  it withnormalize-space()  Function, maybe there are
 white-spaces in your request parameter
 
 xsl:sort select =normalize-space($sortby)/xsl:sort
 
 
 Johannes
 
 
 
 
 
 
  [EMAIL PROTECTED] 14.02.2002  12.38 Uhr 
 Hi,
 
 As an XSL-beginner, I'm having a problem I don't understand that has to
 do
 with parameter passing through the sitemap to an XSL:
 
 Can anyone see why the sorting (using 'sortby' parameter) of my
 elements
 doesn't work while the parameter is correctly output later. If I
 hardcode
 sorting (see commenting) it works...
 
 XSL:
 
 ?xml version=1.0 encoding=UTF-8?
 xsl:stylesheet version=1.0
 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
   xsl:param name=sortby/
   xsl:output method=xml/
   xsl:template match=QueryResult
   QueryResult
   table spacing=
   xsl:apply-templates select=Customer
   xsl:sort select
 =$sortby/xsl:sort
 !--  xsl:sort select
 =City/xsl:sort--
   /xsl:apply-templates
   /table
   /QueryResult
   /xsl:template
   xsl:template match=Customer
   row
   column
   justtextxsl:value-of
 select=$sortby/xsl:value-of
 select=Name//justtext
   /column
   column
   justtextxsl:value-of
 select=City//justtext
   /column
   /row
   /xsl:template
 /xsl:stylesheet
 
 Anyone sees what's wrong?
 
 Thanks,
 
 Gustav
 
 
 -
 Please check that your question has not already been answered in the
 FAQ before posting. http://xml.apache.org/cocoon/faqs.html
 
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

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

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




C2.1-dev i18n default language

2002-01-12 Thread Gustav Liden

Hi,

I'm using i18n for managing a bi-lingual website (in English and Swedish).

My message catalogs have the following filename endings:

..._sv.xml - for the Swedish text
xml - for English, since I want this to be the default language

However, if I request an english page, Cocoon will first look for a
..._en.xml file, and not finding it giving an IOExeption (FileNotFound)
before looking for the default language. It works great, but makes the logs
very unreadable since all they contain are these stack traces.

Is there any way to go around this without keeping multiple files containing
the same language? (i.e. xml and ..._en.xml)

Still love Cocoon2 though!

Gustav Liden


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




LangSelect Action does not store language setting

2001-09-26 Thread Gustav Liden

Hi all,

As I have understood, the LangSelect Action should be configurable via
map:parameters to store the selected language in different ways. My
sitemap looks like this:

map:actions
map:action name=lang-select src=org.apache.cocoon.acting.LangSelect
map:parameter name=create-session value=true/
map:parameter name=store-in-session value=true/
/map:action
/map:actions

However, the language selection mechanism only works when my links end with
?lang=XX. What more is needed? Or have I misunderstood something?

Cheers,

Gustav



-
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 translation with subelements

2001-09-25 Thread Gustav Liden

No, I gave that a shot, but the CDATA element is maintained intact through
all processing steps showing The bfirst/b paragraph as text also in
HTML.

Thanks anyway for the tip :)

Thanks also Konstantin for your answer! It saved me alot of trial and error.

Regards,

Gustav

-Original Message-
From: Michael McKibben [mailto:[EMAIL PROTECTED]]
Sent: den 25 september 2001 19:52
To: [EMAIL PROTECTED]
Subject: Re: i18n  translation with subelements


Would it work if the text was wrapped as CDATA? I.e.

translation xml:lang=en![CDATA[The bfirst/b
paragraph]]/translation

Regards,

--mike

On Tue, 25 Sep 2001, Piroumian, Konstantin wrote:

  I am developing an international website with mainly static content, but
  have run into a problem related to i18n.
 
  I would like to translate whole paragraphs of text using the i18n
 framework,
  but would like these paragraphs to contain some more or less html-like
 tags.
  The problem is that I18nTransformer seems to only copy the last text
node
  from a translation tag.

 Yes, that's true. i18ntransformer does not support nested XML. Speaking
 frankly I've been thinking about this, but couldn't find a good solution.
 For large XML text insertions maybe it'd better to use something like
 XInclude ot CInclude?

 
  An example of what I would like to have:
 
  translation lang=enThe bfirst/b paragraph/translation
 
  giving the translated english result:
  The bfirst/b paragraph
 
  ...later to be serialized into an html file.
 
  Howewver, the result is just:
  paragraph
 
  I can understand that there is some basic framework constraint I could
be
  violating, but I don't have the experience to point it out. Could
someone
 do
  that for me? Anyone with a solution or a work-around?

 An ugly workaround is to use separate translation tags for every part,
but,
 sure, it's not a good way:


i18n:textThe/i18n:textbi18n:textfirst/i18n:text/bi18n:textpara
 graph/i18n:text.

 As I remember, this problem appears because of XML format of dictionaries.
 How would you specify a translation entry like that in the dictionary?

 Maybe, we need something like i18n:xml tag? But I have no clear idea of
 how to implement it.

 
  /Gustav
 
 

 Best regards,

 Konstantin Piroumian
 Sr. Software engineer

 Protek Flagship LLC
 Phone: + 7 095 795 0520 (add. 1288)
 Fax: + 7 095 795 0525
 E-mail: [EMAIL PROTECTED]
 http://www.protek.com

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