3 Replies Latest reply on May 31, 2010 4:23 AM by sontaiknu

    Inserting XSL fragments into templated HTML

    sontaiknu

      Hi there,

      simple problem, hopefully there's a simple solution.

      This post may be long, but please hear me out.

       

      I am working on a set of dynamic news pages for a website, although I have been told that the php server cannot handle xslt, and that it cannot be upgraded easily as it is off-site. But that's not the problem. Hopefully.

       

      Anyway, my backup plan is a little cheap i'll admit, but i'm hoping it has the same effect:

       

      Now here's the problem - I wish to create, say, 20-30 individual newspages (/news01.html, /news02.html, etc.) that have a fragment of xsl code inside telling it to read off a specific xml item with a corresponding id number. That way, I can have one xml file with all the news articles inside, and each page reads off a separate section.

       

      I have been reading off a LOT of different tutorials online and they say to create a html page, and use the File>Convert menu to convert it to an "XSLT 1.0" so I can insert the fragments. The pages all use a .dwt file to insert all other content, i.e. so that the only editable section is where the different content for each page is (hope that made sense).

       

      And now the catch - When I try to convert a 'templated' html page, an error message shows up saying something along the lines of "This page cannot be converted as it is based on a template, detatch the file from the template, or convert the template file itself".

       

      Now, converting the template would be fine, I was considering to make parts of that xml-editable too, however as it turns out the "XSLT 1.0" option in the Convert menu has disappeared!

       

      So here's the question - how can I create these xsl/xml/html pages so that they can still be controlled by a template? Or, if it isn't possible, how could I implement a newspage-style system considering the fact that I cant exactly use php? (I still can, it just doesn't have xslt functionality). Or if there's somewhere else that could help? Any sort of help, really.

       

      Keep in mind you're talking to someone (in New Zealand, so time zones may be... enh) that has little experience with server-side languages, although I am able to research and pick up on the simple stuff.