Problems with XSL code

Subject: Problems with XSL code
From: Marcos Coelho <marcos_coelho@xxxxxxxxx>
Date: Tue, 26 Sep 2000 07:06:13 -0700 (PDT)
Hi,
This is my first message to the list !!
I made a XML and XSL file which done is on the bottom of this message.
The XML I feel its OK. The problem is XSL which creates a HTML black
file as a result. I use XML SPY, Is it a good editor ?
My XML editor can creat many files like xml, xsl, xslt, xdr, dcd,
xsd...
Which one I must create to my XML application works properly ?

thanks in advance
Marcos Coelho


---------------XSL file --------------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:fo="http://www.w3.org/1999/XSL/Format";>
<xsl:template match="/">
<html>
<head>
<title> Noticias </title>
</head>
<body bgcolor="white">
<font color="black">
<table width="719" border="0">
<xsl:value-of select="NOTICIAS">
  <tr>
    <td> <xsl:for-each select="/NOTICIAS/TITULO"></xsl:for-each> </td>
    <td> <xsl:for-each select="/NOTICIAS/DATA"></xsl:for-each> </td>
    <td> <xsl:for-each select="/NOTICIAS/TIPO"></xsl:for-each> </td>
  </tr>
</xsl:value-of>
</table>
</font></body>
</html>
</xsl:template>
</xsl:stylesheet>


---------------XML file --------------------------
<?xml-stylesheet type="text/xsl" href="C:\Users\Marcos\Teste XML
SPY\noticias.xsl"?>
<!DOCTYPE Cosmo SYSTEM "C:\Users\Marcos\Teste XML SPY\noticias.dtd">
<Cosmo>
   <NOTICIAS>
      <TITULO>Coca-Cola tem exclusividade em Sydney</TITULO>
      <DATA>19/09/00</DATA>
      <TIPO>Economia</TIPO>
      <AUTOR>COSMO ON LINE</AUTOR>
      <CODIGO>03</CODIGO>
      <HORA>10:08 </HORA>
      <CONTEUDO>A marca de refrigerantes Coca-Cola fechou um contrato
</CONTEUDO>
   </NOTICIAS>
   <NOTICIAS>
      <TITULO>Jaqueta de Hendrix vale US$ 28 mil</TITULO>
      <DATA>19/09/00</DATA>
      <TIPO>Geral</TIPO>
      <AUTOR>COSMO ON LINE</AUTOR>
      <CODIGO>01</CODIGO>
      <HORA>11:00 </HORA>
      <CONTEUDO>Uma jaqueta que pertenceu a Jimi Hendrix vai à leilão
</CONTEUDO>
</NOTICIAS>
   <NOTICIAS>
      <TITULO>Replan volta a funcionar</TITULO>
      <DATA>19/09/00</DATA>
      <TIPO>Cidades</TIPO>
      <AUTOR>COSMO ON LINE</AUTOR>
      <CODIGO>02</CODIGO>
      <HORA>11:14 </HORA>
      <CONTEUDO>A Replan (Refinárias do Planalto) voltou a funcionar
</CONTEUDO>
   </NOTICIAS>
</Cosmo>

---------------DTD file --------------------------

<?xml version="1.0" encoding="UTF-8"?>
<!--DTD generated by XML Spy v3.0.7 (http://www.xmlspy.com)-->
<!ELEMENT Cosmo (NOTICIAS+)>
<!ELEMENT NOTICIAS (TITULO, DATA, TIPO, AUTOR, CODIGO, HORA, CONTEUDO)>
<!ELEMENT AUTOR (#PCDATA)>
<!ELEMENT HORA (#PCDATA)>
<!ELEMENT DATA (#PCDATA)>
<!ELEMENT CONTEUDO (#PCDATA)>
<!ELEMENT CODIGO (#PCDATA)>
<!ELEMENT TIPO (#PCDATA)>
<!ELEMENT TITULO (#PCDATA)>



__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread