cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Rubin Ayma" <Ia...@mcsla.com.ar>
Subject RE: Help Help Please.....
Date Tue, 29 Jan 2002 15:56:03 GMT
Ivan,

I don't quietly understand your problem as you explain it, but if you
are making a for-each something inside a template matching everything,
that's a problem.

Why don't you attach your complete xsl, xml and the result of the
process (html?), those three files.

Ivan

-----Mensaje original-----
De: Ivan Manuel Andrade Muñoz [mailto:iandrade75@hotmail.com]
Enviado el: martes, 29 de enero de 2002 12:46
Para: cocoon-users@xml.apache.org
Asunto: Help Help Please.....


Hello all.

My problem, is that not like solving that my bucle for-each shows the
two to me imagenes together and not like separating them or giving an
option them so that xml does not show to meetings when executing my file
to it. 

My file .xml:
 
books.xml
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<?xml-stylesheet href="books.xsl" type="text/xsl"?>
<?cocoon-process type="xslt"?>
<!DOCTYPE Libros SYSTEM "books.dtd">
<Libros>
 <Libro Idioma="Inglés">
  <Nombre>
        Designing XML Internet Applications 
        </Nombre>
  <img url="book1.gif"/>
                <Precio>
                   67.55 USD
                </Precio> 
 </Libro>
 <Libro Idioma="Inglés">
  <Nombre>
         Perl 5 Complete
         </Nombre>
  <img url="book2.gif"/>
                <Precio>
                   72.75 USD
                </Precio> 
 </Libro>
</Libros>

My file .xsl:
books.xsl
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">

<xsl:processing-instruction name="cocoon-format">
   type="text/html"
</xsl:processing-instruction>
                 <TD>  
                 <!-- Error the show imagen --> 
                 <xsl:for-each  select="/Libros/Libro/img"> 
                       <IMG src="{@url}" border="1" height="125"
width="95"/> 
                 </xsl:for-each> 
                 <!-- End Error -->
                 </TD> 
                 <TD> 
                 <BR/>
                 </TD>
                 <TD>  
                 <H6>
                    <BR>
                    <FONT color="#000000" size="2">
                    Precio: 
                    </FONT>
                    <xsl:value-of select="Precio"/>
                    </BR>  
                 </H6>
                 </TD>
              </TR>  
           </TABLE> 
        </CENTER>
        </xsl:for-each>
        <P/> 
        <CENTER>
        <IMG src="Linea.gif"/>
        <P/>
        <INPUT type="submit" value="Ver Libros"/>
        <INPUT type="reset" value="Borrar Seleccion"/> 
        <P/>
        <IMG src="Linea.gif"/>
        <P/> 
        <A href="Tarea4a.html"> <IMG src="ant.gif"/> </A>
        <P/>
        </CENTER>  
  </FORM> 
 </BODY>
</HTML>
</xsl:template>
</xsl:stylesheet>
 
My file .dtd :
books.dtd
 
<!ELEMENT Libros (Libro+)>
<!ELEMENT Libro (Nombre, img, Precio)>
<!ATTLIST Libro Idioma CDATA #REQUIRED>
<!ELEMENT Nombre (#PCDATA)>
<!ELEMENT img EMPTY>
<!ATTLIST img url CDATA  #REQUIRED>
<!ELEMENT Precio (#PCDATA)>

As it shows to the file books.xml to me in cocoon, with imagenes
repeated. 

Thank you all.
Ivan Andrade M.
Punta Arenas.
Chile.



Descargue GRATUITAMENTE MSN Explorer en
http://explorer.yupimsn.com/intl.asp.
---------------------------------------------------------------------
Please check that your question has not already been answered in the FAQ
before posting. To unsubscribe, e-mail: For additional commands, e-mail:


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message