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:' .
See:
http://localhost:8080/cocoon/samples/modules/request.html
http://cocoon.apache.org/2.1/userdocs/concepts/modules.html
-- Steve Majewski
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]