Good morning!
I have this XML:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="Relatorio.xsl"?>
<relatório id="LPROG" xmlns="http://www.dei.isep.ipp.pt/lprog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.dei.isep.ipp.pt/lprog Relatorio.xsd">
<páginaRosto>
<tema>oRolhas</tema>
<!--Bunch of other fields-->
</páginaRosto>
<!--Bunch of other fields-->
</relatório>
The XML is correctly formed and validated using the given XSD.
After applying this simple .xsl:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<title/>
</head>
<body>
<h1 align="center">Relatório Trabalho</h1>
<xsl:apply-templates select="relatório/páginaRosto"/>
</body>
</html>
</xsl:template>
<xsl:template match="páginaRosto">
<h1>Page</h1>
<h2>Tema:
<xsl:value-of select="tema"/>
</h2>
</xsl:template>
</xsl:stylesheet>
The output is:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body><h1 align="center">Relatório Trabalho</h1></body>
</html>
It is not "printing" the "páginaRosto" template, and I can't figure out why. Is there any problem with my XPath expressions or even with the XML file?
Thanks in advance