|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
||||
|
||||
|
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- |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > XML Programming > Separate html from xslt? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|