cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steven D. Majewski" <>
Subject Re: cocoon and ajax url path
Date Fri, 20 Jul 2007 14:43:17 GMT

On Jul 20, 2007, at 3:10 AM, Vaduvoiu Tiberiu wrote:

> this pretty much works on static sites in html but as I am using  
> cocoon, I am having problem giving the url of the xml...
> in xslt i am using something like this to load an xml or to display  
> a certain value from an xml:
> document(concat('cocoon:/','preview','/',folder1/ 
> folder2/,file.xml))/root/node
> but in ajax if try calling loadXMLDoc(cocoon:/preview/folder1/ 
> folder2/file.xml) surely enough it doesn't work. So has anyone had  
> similar problem and found any solution? 10x

'cocoon:' is a pseudo-protocol ( as are some others like resource: &  
zip: ) -- it is only
known internal to cocoon. Your browser knows how to http: or ftp: but  
it doesn't know how
to cocoon: ( and AJAX is client side javascript. )

You can use the request input module to get scheme, serverName,  
serverPort and contextPath
to build a base url in the sitemap and pass it as a parameter to be  
used as a prefix to the URLs
in place of the 'cocoon:' .


-- Steve Majewski

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message