| | |
|
|
|
Reuse in hybrid XML/HTML website |
| message from Tripecac on 21 Jul 2004 |
I'm working on a music-based website.
I've converted part of my site (the album and song pages) to XML, and use XSL
to generate static HTML pages which I then upload. The XML-based pages benefit
from reuse, since I have one XSL template which defines the overall structure
of the HTML. This is all fine.
Now I'm looking at the other pages in the site, like news, contact info, and
links... and I'm realizing that I'd rather not have to convert the rest of the
site to XML, at least not right now. Instead, I'd prefer to keep the other
pages HTML so that I can get my site up quickly... and then maybe gradually
convert the other pages to XML over the next few weeks/months/years.
Ideally, the XML and HTML pages would reuse several page elements, like:
1) banner
2) navigation lists
3) copyright info
4) overall page structure
If I keep my HTML pages pure-HTML, however, there's no real way to share those
blocks of HTML. I'd have to stick with my current copy-and-paste approach
(which is okay since I use HomeSite to do global replaces).
I'm curious what approaches y'all would recommend if you were (or are) in a
similar situation... Half your pages are dynamic, the others are static, you
want to get your site up relatively quickly, but would also like to reuse some
of your HTML blocks.
Would you just go ahead and convert all the pages to XML? If so, would you try
to keep the XML chunks as big as possible, or go fine-grained? In other words,
if you have a links page, would you refactor it into XML elements or just throw
its entire "body" into a single element and refactor later?
Thanks!
|
| Anton_FA replied to Tripecac on 21 Jul 2004 |
Firstly - you've done well to achieve the xml - xslt solution - well done.
I suggest you use SSI.
Does your server support PHP or another server side language?
If so you can write one footer file, and just have each page 'include' this
file, and like wise with your header and any other pages/elements that get used
more than once.
HTH
Anton
|
| Murray *TMM* replied to Anton_FA on 21 Jul 2004 |
You can use Server-side includes without using any server scripting, you
know?
|
| Anton_FA replied to Murray *TMM* on 21 Jul 2004 |
or you could use Flash to present your xml content.
|
|
Archived message: Reuse in hybrid XML/HTML website (Macromedia Dreamweaver)