Freelancers Network
 
skill list top cap
Homepage
Join the Freelancer's Network
Update your details
Find a freelancer
Post a project
Find a project
Projects Archive
Post a job
Find a job
Jobs Archive
See Dan's Pages
See Andy's Pages
Link to this site
Resources
Join/Leave Forum
Forum Messages
+Additions+ Adverts
Advertising
Contact Us
Subscribe to our newsletter - enter your email address and hit return
Freelancers.net is owned and operated by Andy Stowell and Dan Winchester
skill list end cap
guru web hostcom

Find me again on Freelancers.net

XML scribblings as promised to a few people

date posted 29th September 2002 14:48

A few people contacted me off list wanting a bit more info on this subject,
so to save me sending the same mail several times I am posting it here. If
you don't consider XML and ASP to be your thang then this will be dull as
dishwater and I should move on to more interesting posts :)

If you are one of the people who asked for examples then I hope this is of
some use. I am always happy to discuss it and provide code examples where
time permits. Also, if anyone who has a good working knowledge of the
subject/technologies does things differently and can spare the time to tell
me where I am going wrong then any criticisms would be gratefully accepted.

-----------------

Ok, this site is a good example of what I was talking about, if not the
prettiest site in the world :)

http://www.carers.org/home/

The site uses one main XSL which contains the basic layout - the top and
right sections - the main white section is blank in this stylesheet
containing just

Each different section of the site has its own folder. Each folder contains
an XML parameter file that includes the section navigation details, a
section colour and a colour prefix for the image names (so all the image
tags look something like /img/{/ROOT/SECTION/PREFIX}-bg.gif)

When each page is created, two XSL/XML transforms are done (this is perhaps
an extreme example to give first), so the pages are built up as follows:-
1) The ASP page gets together everything it needs for its content area (the
white part of the page). This might be either building XML itself or
retrieving XML from the content management system.
2) This XML is then transformed alongside the XSL for this content type,
creating some HTML, but not the HTML for the entire page - it will just be a
table.
3) This HTML is then wrapped in XML tags i.e our HTML
4) This XML is then combined with all the other XML we need to for the page
5) The main site XSL/the pages XML are then transformed giving us the
finished article which we response.write to the page.


http://www.virtually-alaska.com

(Again don't shoot me for the design or the fact that the client insists on
uploading a million images)
This is actually one of about 50 www.virtually-xxx.com sites. They all use
the same code and same database (which makes for one massive host headers
entry in IIS). In this instance only a single transform is used, so if the
look of the site is to change all the pages must be changed (but there are
only a few pages).

However, if they want to change their branding you only change these few
pages and every site becomes different. If they just want to change one site
you just creating a few new XSLs in the new style and make the pages select
a different stylesheet.


http://siteslurper.fortune-cookie.com

Nothing to look at here I am afraid as it is a closed admin system, but what
it does do is something that would be pain to do in ordinary ASP. It allows
access to a simple admin system for people who want to be able to update
their sites but don't have an admin system or any HTML knowledge. You take
the page that they want to update - a product list say and create an XSL
version it. Then you add a user for them and set a few parameters in the
database to provide them with an admin tool (it is a reasonably generic
system). This is all very dull, but what it does which shows how useful XSL
is that it allows them to preview their page with the details they have
entered and if they are happy with it the system can upload it directly to
their site for them. This it can do easily as exactly the same code is used
to preview the page as create the disc version of it - the only difference
being that with one the result of the transform is response.write'd
(heh..written ?) to the screen, and with the other it is written to disc and
FTP'ed.

Sorry if it was a bit dry, but hopefully it gives you some idea why I don't
like writing plain HTML/ASP pages anymore.

Andy

PS - I include this one even though it breaks my heart
http://www.worldtravelevents.com/

I loved doing this with all its translations and stuff in XML and the client
never even bothered entering any text for it :)




Messages by Day
September 30th 2002
September 29th 2002
September 28th 2002
September 27th 2002
September 26th 2002
September 25th 2002
September 24th 2002
September 23rd 2002
September 22nd 2002
September 21st 2002
September 20th 2002
September 19th 2002
September 18th 2002
September 17th 2002
September 16th 2002
September 15th 2002
September 14th 2002
September 13th 2002
September 12th 2002
September 11th 2002
September 10th 2002
September 9th 2002
September 8th 2002
September 7th 2002
September 6th 2002
September 5th 2002
September 4th 2002
September 3rd 2002
September 2nd 2002
September 1st 2002


Messages by Month
December 2002
November 2002
October 2002
September 2002
August 2002
July 2002
June 2002
May 2002
April 2002
March 2002
March 2002
January 2002


Messages by Year
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000