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 July 12th, 2004, 02:58 AM
uba uba is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 1 uba User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Separate html from xslt?

Hey

I was wondering if there is any way to separate html from xslt. Here’s what I want to do:

1. Create an html template with fields where information should be entered into, or repeatable items (like tr and td) with such fields.
2. Create an xml document with all data needed.
3. Create an xslt document which will enter all xml data into the html template.

That way, I will be able to separate all parts: data, logic and design, and alter them separately.

Any ideas?

\uba

Reply With Quote
  #2  
Old July 12th, 2004, 04:34 AM
Miska's Avatar
Miska Miska is offline
Madden Maniac
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jun 2001
Location: Finland
Posts: 519 Miska User rank is Lance Corporal (50 - 100 Reputation Level)Miska User rank is Lance Corporal (50 - 100 Reputation Level)Miska User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Day 3 h 47 m 50 sec
Reputation Power: 8
XSLT as the name says is ("extensible stylesheet language transformation") designed for transforming XML to various forms of documents. And even though XML -> HTML transformation is the most common no special templating has been made for this. So a short answer to your question is that nope, it can't be done with only XML and XSLT.

If you know PHP or something else, I suggest using it if you want to separate logic and presentation from eachother.

With PHP (for example):

1.include HTML (with template variables)
2.parse XML and fill out the variables
3.print out HTML with variables inserted

-Miska-

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreXML Programming > Separate html from xslt?


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 1 hosted by Hostway
Stay green...Green IT