Click to See Complete Forum and Search --> : How to build a webpage using XML
VinodKByreddy
July 24th, 2001, 11:13 AM
im a beginner of xml. i found a site, www.brainbench.com, entirely developed in xml. i couldn't understand how we can generate a web page directly from xml. could anyone tell me how an .xml files can be used as a webpage.
thanking you,
vinod
dressegu
July 24th, 2001, 04:21 PM
That's a pretty broad question, but...
It probably uses XSL to transform the XML into HTML. This can be done in multiple ways...
David
tyris
July 25th, 2001, 05:58 AM
tht's easy in fact, if you've already made web pages with CSS.
xml contains the data, and xml needs an other language called XSL, or XSLT (depending on the version you use). this xsl(t) file is like a css if you want, but more powerfull : it displays the xml data, including selection, sort, loop ...
so in the xml file you must link to a xsl(t) file this way : <?xml-stylesheet type="text/xsl" href="searcher.xsl"?> and the xsl will display the xml data.
hope this helped
regards
Elise, XML learning girl :-)
VinodKByreddy
July 25th, 2001, 07:43 AM
thanking your reply.
im really don't know how to build a webpage using CSS. can we give me an example. you can reply through codeguru or to my mail id vinodkbyreddy@indiatimes.com
waiting for your reply.
thanking you,
regards,
vinod
tyris
July 25th, 2001, 08:05 AM
you want an example of web page using css or xml using xsl ??
regards
Elise, XML learning girl :-)
VinodKByreddy
July 25th, 2001, 01:10 PM
thanking you for your reply.
can you give me an example of code for building a webpage using xml. if not possible, give any site address, if any, where i can get the code.
VinodKByreddy
July 25th, 2001, 01:13 PM
i need examples for both.
tyris
July 26th, 2001, 08:55 AM
for css :
you can put the style in the web page inside <style> tag, or create the style in a .css file, and put a link to this ccs file into your web page :
<LINK REL=StyleSheet HREF="name_of_your_file.css" TYPE="text/css" MEDIA=screen>
you can get more informations here :
http://www.htmlhelp.com/reference/css/style-html.html
http://www.btinternet.com/~d.d.owen/css/index.html
and there is many more sites... just make a search in your favorite search engine
for XSL :
you can create your style in a .xsl file, and then, in the xml file (that contains only data) you put a link to the xsl file. so, when you will look at your xml file in your browser, you will see the display result defined in your xsl.
to link an xsl file in your xml just add this line at the beginning of your xml :
<?xml-stylesheet type="text/xsl" href="name_of_your_file.xsl"?>
(don't forget in both cases (css and xsl) to add the path to your file if it's not in the same folder as your html/xml file)
for more info about xsl, the best place is :
http://www.dpawson.co.uk/xsl/sect2/sect21.html
but there is many more sites also
hope this helped
regards
Elise, XML learning girl :-)
dressegu
July 26th, 2001, 10:37 AM
Here is Chapter 14 from the XML Bible on using XSL. It's a pretty indepth chapter and is what I used to first learn how to use XSL:
http://www.ibiblio.org/xml/books/bible/updates/14.html
David
tyris
July 26th, 2001, 11:45 AM
http://www.zvon.org/index.php?nav_id=2
regards
Elise, XML learning girl :-)
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.