This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: =?gb2312?q?=B4=F0=B8=B4=3A=20=5Bxsl=5D=20Difference=20between=20these?= NameSpaces...
- From: Peter Davis <pdavis152 at attbi dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Mon, 25 Feb 2002 20:03:26 -0800
- Subject: Re: [xsl] =?gb2312?q?=B4=F0=B8=B4=3A=20=5Bxsl=5D=20Difference=20between=20these?= NameSpaces...
- References: <000301c1be75$c592ae20$570ca8c0@dragonjia>
- Reply-to: xsl-list at lists dot mulberrytech dot com
On Monday 25 February 2002 19:29, dragon wrote:
> by the way If I use xml in the Client Javascript, load and transform
> with xsl file. and then allow my customer to Update the xml.
> but How Can I Save the Modified XML back to the Server just with
> JavaScript??
You can't. Think about it -- that would be a terrible security hazard if
anyone could write anything they wanted to your server with Javascript (even
if the browser controlled the security, people can write their own hacked
browsers).
The easiest way is probably to transform the documents on the server instead
of on the client. Most server side languages, like JSP, ASP, and PHP, have
several XSLT modules that can do this. You can then kill two birds with one
stone by saving the output to the appropriate file on the server and
redirecting the client to that file.
If you want to do the transform on the client anyway, then you would have to
store the output of the transformation to a String using Javascript, and then
submit that to the server using a POST operation. But this still involves
server-side scripting, since the server has to retrieve the document from the
POSTed data and save it to the file, and it still opens up security risks
(anyone can essentially save any file on your server). How this could be
done in Javascript I don't know, since I don't really have experience with
that.
--
Peter Davis
Is a computer language with goto's totally Wirth-less?
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list