cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Timberlake <and...@timberlake.co.za>
Subject Re: session:getxml not working
Date Sat, 23 Aug 2003 13:28:36 GMT
Sonny

I'm not sure I understand what you're asking but if I do, you have two ways
1) <alert-messages><session:getxml context="temporary" 
path="/data/alert-messages"/></alert-messages>
2) or you ask for <session:getxml context="temporary" path="/data"/> and 
use only the alert messages in the following XSL.

What the getxml is doing is returning the contents of a tag so to 
achieve anything else is not going to be possible. I don't see why 
option one won't meet your requirements.

Let me know if I've totally misunderstood you.

Andrew

Sonny Sukumar wrote:
> 
> Ahh, thanks Andrew, that worked.  But I have another question.
> 
> Say I have this in the context:
> 
> <data>
>  <some-tag>some content</some-tag>
>  <alert-messages>
>    <alert-message>Some text here</alert-message>
>  </alert-messages>
> </data>
> 
> If I use <session:getxml context="temporary" 
> path="/data/alert-messages"/> then I just get:
> 
> <alert-message>Some text here</alert-message>
> 
> So my question is how can I, with the above example context, get the 
> whole <alert-messages> section, not just the contents of this tag?
> 
> Thanks again,
> 
> Sonny
> 
>> From: Andrew Timberlake <andrew@timberlake.co.za>
>> Reply-To: users@cocoon.apache.org
>> To: users@cocoon.apache.org
>> Subject: Re: session:getxml not working
>> Date: Fri, 22 Aug 2003 09:56:27 +0200
>>
>> Sonny
>>
>> I doesn't store the authentication node, it stores the contents 
>> thereof so instead of using <session:getxml context="temporary" 
>> path="/authentication/data/alert-messages"/>
>> use <session:getxml context="temporary" path="/data/alert-messages"/>
>>
>> Secondly, the URI namespace is http://apache.org/cocoon/session/1.0 
>> which I got from SessionConstants.java
>>
>> This all works for me on CVS HEAD as of this morning.
>>
>> Hope this helps
>>
>> Andrew
>>
>> Sonny Sukumar wrote:
>>
>>>
>>> Hi guys,
>>>
>>> I must be missing something, but my session:getxml tag isn't getting 
>>> transformed:
>>>
>>> <session:getxml context="temporary" 
>>> path="/authentication/data/alert-messages"/>
>>>
>>> This tag is embedded into an XML document which is produced afer a 
>>> log-in attempt fails.  I also tried 'path="/"' but that didn't get 
>>> transformed either.  The namespace I'm using is:
>>>
>>> xmlns:session="http://cocoon.apache.org/session/2.0"
>>>
>>> I also tried ".../1.0" but no luck.  I'm using the new Cocoon 2.1.  
>>> And I have a '<map:transform type="session"/>' in my sitemap right 
>>> after that XML doc is produced.  Yet somehow it doesn't get transformed.
>>>
>>> If the "temporary" context doesn't exist, would the tag be ignored? 
>>> Or would it be transformed into an empty string (i.e. "")?  This is 
>>> important, as the same XML doc is produced when logging in for the 
>>> first time as well, and that tag should just get wiped out.
>>>
>>> Does anybody have any insight into this?
>>>
>>> Thanks,
>>>
>>> Sonny
>>>
>>> _________________________________________________________________
>>> Get MSN 8 and help protect your children with advanced parental 
>>> controls.  http://join.msn.com/?page=features/parental
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>>> For additional commands, e-mail: users-help@cocoon.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>> For additional commands, e-mail: users-help@cocoon.apache.org
>>
> 
> _________________________________________________________________
> MSN 8: Get 6 months for $9.95/month http://join.msn.com/?page=dept/dialup
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message