Below is the input xml :
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="value-of.xsl"?>
<MemeberDetails>
<Employee>
<Name>Madhu</Name>
<Sex>Male</Sex>
<DOB>2/10/1982</DOB>
<Address>JP Nagar ,Bangalore</Address>
<MemberId>094631</MemberId>
<Designation>SSE</Designation>
<Department>SG</Department>
</Employee>
</MemeberDetails>
where, i am referring value-of.xsl
file using HREF in above xml. and this file is residing in same folder.
Below is the value-of.xslt file:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output indent="yes"/>
<xsl:template match="/">
<CGIEmployeeDetails>
<PersonalDetails>
<Name>
<xsl:value-of select="/MemeberDetails/Employee/Name"/>
</Name>
<Gender>
<xsl:value-of select="/MemeberDetails/Employee/Sex"/>
</Gender>
<ResidentialAddress>
<xsl:value-of select="/MemeberDetails/Employee/Address"/>
</ResidentialAddress>
</PersonalDetails>
<WorkingDetails>
<PSAID>
<xsl:value-of select="//MemberId"/>
</PSAID>
<Designation>
<xsl:value-of select="/MemeberDetails/Employee/Designation"/>
</Designation>
<Department>
<xsl:value-of select="/MemeberDetails/Employee/Department"/>
</Department>
</WorkingDetails>
</CGIEmployeeDetails>
</xsl:template>
</xsl:stylesheet>
When i run above xml in browser , the output will result as text but not as XML . If i use editor like Oxygen and transform the same xml file , the output will be XML.
I am not getting why browser is failing to transform a XML output ? Is there anything to do with browser ?