•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the RSS, Web Services and SOAP section within the Web Development category of DaniWeb, a massive community of 422,560 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,671 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our RSS, Web Services and SOAP advertiser: Programming Forums
Views: 2360 | Replies: 2
![]() |
I have multiple pages with the same information on them (forthcoming events information), and when that information needs to be changed i have to change every page which takes time. I was wondering if XML can be used to change the information on the pages by editing one central XML file, which will save me alot of time and hassle when updating the site. I have never done any work with XML before, however i have a good understanding of html and know a little javascript.
Please be aware that the information will have to be displayed in a html file. I would use asp and a database to do this, however my webhosting service will not alow the use of asp.
If anyone can give me a few tips on how this can be done it would be greatly appreciated.
Thanks for your time,
NuGG
Please be aware that the information will have to be displayed in a html file. I would use asp and a database to do this, however my webhosting service will not alow the use of asp.
If anyone can give me a few tips on how this can be done it would be greatly appreciated.
Thanks for your time,
NuGG
Pubonwheels - Mobile Bar Services for the South West of England.
The Kings Head Inn - The Kings Head, Underhill, Coleford, Somerset, UK.
South West Ravers - Going out to all you jungle drum and bass ravers.
UFB Live Radio - Keep It Locked.
The Kings Head Inn - The Kings Head, Underhill, Coleford, Somerset, UK.
South West Ravers - Going out to all you jungle drum and bass ravers.
UFB Live Radio - Keep It Locked.
•
•
Join Date: Jul 2006
Location: Deptford, London
Posts: 954
Reputation:
Rep Power: 5
Solved Threads: 48
You should look into XML Stylesheet Language Transformations (XSLT for short).
http://www.w3.org/TR/xslt ...this is a good reference
http://www.w3schools.com/xsl/ ..and this is a good introduction
I would advise building the pages using an offline XSLT processor, as client side (browser) XSLT processors are at best; bad.
EDIT: Or, you could use the PHP XSLT module. IF it's installed on your server.
I make alot of pages using offline XSLT processors (Xalan + Xerces) to create static HTML pages - but they are command line tools, and you need to understand XSL to use them...
For learning, you can create XML files, link them to XSL stylesheets and test them in certain browsers (Internet Explorer and Firefox) bear in mind, that the browser is doing work that is conventionally regarded as a "server side job", and that has a number of implications, the biggest I guess is that some browsers (i.e. Opera) don't have XSLT processors, and search engines can't make head or tail of your pages.
If you need any help when you're using XSL (setup, nuances, etc) let me know, I've been using it for a while now; for pages that are too static to be considered dynamic and to dynamic to be considered static.
http://www.w3.org/TR/xslt ...this is a good reference
http://www.w3schools.com/xsl/ ..and this is a good introduction
I would advise building the pages using an offline XSLT processor, as client side (browser) XSLT processors are at best; bad.
EDIT: Or, you could use the PHP XSLT module. IF it's installed on your server.
I make alot of pages using offline XSLT processors (Xalan + Xerces) to create static HTML pages - but they are command line tools, and you need to understand XSL to use them...
For learning, you can create XML files, link them to XSL stylesheets and test them in certain browsers (Internet Explorer and Firefox) bear in mind, that the browser is doing work that is conventionally regarded as a "server side job", and that has a number of implications, the biggest I guess is that some browsers (i.e. Opera) don't have XSLT processors, and search engines can't make head or tail of your pages.
If you need any help when you're using XSL (setup, nuances, etc) let me know, I've been using it for a while now; for pages that are too static to be considered dynamic and to dynamic to be considered static.
Last edited by MattEvans : Nov 27th, 2006 at 4:10 pm.
If it only works in Internet Explorer; it doesn't work.
•
•
Join Date: Nov 2004
Location: Netherlands
Posts: 5,752
Reputation:
Rep Power: 18
Solved Threads: 197
Do be advised that on the fly XSLT transformation can be very slow, unless you take care to cache the precompiled XSLT files between invocations.
I've done testing for that in the past.
I've actually written a system doing as Matt suggests in Java, using XSLT on a fairly large scale to process dynamically generated XML into html output (and some things into PDF using XSL:FO).
Without caching the compiled XSLT files between requests the request/response cycle was several orders of magnitude slower as compared to the situation after I had implemented such caching.
The compilation stage was that slow, the actual processing itself was extremely fast.
You will want to cache the Transformer here in some way and reuse it.
In the final version of that system I used a simple HashMap using the filename of the XSLT file as a key.
I've done testing for that in the past.
I've actually written a system doing as Matt suggests in Java, using XSLT on a fairly large scale to process dynamically generated XML into html output (and some things into PDF using XSL:FO).
Without caching the compiled XSLT files between requests the request/response cycle was several orders of magnitude slower as compared to the situation after I had implemented such caching.
The compilation stage was that slow, the actual processing itself was extremely fast.
TransformerFactory tFactory = TransformerFactory.newInstance();
// Get the XML input document and the stylesheet.
Source xmlSource = new DOMSource(xmlInput);
Source xslSource = new StreamSource(xslFile);
// Generate the transformer.
Transformer transformer = tFactory.newTransformer(xslSource);
// Perform the transformation, sending the output to the response.
transformer.transform(xmlSource, new StreamResult(out));You will want to cache the Transformer here in some way and reuse it.
In the final version of that system I used a simple HashMap using the filename of the XSLT file as a key.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
![]() |
•
•
•
•
•
•
•
•
DaniWeb RSS, Web Services and SOAP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
afghanistan api asp bbc bebo blair blogger blogging bush code development dom drama election feed gdata google html iraq itv jbennet katemodern linspire linux lonelygirl15 microsoft news on openoffice politics programming reader rss soap standards terror terrorist tv video voters w3c war weather web week wmd xml xoap youtube
- "scheduled events"(mstask) - Where they are stored (Windows 9x / Me)
- google "keyword" question (Search Engine Optimization)
- Removal of "Home Search Assistant", "Search Extender", & "Shopping Wizard" (Viruses, Spyware and other Nasties)
- "Home Search 'Assistent'"... yet again (Viruses, Spyware and other Nasties)
- more "home search assistent" fun... (Viruses, Spyware and other Nasties)
Other Threads in the RSS, Web Services and SOAP Forum
- Previous Thread: Soap
- Next Thread: Apache SOAP Server startup issue



Linear Mode