Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Junior Member mokojin's Avatar
    Join Date
    Sep 2004
    Posts
    5
    Member #
    7711
    Hi ppl I get this error only on mozilla:

    Error loading stylesheet: Parsing an XSLT stylesheet failed.
    here are the files:

    noticias.xml

    Code:
    <?xml version = "1.0" encoding = "ISO-8859-1"?>
    <?xml-stylesheet type="text/xsl" href="noticias.xsl"?>
    <NOTICIAS46>
    <DATANOTICIA>
    	<IMAGEM>../imagens/cat_site.gif</IMAGEM>
    	<DATA>2004/10/15</DATA>
    	<NOTICIA>Já está online o programa anual do Agrupamento 46 para o ano 2004/2005</NOTICIA>
    </DATANOTICIA>
    <DATANOTICIA>
    	<IMAGEM>../imagens/cat_46.gif</IMAGEM>
    	<DATA>2004/10/08</DATA>
    	<NOTICIA>ACTIVIDADE DE ABERTURA: Devido ao facto de algumas cartas ainda não terem chegado ao seu destino ficam aqui os dados relativos à actividade de abertura. Os escuteiros devem estar dia 10/10/2004 às 9:30 na Igreja de Sta. Maria, fardados e com 2,5 euros para o almoço. Os pais devem estar às 16:15 na Igreja, para ver as fotografias do acampamento de Agrupamento nos Pirinéus.</NOTICIA>
    </DATANOTICIA>
    <DATANOTICIA>
    	<IMAGEM>../imagens/cat_site.gif</IMAGEM>
    	<DATA>2004/10/08</DATA>
    	<NOTICIA>O nosso site volta a abrir ao público! Esperemos que gostem, assinem o nosso livro de visitas. Atenção: ainda existem algumas àreas em desenvolvimento.</NOTICIA>
    </DATANOTICIA>
    </NOTICIAS46>
    noticias.xlt

    Code:
    <?xml version='1.0'?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
    <xsl:template match="/">
    
    <html>
    <head>
    <title>Agrupamento 46 - Noticias</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </meta>
    
    
    
    </head>
    
    <body bgcolor="#D7F0FF">
    
    	<table width="100%"  border="0" cellspacing="0" cellpadding="3">
    	
    	<xsl:for-each select="NOTICIAS46/DATANOTICIA"> 
    	<tr>
    	    <td valign="top"><xsl:element name="img"><xsl:attribute name="src"><xsl:value-of select="IMAGEM"/><xsl:attribute name="alt=">"Categoria - Agrupamento" width="40" height="40"</xsl:attribute></xsl:attribute></xsl:element></td>
    	    <td valign="top"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><xsl:value-of select="DATA"/> - </strong><xsl:value-of select="NOTICIA"/></font><br/><br/></td>
    	
    	</tr>
    	</xsl:for-each> 
    </table>
    
    </body>
    </html>
    
    </xsl:template>
    </xsl:stylesheet>
    can u guys help me solving this problem?

  2.  

  3. #2
    WDF Staff smoseley's Avatar
    Join Date
    Mar 2003
    Location
    Boston, MA
    Posts
    9,729
    Member #
    819
    Liked
    205 times
    Your stylesheet had a few issues. I think I fixed 'em all.
    Code:
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
        <xsl:template match="/">
            <html>
            <head>
                <title>Agrupamento 46 - Noticias</title>
                <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </meta>
            </head>
            <body bgcolor="#D7F0FF">
                <table width="100%"  border="0" cellspacing="0" cellpadding="3">
                    <xsl:for-each select="NOTICIAS46/DATANOTICIA"> 
                        <tr>
                            <td valign="top"><img src="{IMAGEM}" alt="Categoria - Agrupamento" width="40" height="40" /></td>
                            <td valign="top">
                                <font size="1" face="Verdana, Arial, Helvetica, sans-serif">
                                    <strong>
                                        <xsl:value-of select="DATA"/> - 
                                    </strong>
                                    <xsl:value-of select="NOTICIA"/>
                                </font>
                                <br />
                                <br />
                            </td>
                        </tr>
                    </xsl:for-each> 
                </table>
            </body>
            </html>
        </xsl:template>
    </xsl:stylesheet>

  4. #3
    Junior Member mokojin's Avatar
    Join Date
    Sep 2004
    Posts
    5
    Member #
    7711
    well, still doesn´t work on firefox. More ideas?


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:54 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com