I can't seem to get some special characters removed an XML. They are an ellipsis, a double quote, and single quote. I am escaping the special characters and have a period in my list as well, but it won't remove. Everything else removes but these few items.
Here's the XLST:
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs" version="2.0"> <xsl:template match="/"> <soa:Label identifier="6f109b37-d9d1-4ff3-8e16-7ecffa08be1f" name="To Avid Transcript" description="" instance="b885c5f1-6307-42ff-a79c-42d61bc4464e" signature="00000000-0000-0000-0000-000000000000" xmlns:soa="urn:telestream.net:soa:core"> <soa:Parameter type="string" identifier="32bd5202-f003-4da3-8d1f-2b5a5d324af9" bindable="True" name="Transcript" enabled="true" disableable="false" optionseditable="false"> <xsl:variable name = "apos">'</xsl:variable> <xsl:value-of select="translate(Transcript, '♪!@#&"<>$%^*()[]{}?/.,:;™-', '')"/> </soa:Parameter> </soa:Label> </xsl:template> </xsl:stylesheet> And here's a portion of the XML:
<Transcript>[1:45] JD: : Hi, I'm John Doe, executive vice president. Right now you are tuning in to a very special Program, "Program Name." seeing in the world today...</Transcript> The transform results currently look like this:
<?xml version="1.0" encoding="utf-16"?> <soa:Label identifier="6f109b37-d9d1-4ff3-8e16-7ecffa08be1f" name="To Avid Transcript" description="" instance="b885c5f1-6307-42ff-a79c-42d61bc4464e" signature="00000000-0000-0000-0000-000000000000" xmlns:soa="urn:telestream.net:soa:core"> 145 JDY Hi I'm John Doe executive vice president Right now you are tuning in to a very special Progra "Program Name" seeing in the world today... </soa:Parameter> </soa:Label> As you can see those certain characters are not being removed. Any help would be great.
No comments:
Post a Comment