Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 802549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T23:37:18+00:00 2026-05-14T23:37:18+00:00

I have a long document in XML from which I need to produce static

  • 0

I have a long document in XML from which I need to produce static HTML pages (for distribution via CD). I know (to varying degrees) JavaScript, PHP and Python. The current options I’ve considered are listed here:

  • I’m not ruling out JavaScript, so one option would be to use ajax to dynamically load the XML content into HTML pages. Edit: I’d use jQuery for this option.

  • Learn some basic XSLT and produce HTML to the correct spec this way.

  • Produce the site with PHP (for example) and then generate a static site.

  • Write a script (in Python for example) to convert the XML into HTML. This is similar to the XSLT option but without having to learn XSLT.

Useful information:

  • The XML will likely change at some point, so I’d like to be able to easily regenerate the site.

  • I’ll have to produce some kind of menu for jumping around the document (so I’ll need to produce some kind of index of the content).

I’d like to know if anyone has any better ideas that I haven’t thought of. If not, I’d like you to tell me which of my options seems the most sensible. I think I know what I’m going to do, but I’d like a second opinion. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T23:37:18+00:00Added an answer on May 14, 2026 at 11:37 pm

    I think XSLT is by far the easiest and best method — even taking into account having to learn xslt.

    There are several styles of xslt programming, but the easiest is “push processing” , where you write several templates that describe how your xml input is to be transformed into html output. Then you write a root template that outputs the basic html wrapper and calls the other templates. The root
    template is the easy one:

    <xsl:template match="/" > <!-- "/" matches the document root -->
      <html>  <!-- whatever is not in xsl: namespace is template output -->
      <head><title>...</title></head>
      <body>
      <xsl:apply-templates />  <!-- this searches for and calls additional template matches --> 
      </body>
      </html>
    </xsl:template>  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a rather long XML document with subsections under elements called <Pages> .
I have written a xml/php document that is pulling from a Magento Commerce database,
I need to read a large XML document from the network and split it
I have a variable that contains a long string that represents an XML document.
I have the following XML document which I would like to parse into a
I have an XML document containing types from 2 XML schemas. One (theirs.xsd) is
I have an XML document which references a XSL file for the output of
I have long cycles of GC. from checks I saw there are too many
Apple have long blocked mobile Safari from playing sounds – the usual JavaScript commands
One thing with which I have long had problems, within the CakePHP framework, is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.