User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 373,375 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,815 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 2626 | Replies: 85 | Solved
Reply
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,122
Reputation: majestic0110 is on a distinguished road 
Rep Power: 3
Solved Threads: 46
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Veteran Poster

Question Last q on this project I promise lol

  #1  
Jan 31st, 2008
Hi there. The project I am building is an ASP.NET browser based application that has two classes.
Login class
main menu class
now these two classes are working as they should (I.e. valid user logs in, proceed to main menu). The trouble is, I also have another class that applies an XSLT to a user specified (Via main menu) XMLfile. the user navigates to an XML file (on hard disk) then specifies an output directory (browsing again) to store the output. there is a submit button the user hits when they are ready to transorm the XML. the trouble I am having is that i do not know how to transmit the data from the two browsers (XML File locator and output file locator) to the XSLT class. i.e. I do not know how to specify to my transformer class which XML is to be used.
Any suggestions?
thanks for your time!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,122
Reputation: majestic0110 is on a distinguished road 
Rep Power: 3
Solved Threads: 46
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Veteran Poster

Re: Last q on this project I promise lol

  #2  
Jan 31st, 2008
forgot to add, I am using C# for scripting/transform class.
Reply With Quote  
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,122
Reputation: majestic0110 is on a distinguished road 
Rep Power: 3
Solved Threads: 46
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Veteran Poster

Re: Last q on this project I promise lol

  #3  
Jan 31st, 2008
Right, an update. have managed to get the file upload to save a file (copy) specified by a user (via the browse button) to a directory (specified by the user via a textbox).Now this obviously only copies the file. what I need is to learn is how to apply the XSLT before the file is output. Any ideas folks? thanks
Reply With Quote  
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,122
Reputation: majestic0110 is on a distinguished road 
Rep Power: 3
Solved Threads: 46
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Veteran Poster

Re: Last q on this project I promise lol

  #4  
Feb 1st, 2008
having thought about this, the file upload box will only COPY a file to a web server. it doesnt cater for CREATION of files. therefore, I will be able to apply an XSLT to an XML file I upload, but I will not be able to save the modified version. Is that correct ?
Reply With Quote  
Join Date: Sep 2007
Posts: 1,054
Reputation: SheSaidImaPregy is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 61
SheSaidImaPregy SheSaidImaPregy is offline Offline
Veteran Poster

Re: Last q on this project I promise lol

  #5  
Feb 1st, 2008
Now I am a bit confused... is the file saved on your server or on the clients' machines? If you are only redirecting the save, then you cannot apply the XSLT. But if you are saving it to your server, then you can apply it. A workaround for this is that first they upload the file to you, you save it in a temp directory on the server, apply the XSLT, then send it back to the client and delete your copy on the server.

Is that what you are trying to do?
Reply With Quote  
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,122
Reputation: majestic0110 is on a distinguished road 
Rep Power: 3
Solved Threads: 46
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Veteran Poster

Re: Last q on this project I promise lol

  #6  
Feb 1st, 2008
that is essentially what I need to do yes, but I went down the wrong way with this.I initially thought I could save it to their machine and transform it before the save was established. Saving it in a temp dir, apply XSLT send to client. That is an excellent idea, I hadn't thought of that. I have been hell bent on getting it to work the other (wrong) way lol. I'll give it a bash and let you know how it goes SheSaidImaPregy.Thanks for your reply
Last edited by majestic0110 : Feb 1st, 2008 at 9:50 am. Reason: missed a bit out
Reply With Quote  
Join Date: Sep 2007
Posts: 1,054
Reputation: SheSaidImaPregy is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 61
SheSaidImaPregy SheSaidImaPregy is offline Offline
Veteran Poster

Re: Last q on this project I promise lol

  #7  
Feb 1st, 2008
Yeah no problem. The reason why you cannot do it the other way is that the only way you can modify a file is that if it gets to your server and you can modify it there. Otherwise, the client would have to have the XSLT file (I think its a file, or XSL) on their computer for you to apply it.
Reply With Quote  
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,122
Reputation: majestic0110 is on a distinguished road 
Rep Power: 3
Solved Threads: 46
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Veteran Poster

Re: Last q on this project I promise lol

  #8  
Feb 1st, 2008
of course! that makes perfect sense now. thanks, I was thinking might there be security implications if a server could transform an uploaded file before it saves it back to your hard drive?
Reply With Quote  
Join Date: Sep 2007
Posts: 1,054
Reputation: SheSaidImaPregy is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 61
SheSaidImaPregy SheSaidImaPregy is offline Offline
Veteran Poster

Re: Last q on this project I promise lol

  #9  
Feb 1st, 2008
Yup, it is not allowed. Otherwise, it is called hacking and is illegal. Its fun, but not cool for the person being hacked! lol
Reply With Quote  
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,122
Reputation: majestic0110 is on a distinguished road 
Rep Power: 3
Solved Threads: 46
majestic0110's Avatar
majestic0110 majestic0110 is offline Offline
Veteran Poster

Re: Last q on this project I promise lol

  #10  
Feb 1st, 2008
ok so the plan is to upload file to server, write code to save file on server, perform transformation on that file on server then send transformed file (from server) back to client.Finally remove original xml file from server lol seems like a lot of work is there no easier way ?
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ASP.NET Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 3:06 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC