Hi Folks,
Does anyone know if the following is possible, and if so, the proper syntax:
I have a coldFusion variable, userNames, which contains a comma delimited list of user names i.e. <cfset userNames = "John Doe, Jane Doe, Frank Smith">
I wrote some code that merges this variable with the following XML document:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="">
<messageBody>
<userNames><![CDATA[~userNames]]></userNames>
</messageBody>
And that transforms it with the following XSL Doc (listUsers.xls):
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
</head>
<body bgcolor="#ECECFF" text="#000000" link="#004080">
<div align="center">
<xsl:for-each select="messageBody">
User Names: <xsl:value-of select="userNames"/><br/>
</xsl:for-each>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
The generated output looks as follows:
User Names: John Doe, Jane Doe, Frank Smith
My question is this: How do I get the output to look as follows:
User Names: + John Doe
+ Jane Doe
+ Frank Smith
(a unordered list)
I've tried passing "<UL><LI>John Doe</LI><LI>Jane Doe</LI><LI>Frank Smith</LI></UL>" to userNames, but the parser/transformer escapes these values with < and >
If possible, I'd like to do this without changing the XML doc.
Any help is much appreciated!
Thanks,
Ed.