|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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> |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > XSLT & XML data islands |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|