Source Code : XML transformation
Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com.
Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com.
Click Here or search from google with Libraries Name you get jar file related it
XML transformation
<%@ taglib uri="http://java.sun.com/jstl/xml" prefix="x" %>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<c:import url="http://localhost:8080/home/build.xml" var="buildXml" />
<c:import url="/WEB-INF/xslt/myTrans.xsl" var="xslt" />
<x:transform xml="${buildXml}" xslt="${xslt}" />
//myTrans.xsl
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html"/>
<xsl:template match="/">
<html><head><title>List of build.xml targets
</title></head><body bgcolor="white"><h2>Build.xml targets</h2>
<xsl:apply-templates />
</body></html>
</xsl:template>
<xsl:template match="/project">
<dl>
<xsl:for-each select="./target">
<dt><b><xsl:value-of select="@name" /></b> </dt>
<xsl:if test="@depends">
<dd>depends=<xsl:value-of select="@depends" /> </dd></xsl:if>
</xsl:for-each><!--end for-each contact -->
</dl>
</xsl:template>
<xsl:template match="text()">
<xsl:value-of select="normalize-space()" />
</xsl:template>
</xsl:stylesheet>
Thank with us