troubles with sunrise

2002-07-19 Thread Barbara Post

Hello, I tried to do the same as on :
http://www.need-a-cake.com/stories/2002/02/28/usingTheSunriseComponents.html
but get :

org.apache.avalon.framework.component.ComponentException: Could not find
component
 at
org.apache.avalon.excalibur.component.ExcaliburComponentManager.lookup(Excal
iburComponentManager.java:367)
 at
org.apache.cocoon.components.CocoonComponentManager.lookup(CocoonComponentMa
nager.java:167)

without knowing which component is in cause...

what's wrong ? thanks !

Babs


-
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: sitemap variables?

2002-07-19 Thread Piroumian Konstantin

 From: icewind [mailto:[EMAIL PROTECTED]] 
 
 I looked at the threads, and in my sitemap, and
 figured that defining something like: 
 
 map:global-parameters
map:global-parameter name=doc-base
 value=/home/icewind0/cocoon-files/
 /map:global-parameters
 
 
 I can't figure out how to use it in a pipeline. How do
 I reference doc-base in one of my pipelines?
 
 I'm tried:
 
 map:generate type=directory src=$doc-base/docs
 [...]
 /map:generate
 
 and
 
 map:generate type=directory src={doc-base}/docs
 [...]
 /map:generate
 
 
 Neither works. Any suggestions? Is
 map:global-parameters documented somewhere?

Try {/doc-base}.

AFAK, this not documented and, more over, it can be removed in favour of
InputModules. Don't forget that C2.1 is in alpha stage still.

Konstantin

 
 
 
 
 
 --- Vadim Gritsenko [EMAIL PROTECTED]
 wrote:
  Read on:
  
 
 http://marc.theaimsgroup.com/?l=xml-cocoon-usersw=2r=1s=glo
bal+parame
 tersq=b
 
 about input modules and other options.
 
 Vadim


__
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.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: RE: RE: Re: mixing xml and xsl with i18n

2002-07-19 Thread kavitha ramesh

Hi Konstantin,

There is no 1i8n related messages in the log file.I turned off the 
xslt and tried.Iam getting the names Kavitha, Ramesh in the 
browser.

Kavitha

On Thu, 18 Jul 2002 Piroumian Konstantin wrote :
  From: kavitha ramesh [mailto:[EMAIL PROTECTED]]
 
  Hi Konstantin,
 
  1.I checked the cocoon log file and it says that:
  DEBUG   (2002-07-18) 17:15.25:840   [cocoon  ]
  (/cocoon/concatenate/jsp/conc) 
HttpProcessor[8080][4]/DefaultPool:
  Retrieving a
  org.apache.cocoon.components.pipeline.CachingEventPipeline 
 from
  the pool

Look for any i18n related messages.
Turn off i18n part to see is your result correct, do you have 
correct keys.
Turn of XSLT to see if you have correct XML at startup.
etc.

 
  2.I use JSP since I dont have much knowledge in XSP.

If you know JSP then it won't be difficult to learn XSP. It's 
very similar
to XML syntax of JSP 1.2.

 
  3.As per your suggestion I ran the transformer once in the
  sitemap.But still in the browser, nothing is displayed,,,

So, try other suggestions from the above.

Konstantin

 
  Kavitha.
 
  On Thu, 18 Jul 2002 Piroumian Konstantin wrote :
From: kavitha ramesh 
[mailto:[EMAIL PROTECTED]]
   
Hi Jeorg,
   
The output is just a blank page.My sitemap is as 
follows(My
  file
is a jsp file):
   
