Dear All,
I'm a newbie to both XML and XLST. I have an XML document that has the following code
<?xml version="1.0" encoding="WINDOWS-1256"?>
<?xml-stylesheet type="text/xsl" href="NameEntity.xsl"?>
<DOC>
We are going to
<ENAMEX Type="LOC">washington</ENAMEX>
, after that we will go to
<ENAMEX Type="MISC">Newyork</ENAMEX>
city, then we will go to
<ENAMEX Type="LOC">England</ENAMEX>
to see our friends.
</DOC>
I want to open this file with internet explorer having the words inside "ENAMEX" tag colored with different colors according to there text (for example if Type='LOC' color red if type = 'MISC' color blue)
I tried to make a code like:
<?xml version="1.0" encoding="WINDOWS-1256"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<body style="font-family:Arial;font-size:12pt;background-color:white">
<xsl:for-each select = "DOC/ENAMEX">
<xsl:if test="@Type = 'LOC'">
<Font Color="Red"><xsl:value-of select="."/></Font>
</xsl:if>
<xsl:if test="@Type = 'MISC'">
<Font Color="Green"><xsl:value-of select="."/></Font>
</xsl:if>
</xsl:for-each>
<xsl:value-of select= "DOC"/>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
but I don't want it that way I want to have the output in the internet explorer like this:
"We are going to washington, after that we will go to Newyork city, then we will go to England to see our friends."
Thanks in advance,