[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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)
noticias
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.