[xsl] How to Substitute HTML template with values?

Subject: [xsl] How to Substitute HTML template with values?
From: Amir Yiron <amir@xxxxxxxxxxxxxxxxxx>
Date: Thu, 4 Dec 2003 12:37:14 +0200

I'm looking for a method to make the following by XSLT:
Input: XHTML template doc, XML value mapping doc, XSLT doc
Output: XHTML doc, based on XHTML template, filled with value from the XML

In other words, I want to make copy with substitutions.
The main point here is that the XHTML is an external template, instead of
being embedded
into the XSLT doc! (that helps me to design the XHTML without touching the

for example:

XHTML Template:
<head><title>My Template</title></head>
  <br />Name <input type="text" value="@@@NAME@@@" size="15"/>
  <br />Address <input type="text" value="@@@ADDR@@@" size="15"/>

XML Doc:
  <@@@NAME@@@>My Name</@@@NAME@@@>
  <@@@ADDR@@@>My Address</@@@NAME@@@>

XHTML Output:
<head><title>My Template</title></head>
  <br />Name <input type="text" value="My Name" size="15"/>
  <br />Address <input type="text" value="My Address" size="15"/>

What is the XSLT for doing such?

This is a very simple example, of course. Next step is template for

-- Amir

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread