XML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreXML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old October 10th, 2004, 06:07 AM
c.o. jones c.o. jones is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 2 c.o. jones User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
XSLT & XML data islands

Newbie question:

Is it possible to transform XML data islands to HTML? Every example of XMLT that I can find works on a pure XML file, but I want to use little bits of XML embedded in HTML.

For example, suppose I have a website with many pages, I want to put a title bar at the top of each page. I want a consistent look on each page, but don't want to have to keep rewriting the HTML every time. Also I want a footer at the end of each page showing information.


<HTML>
<HEAD><TITLE>My wonderful web page</TITLE></HEAD>
<BODY>
<XML ID=TOP>
<PAGE_TITLE> Welcome</PAGE_TITLE>
</XML>

Welcome to my wonderful web site.
Blah Blah blah, lots of text
A few images. Some more chat.
General HTML text.
<XML ID=END>
<FOOTER>
<LOGIN_NAME>Clive Jones</LOGIN_NAME>
<LOGIN TIME>11:15 AM</LOGIN TIME>
</FOOTER>
</XML>

</BODY>
</HTML>


Could some kind soul show me an example of how to transform this XML into HTML, please.

The header (as an example) could become

<TABLE><TR bgcolor=orange>
<TD><IMG source="start.gif"></TD>
<TD><font size=5>Welcome</font></TD>
<TD><IMG source="end.gif"></TD>
</TR></TABLE>

and the footer could be

<TABLE><TR>
<TD bgcolor=orange> <font size=2>logged in as: </TD>
<TD bgcolor=orange> <font size=2><b>clive Jones</b> </TD>
<TD bgcolor=orange> <font size=2>at </TD>
<TD bgcolor=orange> <font size=2></b>11:15 Am</b> </TD>
</TR></TABLE>

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > XSLT & XML data islands


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT