I have the following XML:
Code:
<?xml version="1.0" encoding="UTF-8"?><Content><CIUser><UserId>34</UserId><ToEmailAddress>[email protected]</ToEmailAddress><CIUserUserName>BktAdmin</CIUserUserName><CINotification><CINotification><NotificationUserDisplayName>BKT Administrator</NotificationUserDisplayName><Id>b7b9ddac-d72a-4c24-9ad6-117b71fbb040</Id><CreateDate>9/16/2013 11:27:10 AM</CreateDate><NotificationUserName>BktAdmin</NotificationUserName><NotificationSentDate /><Author>mike</Author><Posting>&lt;span class=&quot;VisitorStart&quot;&gt;mike:&lt;/span&gt; knee patella&lt;br /&gt;</Posting><Body>&lt;span class=&quot;VisitorStart&quot;&gt;mike:&lt;/span&gt; knee patella&lt;br /&gt;</Body><Application>Chat</Application><Title>Chat</Title><NotificationSent>False</NotificationSent></CINotification></CINotification></CIUser></Content>
And I have the following XSLT:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<html>
<head>
<title>New HMSC Notifications</title>
</head>
<body>
<div align="center">
<p style="font-family: arial, helvetica, sans-serif;font-size: 12px;color: #666666;">
<TABLE width="100%" border="0" cellpadding="5" cellspacing="5" align="center">
<thead bgcolor="#c9d4d9">
<th>Source</th>
<th>Date</th>
<th>Author</th>
<th>Subject</th>
<th>Content</th>
</thead>
<xsl:for-each select="Content/CIUser/CINotification/CINotification">
<tr>
<td style="white-space:nowrap">
<xsl:value-of select="Application"/>
</td>
<td style="white-space:nowrap">
<xsl:value-of select="CreateDate"/>
</td>
<td style="white-space:nowrap">
<xsl:value-of select="Author"/>
</td>
<td style="white-space:nowrap">
<xsl:value-of select="Title"/>
</td>
<td>
<xsl:value-of select="substring(Posting,1,100)"/>...
</td>
</tr>
</xsl:for-each>
</TABLE>
</p>
<br/><br/>
</div>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
Here is the output of the Posting element:
<span class="VisitorStart">mike:</span> knee patella<br />
The value was created by user input by a rich text editor. I would like to strip all of the tags from the output so I get:
VisitorStart Mike: knee patella
I'm limited to XSLT v1.0 in my environment, and I have reason to believe the ApacheFOP is doing the work. Can anyone help me fix my XSLT?
Thanks a ton,
--Mike