I have a xsl file, used as template,which i need to modify during runtime. I need to modify attribute value of a tag. Is there a way i can do it via JAVA code? I know the location of my template xsl file.
For instance:
Sample xsl template:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:xalan="http://xml.apache.org/xslt">
<xsl:template match="Sample">
<HTML>
<HEAD>
</HEAD>
<BODY >
<APPLET ARCHIVE="http://localhost:500/abc.jar" CODE="test.class" NAME="Apps" ></APPLET>
</BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>
Here i need to modify the APPLET tag, where i need to set the ARCHIVE value at runtime , say to be "http://localhost:800/xyz.jar"
Can i read this xsl file from Java somwhow and modify the atrribute for applet tag?