0

In my current project, I need to add information from an xml file to my html template using XSL. Does anyone know how to do it. I tried creating an xsl file and run, it just creating a temporary file and when I closed, it got deleted. I have a separate html template, I just need to add the xml file contents to it.

Thanks

Dimitre Novatchev
  • 240,661
  • 26
  • 293
  • 431
Mujahid
  • 1,227
  • 5
  • 32
  • 62
  • You do *not nearly* give enough information to answer this question. – Tomalak Aug 21 '11 at 08:40
  • I have a css stylesheet based HTML template. I have an xml file which contents a list of book details in xml format. I need to add xml file based book details to HTML template. Basically display the books in html page from xml file. I wanna know how can I do it with XSLT – Mujahid Aug 21 '11 at 08:52

1 Answers1

1

Your question is rather unclear to me. From your question I infer that you mean XSLT. Where exactly should the transformation happen? Client-side (e.g. web browser) or server-side? Both approaches have different advantages. What kind of HTML template is it?

Valio
  • 61
  • 2
  • I need to do the client side transformation. its a css stylesheet based html template. If there's a way to send the template I can send it too – Mujahid Aug 21 '11 at 08:47
  • thanks a lot I figured out. I was trying to run the html file than the xsl file. My bad. Now after I saw ur links I checked executing the xml now its working :) thanks a lot – Mujahid Aug 21 '11 at 09:48
  • now I could run the html page and its working well. I'm using javascript to load the xml contents through xslt but its not working on chrome browser :( – Mujahid Aug 21 '11 at 09:58
  • 1
    It does word with Chrome see http://dl.dropbox.com/u/7654600/book.xml You have to access it from a web server not locally; these links explain why http://stackoverflow.com/questions/2981524/how-can-i-make-xslt-work-in-chrome http://blog.chromium.org/2008/12/security-in-depth-local-web-pages.html – Valio Aug 21 '11 at 10:38
  • Wow its working now when I load it from localhost. Thanks a lot for the info. I tried to load the images. Image path and even the names all are correct though it only repeat the same image for mtie times... – Mujahid Aug 21 '11 at 13:37