map:match pattern=jsp/*
map:generate type=jsp 
src=/concatenate/jsp/{1}.jsp/
map:transform type=i18n/
map:transform src=conc.xsl/
map:transform type=i18n/
map:serialize type=html/
/map:match
   
   
my log files has the following content:
   
Logger for category root.xslt returned
  
  And that's all? Are you looking at the Cocoon logs? See
  cocoon/WEB-INF/logs directory.
  
  Seems that your problem has nothing to do with i18n and
  something's wrong
  with your sitemap or JSP page.
  
  Btw, why are you using JSP? It's slower than XSP, cause it
  generates text
  that should be parsed, while XSP generates SAX events 
directly.
  
  Is there a real need for running i18n two times? Won't it 
be
  enough to run
  it in the end? It will also raise your pipeline 
performance.
  
  Konstantin
  
   
   
Kavitha
   
   
On Thu, 18 Jul 2002 Joerg Heinicke wrote :
What's your output? You should at least see 'Male' and
  'Female'
in the output. If you don't specify a key (i18n:key
  attribute),
the text in the i18n:text/i18n:text element is used 
as
  key,
therefore I wrote xsl:value-of select=@sex/.

How does your sitemap according i18n look like? What's
  written in
the log files?

Joerg

kavitha ramesh wrote:

Hi Jeorg,

Thanks for your reply.
Nothing is happening when I tried your code.In the xsl
  file
should I add the message keys Male and Female?

Kavitha


On Thu, 18 Jul 2002 Joerg Heinicke wrote :

xsl:stylesheet version=1.0
xmlns:xsl=http://www.w3.org/1999/XSL/Transform;
xmlns:i18n=http://apache.org/cocoon/i18n/2.0;

   xsl:template match=gender
 i18n:textxsl:value-of 
select=@sex//i18n:text
 xsl:text/ xsl:value-of select=name/
   /xsl:template

/xsl:stylesheet

in catalogue_en.xml:

message key=MaleMr./message
message key=FemaleMrs./message

in catalogue_de.xml:

message key=MaleFrau/message
message key=FemaleHerr/message

Regards,

Joerg


kavitha ramesh wrote:

Hi,

I have an xml file which is as follows:

simple.xml
--
menu
person
gender sex=Male
nameRamesh/name
/gender
/person
person
gender sex=Female
nameKavitha/name
/gender
/person
person
/menu

and my xsl file is as follows:

simple.xsl
--

i18n:texttext1/i18n:text
i18n:texttext2/i18n:text


and my messages for i18n are as follows:

messages_en
---
message key=text1Mr/message
message key=text2Mrs/message

messages_de
---
message key=text1Herrn/message
message key=text2Frau/message

If the sex is male, the browser should display

Mr.Ramesh(English)
Herrn.Ramesh(German)

If the sex is female then the browser should display

Mrs.Kavitha(English)
Frau.Kavitha(German)

How do I do this?Please help me,,,

Kavitha.

--
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: troubles with sunrise

2002-07-19 Thread Matthew Langham

Barbara,

which version of Cocoon are you using? My article refers to version 2.0.x.
And the correct link to the article is:

http://radio.weblogs.com/0103021/stories/2002/02/28/usingTheSunriseComponent
s.html

Matthew
--
Open Source Group   Cocoon { Consulting, Training, Projects }
=
Matthew Langham, SN AG, Klingenderstrasse 5, D-33100 Paderborn
Tel:+49-5251-1581-30  [EMAIL PROTECTED] - http://www.s-und-n.de
-
Cocoon book:
  http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20
=




-Original Message-
From: Barbara Post [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 19, 2002 9:34 AM
To: [EMAIL PROTECTED]
Subject: troubles with sunrise


Hello, I tried to do the same as on :
http://www.need-a-cake.com/stories/2002/02/28/usingTheSunriseComponents.html
but get :

org.apache.avalon.framework.component.ComponentException: Could not find
component
 at
org.apache.avalon.excalibur.component.ExcaliburComponentManager.lookup(Excal
iburComponentManager.java:367)
 at
org.apache.cocoon.components.CocoonComponentManager.lookup(CocoonComponentMa
nager.java:167)

without knowing which component is in cause...

what's wrong ? thanks !

Babs


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




[SUMMARY]XMLForm, extended validation and error messages

2002-07-19 Thread michael_hampel

Hi Ivelin,

   thanks again for your provided solution.
   Before summing up what I did, please change the code that you provided,
as if
   it is used as is you will get a Null Pointer Exception, due to the
following
   code:
  public void addViolations( List newViolations )  {
if (violations_  == null)
...
  }
Please change to:
if(violations_ != null)

The rest is really easy to do:

In the perform() method of your RegistrationAction just do your customized
validation and then
create a new Violation and send back the actual page again:

  Violation v = new Violation();
  v.setMessage(errMsg);
  v.setPath(/firstName);
  violations.add(v);
  getForm().addViolations(violations);
  return page(getFormView());

Thanks again for your great help,

miHam







-
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: Re: mixing xml and xsl with i18n

2002-07-19 Thread kavitha ramesh

Hi Jeorg,

I tried with the following sitemap:
map:match pattern=jsp/*
map:generate type=jsp src=/concatenate/jsp/{1}.jsp/
map:serialize type=xml/
/map:match

I got just the names, Kavitha, Ramesh in the browser.

Kavitha

On Thu, 18 Jul 2002 Joerg Heinicke wrote :
  map:match pattern=jsp/*
  map:generate type=jsp src=/concatenate/jsp/{1}.jsp/
  map:transform type=i18n/
  map:transform src=conc.xsl/
  map:transform type=i18n/
  map:serialize type=html/
  /map:match

Hello Kavitha,

can you shorten the pipeline and see what the output is?

I would start with only the JSP generator and a map:serialize 
type=xml/.

If it seems to be ok add the conc.xsl and so on.

Regards,

Joerg

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



-
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: Re: mixing xml and xsl with i18n

2002-07-19 Thread kavitha ramesh

Hi Sidharth,
It is even possible withouti18n:text in the xml file.Just using 
the namespace in the xsl and by running the transformer, it 
works,,,

Kavitha



On Fri, 19 Jul 2002 [EMAIL PROTECTED] wrote :

Hi
I think you will have to keep the I18n :Text  for Mr and Ms in 
XML file
only then it will work
I don't think that u can keep the same in XSL files

Regards
Sidharth Ghai
Vmoksha Technologies
VI th Floor, Corporate Towers 'C'
Diamond District
Kodihally
Banglore



 kavitha  ramesh
 kaviramesh77@redif   To: 
[EMAIL PROTECTED]
 fmail.comcc:
   Subject: 
mixing xml and xsl  with i18n
 07/18/2002 07:03 PM
 Please respond to
 cocoon-users






Hi,

I have an xml file which is as follows:

simple.xml
--
menu
person
gender sex=Male
nameRamesh/name
/gender
/person
person
gender sex=Female
nameKavitha/name
/gender
/person
person
/menu

and my xsl file is as follows:

simple.xsl
--

i18n:texttext1/i18n:text
i18n:texttext2/i18n:text


and my messages for i18n are as follows:

messages_en
---
message key=text1Mr/message
message key=text2Mrs/message

messages_de
---
message key=text1Herrn/message
message key=text2Frau/message

If the sex is male, the browser should display

Mr.Ramesh(English)
Herrn.Ramesh(German)

If the sex is female then the browser should display

Mrs.Kavitha(English)
Frau.Kavitha(German)

How do I do this?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]



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




sunshine, authentication failed and request parameter

2002-07-19 Thread Barbara Post

I want to customize my error page by getting one of the request parameters
(language : lang), to query a database (like xindice) with it passed along
a hard-coded error code.

I have the following and authentication works ok for now (test with an user
xml file). Is the parameter lang in session when authentication fails ?
if so, how do I pass shunshine:getxml context=request path=/lang to my
query ? (xpath expression)

Thank you very much.

!-- authentication --
 map:match pattern=dologin
 map:act type=sunRise-login
 map:parameter name=handler value=baepp-handler/
 map:parameter name=parameter_company value=request:company/
 map:parameter name=parameter_username value=request:username/
 map:parameter name=parameter_password value=request:password/
 map:parameter name=parameter_lang value=request:lang/
 map:redirect-to uri=menu/
 /map:act
 !-- not authentificated --
 !-- to do : access context to get LANG ?? --

 map:generate
src=xmldb:tamino://localhost/tamino/BAEPP/BAEPP/#Error[@code='310001' and
Description[@lang='{HERE I WANT THE VALUE OF LANG PARAMETER}']]/
map:transform src=xsl/copy.xsl/
!-- this stylesheet also wants to access lang --
 map:serialize type=xml/
 /map:match

Barbara





-
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: troubles with sunrise

2002-07-19 Thread Barbara Post

Thanks for the correct link, Matthew. I use cocoon 2.0.3 and finally fixed
my misconfiguration. :-)

Barbara
- Original Message -
From: Matthew Langham [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, July 19, 2002 11:31 AM
Subject: RE: troubles with sunrise


Barbara,

which version of Cocoon are you using? My article refers to version 2.0.x.
And the correct link to the article is:

http://radio.weblogs.com/0103021/stories/2002/02/28/usingTheSunriseComponent
s.html

Matthew
--
Open Source Group   Cocoon { Consulting, Training, Projects }
=
Matthew Langham, SN AG, Klingenderstrasse 5, D-33100 Paderborn
Tel:+49-5251-1581-30 [EMAIL PROTECTED] - http://www.s-und-n.de
-
Cocoon book:
  http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20
=




-Original Message-
From: Barbara Post [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 19, 2002 9:34 AM
To: [EMAIL PROTECTED]
Subject: troubles with sunrise


Hello, I tried to do the same as on :
http://www.need-a-cake.com/stories/2002/02/28/usingTheSunriseComponents.html
but get :

org.apache.avalon.framework.component.ComponentException: Could not find
component
 at
org.apache.avalon.excalibur.component.ExcaliburComponentManager.lookup(Excal
iburComponentManager.java:367)
 at
org.apache.cocoon.components.CocoonComponentManager.lookup(CocoonComponentMa
nager.java:167)

without knowing which component is in cause...

what's wrong ? thanks !

Babs


-
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: Re: mixing xml and xsl with i18n

2002-07-19 Thread sidharthg


No that is OK
But I always prefer to do everthing in XSP
Regards
Sidharth Ghai
Vmoksha Technologies
VI th Floor, Corporate Towers 'C'
Diamond District
Kodihally
Banglore


   
 
kavitha  ramesh  
 
kaviramesh77@redif   To: [EMAIL PROTECTED]  
 
fmail.comcc:  
 
  Subject: Re: Re: mixing xml and xsl  
with i18n
07/19/2002 03:21 PM
 
Please respond to  
 
cocoon-users   
 
   
 
   
 




Hi Sidharth,
It is even possible withouti18n:text in the xml file.Just using
the namespace in the xsl and by running the transformer, it
works,,,

Kavitha



On Fri, 19 Jul 2002 [EMAIL PROTECTED] wrote :

Hi
I think you will have to keep the I18n :Text  for Mr and Ms in
XML file
only then it will work
I don't think that u can keep the same in XSL files

Regards
Sidharth Ghai
Vmoksha Technologies
VI th Floor, Corporate Towers 'C'
Diamond District
Kodihally
Banglore



 kavitha  ramesh
 kaviramesh77@redif   To:
[EMAIL PROTECTED]
 fmail.comcc:
   Subject:
mixing xml and xsl  with i18n
 07/18/2002 07:03 PM
 Please respond to
 cocoon-users






Hi,

I have an xml file which is as follows:

simple.xml
--
menu
person
gender sex=Male
nameRamesh/name
/gender
/person
person
gender sex=Female
nameKavitha/name
/gender
/person
person
/menu

and my xsl file is as follows:

simple.xsl
--

i18n:texttext1/i18n:text
i18n:texttext2/i18n:text


and my messages for i18n are as follows:

messages_en
---
message key=text1Mr/message
message key=text2Mrs/message

messages_de
---
message key=text1Herrn/message
message key=text2Frau/message

If the sex is male, the browser should display

Mr.Ramesh(English)
Herrn.Ramesh(German)

If the sex is female then the browser should display

Mrs.Kavitha(English)
Frau.Kavitha(German)

How do I do this?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]



-
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: Re: Re: mixing xml and xsl with i18n

2002-07-19 Thread kavitha ramesh

Hi Jeorg,

Now my xsl is like this:

conc.xsl


xsl:for-each select=menu/person
tr
tdi18n:textMale/i18n:textxsl:value-of 
select=gender/name//td
/tr
/xsl:for-each


My xml file is as follows:

conc.xml

?xml version=1.0 encoding=UTF-8?
test
menu
  person
   gender sex=Male
nameRavi/name
   /gender
  /person

  person
   gender sex=Female
nameVeena/name
   /gender
  /person
/menu

menu
item
link
hrefconc.xml?locale=en_US/href
titleEnglish /title
/link
/item
item
link
hrefconc.xml?locale=de_DE/href
titleGerman /title
/link
/item
/menu
/test

and my sitemap is as follows:

map:match pattern=*.xml
map:generate src={1}.xml/
map:transform src=conc.xsl/
map:transform type=i18n/
map:serialize/
/map:match

and in the browser Iam getting the result as

Mr.Ravi
Mr.Veena

In the xsl file if I do the following, nothing is displayed,,,

i18n:textxsl:value-of select=@sex//i18n:textxsl:value-of 
select=gender/name/

Please suggest me how to write the stylesheet for displaying,

Mr.Ravi
Mrs.Veena


Regards
Kavitha









-
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: mixing xml and xsl with i18n

2002-07-19 Thread Joerg Heinicke

Hello Kavitha,

as I see you have a working version:

  tdi18n:textMale/i18n:textxsl:value-of select=gender/name//td

and a non-working version

  i18n:textxsl:value-of select=@sex//i18n:textxsl:value-of
  select=gender/name/

The problem is really easy, it's only an XPath problem. The @sex attribute 
as not on the person element, but on the gender element. SO you either 
change the XML:

person sex=Male
   nameRavi/name
/person

or in the XSL:

xsl:value-of select=gender/@sex/

I hope it works now,

Joerg


kavitha ramesh wrote:
 Hi Jeorg,
 
 Now my xsl is like this:
 
 conc.xsl
 
 
 xsl:for-each select=menu/person
 tr
 tdi18n:textMale/i18n:textxsl:value-of select=gender/name//td
 /tr
 /xsl:for-each
 
 
 My xml file is as follows:
 
 conc.xml
 
 ?xml version=1.0 encoding=UTF-8?
 test
 menu
  person
   gender sex=Male
nameRavi/name
   /gender
  /person
 
  person
   gender sex=Female
nameVeena/name
   /gender
  /person
 /menu
 
 menu
 item
 link
 hrefconc.xml?locale=en_US/href
 titleEnglish /title
 /link
 /item
 item
 link
 hrefconc.xml?locale=de_DE/href
 titleGerman /title
 /link
 /item
 /menu
 /test
 
 and my sitemap is as follows:
 
 map:match pattern=*.xml
 map:generate src={1}.xml/
 map:transform src=conc.xsl/
 map:transform type=i18n/
 map:serialize/
 /map:match
 
 and in the browser Iam getting the result as
 
 Mr.Ravi
 Mr.Veena
 
 In the xsl file if I do the following, nothing is displayed,,,
 
 i18n:textxsl:value-of select=@sex//i18n:textxsl:value-of 
 select=gender/name/
 
 Please suggest me how to write the stylesheet for displaying,
 
 Mr.Ravi
 Mrs.Veena
 
 
 Regards
 Kavitha


-- 

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: Re: mixing xml and xsl with i18n

2002-07-19 Thread kavitha ramesh

Hi Jeorg,

It works,,,

Thanks a lot,,,

Kavitha.



On Fri, 19 Jul 2002 Joerg Heinicke wrote :
Hello Kavitha,

as I see you have a working version:

  tdi18n:textMale/i18n:textxsl:value-of 
select=gender/name//td

and a non-working version

  i18n:textxsl:value-of 
select=@sex//i18n:textxsl:value-of
  select=gender/name/

The problem is really easy, it's only an XPath problem. The @sex 
attribute as not on the person element, but on the gender 
element. SO you either change the XML:

person sex=Male
   nameRavi/name
/person

or in the XSL:

xsl:value-of select=gender/@sex/

I hope it works now,

Joerg


kavitha ramesh wrote:
Hi Jeorg,

Now my xsl is like this:

conc.xsl


xsl:for-each select=menu/person
tr
tdi18n:textMale/i18n:textxsl:value-of 
select=gender/name//td
/tr
/xsl:for-each


My xml file is as follows:

conc.xml

?xml version=1.0 encoding=UTF-8?
test
menu
  person
   gender sex=Male
nameRavi/name
   /gender
  /person

  person
   gender sex=Female
nameVeena/name
   /gender
  /person
/menu

menu
item
link
hrefconc.xml?locale=en_US/href
titleEnglish /title
/link
/item
item
link
hrefconc.xml?locale=de_DE/href
titleGerman /title
/link
/item
/menu
/test

and my sitemap is as follows:

map:match pattern=*.xml
map:generate src={1}.xml/
map:transform src=conc.xsl/
map:transform type=i18n/
map:serialize/
/map:match

and in the browser Iam getting the result as

Mr.Ravi
Mr.Veena

In the xsl file if I do the following, nothing is displayed,,,

i18n:textxsl:value-of 
select=@sex//i18n:textxsl:value-of 
select=gender/name/

Please suggest me how to write the stylesheet for displaying,

Mr.Ravi
Mrs.Veena


Regards
Kavitha


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



-
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: sunshine, authentication failed and request parameter

2002-07-19 Thread Carsten Ziegeler

You pass 'lang' in as a request parameter, so in the case of an error
it is still available as a request parameter.
You can use the 'request' action to get the value of the parameter,
like
map:act type=request
!-- all parameters can be accessed using {NAME OF PARAMETER}
map:generate
 src=xmldb:tamino://localhost/tamino/BAEPP/BAEPP/#Error[@code='310001'
and
 Description[@lang='{lang}']]/
/map:act

If you want to use the parameters in your stylesheet, refer to
the 'use-request-parameter' parameter for the xslt transformer.

Carsten

 -Original Message-
 From: Barbara Post [mailto:[EMAIL PROTECTED]]
 Sent: Friday, July 19, 2002 12:16 PM
 To: [EMAIL PROTECTED]
 Subject: sunshine, authentication failed and request parameter


 I want to customize my error page by getting one of the request parameters
 (language : lang), to query a database (like xindice) with it
 passed along
 a hard-coded error code.

 I have the following and authentication works ok for now (test
 with an user
 xml file). Is the parameter lang in session when authentication fails ?
 if so, how do I pass shunshine:getxml context=request path=/lang to my
 query ? (xpath expression)

 Thank you very much.

 !-- authentication --
  map:match pattern=dologin
  map:act type=sunRise-login
  map:parameter name=handler value=baepp-handler/
  map:parameter name=parameter_company value=request:company/
  map:parameter name=parameter_username value=request:username/
  map:parameter name=parameter_password value=request:password/
  map:parameter name=parameter_lang value=request:lang/
  map:redirect-to uri=menu/
  /map:act
  !-- not authentificated --
  !-- to do : access context to get LANG ?? --

  map:generate
 src=xmldb:tamino://localhost/tamino/BAEPP/BAEPP/#Error[@code='310001' and
 Description[@lang='{HERE I WANT THE VALUE OF LANG PARAMETER}']]/
 map:transform src=xsl/copy.xsl/
 !-- this stylesheet also wants to access lang --
  map:serialize type=xml/
  /map:match

 Barbara





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




Is possible generate XML source that stored in session?

2002-07-19 Thread Hiloliddin Karimov

Hi,

I have Action that get result from DB and store it in session as XML,
and transformer that paginate the XML source.

!-- get results from DB and store it to session --
map:match pattern=show.html
  map:act set=process
  map:parameter name=descriptor
value=context://myapp/templates/show_form.xml/
  /map:act
  map:generate type=serverpages src=templates/show.xsp/
  map:transform src=stylesheets/myapp.xsl/
  map:serialize/
/map:match

!-- paginate source.xml file --
map:match pattern=show(*).html
  map:generate src=source/source.xml/
  map:transform type=paginate src=pagesheets/images.xml
map:parameter name=page value={1}/
  /map:transform
  map:transform src=stylesheets/result.xsl/
  map:serialize/
/map:match
Instead of source.xml file, must paginate XML source that get from session.
How can I do it?

Thanks in advance!
Hill


-
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: Is possible generate XML source that stored in session?

2002-07-19 Thread Luca Morandini

Hiloliddin,

I think you may use readDOMSessionTransformer to do this.

Best regards.


- 
   Luca Morandini 
   GIS Consultant 
  [EMAIL PROTECTED] 
http://utenti.tripod.it/lmorandini/index.html 
-
 

 -Original Message-
 From: Hiloliddin Karimov [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, July 17, 2002 5:02 PM
 To: Cocoon-Users
 Subject: Is possible generate XML source that stored in session?
 
 
 Hi,
 
 I have Action that get result from DB and store it in session as XML,
 and transformer that paginate the XML source.
 
 !-- get results from DB and store it to session --
 map:match pattern=show.html
   map:act set=process
   map:parameter name=descriptor
 value=context://myapp/templates/show_form.xml/
   /map:act
   map:generate type=serverpages src=templates/show.xsp/
   map:transform src=stylesheets/myapp.xsl/
   map:serialize/
 /map:match
 
 !-- paginate source.xml file --
 map:match pattern=show(*).html
   map:generate src=source/source.xml/
   map:transform type=paginate src=pagesheets/images.xml
 map:parameter name=page value={1}/
   /map:transform
   map:transform src=stylesheets/result.xsl/
   map:serialize/
 /map:match
 Instead of source.xml file, must paginate XML source that get from session.
 How can I do it?
 
 Thanks in advance!
 Hill
 
 
 -
 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]