Use XSLT and XML to generate HTML files


XML & Web services: Use XSLT and XML to generate HTML files

  1. Use XSLT and XML to generate HTML files (2 messages)

    I am now to XSLT and XML. And I know we can use XML for data representation, and XSLT for output style representation. And it can output HTML or other file formats using XSLT processor.

    But I am just thinking we need to run the XSLT processor everytime we change the data. Is it possible to simplify the task little bit?
  2. Write so kind of build-engine to automate the transformation of your XML to XSL. What that engine looks like depends on where you are getting your XML.

    If you XML is dynamically generated, you will probably need some kind of web component (Servlet) and a set of javax.xml.transform object to manage the process.

    If your XML files are static (edited by hand), you can use a simple batch file, shell script or Ant build file.

    In both cases, you will need some kind of flag to indicate the output format, and apply the correct transforms to the XML.
  3. You can use STXX plugin for Struts if that is a Web application.

    That takes care of all of your XSLT transformations and data retrieval is abstracted by your actions.