Hello there!
I'm trying to transform a xml using an xsl but nothing is printed out.
I guess that there is something wrong with the namespace but i really don't know what should i do to fix it.
So here is the xml and the xsl also:
<?xml version="1.0" encoding="UTF-8"?>
<library xmlns=" xmlns:dc=" xmlns:dcterms=" xmlns:xsi=" xsi:schemaLocation=" d.xsd">
<course ID="1">
<dc:title>ir</dc:title>
<dc:creator>mplampla</dc:creator>
<dcterms:educationLevel>pr</dcterms:educationLevel>
<dc:description>sfsfsaf</dc:description>
<dcterms:tableOfContents>dfsf</dcterms:tableOfContents>
<dcterms:created>2004-12-21</dcterms:created>
<dcterms:modified>2005-01-21</dcterms:modified>
<dc:subject>dads</dc:subject>
<dc
ublisher>dada</dc
ublisher>
<dc:identifier>wdasdad</dc:identifier>
</course>
<course ID="2">
<dc:title>dwdm</dc:title>
<dc:creator>maria</dc:creator>
<dcterms:educationLevel>pr</dcterms:educationLevel>
<dc:description>sfsfsaf</dc:description>
<dcterms:tableOfContents>dfsf</dcterms:tableOfContents>
<dcterms:created>2004-12-21</dcterms:created>
<dcterms:modified>2005-01-21</dcterms:modified>
<dc:subject>dads</dc:subject>
<dc
ublisher>dada</dc
ublisher>
<dc:identifier>wdasdad</dc:identifier>
</course>
</library>
and the xsl is
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="2.0" xmlns="
xmlns:xsl="xmlns:dc="xmlns:dcterms="
<xsl
utput method="html" indent="no"/>
<xsl:template match="/">
<html>
<head>
<title>Thalis</title>
</head>
<body>
<table border="2" align="center">
<xsl:for-each select="library/course">
<tr>
<td>
<a target="_blank" href="details.php?cid={@ID}">
<xsl:value-of select="//dc:title"/>
</a>
</td>
<td><xsl:value-of select="//dc:creator"/></td>
<td><xsl:value-of select="//dcterms:educationLevel"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
If anyone could help it would be much appreciated.
Maria
I'm trying to transform a xml using an xsl but nothing is printed out.
I guess that there is something wrong with the namespace but i really don't know what should i do to fix it.
So here is the xml and the xsl also:
<?xml version="1.0" encoding="UTF-8"?>
<library xmlns=" xmlns:dc=" xmlns:dcterms=" xmlns:xsi=" xsi:schemaLocation=" d.xsd">
<course ID="1">
<dc:title>ir</dc:title>
<dc:creator>mplampla</dc:creator>
<dcterms:educationLevel>pr</dcterms:educationLevel>
<dc:description>sfsfsaf</dc:description>
<dcterms:tableOfContents>dfsf</dcterms:tableOfContents>
<dcterms:created>2004-12-21</dcterms:created>
<dcterms:modified>2005-01-21</dcterms:modified>
<dc:subject>dads</dc:subject>
<dc
<dc:identifier>wdasdad</dc:identifier>
</course>
<course ID="2">
<dc:title>dwdm</dc:title>
<dc:creator>maria</dc:creator>
<dcterms:educationLevel>pr</dcterms:educationLevel>
<dc:description>sfsfsaf</dc:description>
<dcterms:tableOfContents>dfsf</dcterms:tableOfContents>
<dcterms:created>2004-12-21</dcterms:created>
<dcterms:modified>2005-01-21</dcterms:modified>
<dc:subject>dads</dc:subject>
<dc
<dc:identifier>wdasdad</dc:identifier>
</course>
</library>
and the xsl is
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="2.0" xmlns="
xmlns:xsl="xmlns:dc="xmlns:dcterms="
<xsl
<xsl:template match="/">
<html>
<head>
<title>Thalis</title>
</head>
<body>
<table border="2" align="center">
<xsl:for-each select="library/course">
<tr>
<td>
<a target="_blank" href="details.php?cid={@ID}">
<xsl:value-of select="//dc:title"/>
</a>
</td>
<td><xsl:value-of select="//dc:creator"/></td>
<td><xsl:value-of select="//dcterms:educationLevel"/></td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
If anyone could help it would be much appreciated.
Maria