Re: [xsl] How to Substitute HTML template with values?

Subject: Re: [xsl] How to Substitute HTML template with values?
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 4 Dec 2003 11:00:52 GMT

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

That's not XML, XML element names can not have @

If you changed your names to well formed XML you could program this in
xslt, or if you are prepared to change your syntax just a bit you could
use the "literal result element as stylesheet" syntax


  <NAME>My Name</NAME>
  <ADDR>My Address</NAME>

stylesheet == XHTML template

<html xmlns:xsl=""; xsl:version="1.0">
<head><title>My Template</title></head>
  <br />Name <input type="text" value="{/mapping/NAME}" size="15"/>
  <br />Address <input type="text" value="{/mapping/ADDR}" size="15"/>

that is all you need have is an xsl:version attribute in your html
element then you can use AVT templates to pull things into attributes (or
any xsl instruction such as xsl:value-of to pull things into elements)



This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:

 XSL-List info and archive:

Current Thread