I am just learning XSL to read from XML. How to read this xml please? I just cannot make to work though it looks simple. Thanks a bunch.
<?xml version="1.0" encoding="ASCII "?>
<?xml-stylesheet href="paramspec .xsl" type="text/xsl" ?>
<lm:Component xmi:version="2. 0" xmlns:xmi="http ://www.omg.org/XMI" xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance" xmlns:lm="http:///com.ti.ipmeta.e core" name="mcasp" description="Mu lti-channel Audio Serial Port" ipstatus="Devel opment" ipcategory="Log ic" ipfunction="Oth erCommunication s" memory="true" configurable="t rue">
</lm:Component>
And this my XSL sheet below
<?xml version="1.0" encoding="ASCII "?>
<?xml-stylesheet href="paramspec .xsl" type="text/xsl" ?>
<lm:Component xmi:version="2. 0" xmlns:xmi="http ://www.omg.org/XMI" xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance" xmlns:lm="http:///com.ti.ipmeta.e core" name="mcasp" description="Mu lti-channel Audio Serial Port" ipstatus="Devel opment" ipcategory="Log ic" ipfunction="Oth erCommunication s" memory="true" configurable="t rue">
</lm:Component>
And this my XSL sheet below
<?xml version="1.0" encoding="UTF-8"?>
<xsl:styleshe et version="1.0" xmlns:xsl="http ://www.w3.org/1999/XSL/Transform" xmlns:xdb="http ://xmlns.oracle.co m/xdb" xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance">
<xsl:template match="/">
<html>
<head>
<title>IP Meta Status</title>
</head>
<body>
<h2>Name :</h2>
<xsl:for-each select="Compone nt/name">
<xsl:apply-templates select="name"/>
</xsl:for-each>
</body>
</html>
</xsl:template>
<xsl:template match="name">
<div style="font-family:Verdana, Arial; font-size:18pt; font- weight:bold">
<xsl:value-of select="."/>
</div>
</xsl:template>
</xsl:stylesheet>
<xsl:styleshe et version="1.0" xmlns:xsl="http ://www.w3.org/1999/XSL/Transform" xmlns:xdb="http ://xmlns.oracle.co m/xdb" xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance">
<xsl:template match="/">
<html>
<head>
<title>IP Meta Status</title>
</head>
<body>
<h2>Name :</h2>
<xsl:for-each select="Compone nt/name">
<xsl:apply-templates select="name"/>
</xsl:for-each>
</body>
</html>
</xsl:template>
<xsl:template match="name">
<div style="font-family:Verdana, Arial; font-size:18pt; font- weight:bold">
<xsl:value-of select="."/>
</div>
</xsl:template>
</xsl:stylesheet>
Comment