HI, i'm having a little trouble in putting a transformer in xsl to work with cocoon. The thing is, after i apply a java trasformer made by me i get the following result in the "view source" of IE
<!-- XML FRAGMENT --> <document> <contents> <article layouttype="2" xpos="5" ypos="7" border="dotted"> <title>Titulo com rating 2</title> <text>Texto</text> </article> <article layouttype="3" xpos="5" ypos="7" border="dotted"> <title>Titulo do artigo com rating igual a 1</title> <text>texto do artigo com rating igual a 1</text> <image>img1.jpg</image> </article> <article layouttype="4" xpos="5" ypos="7" border="dotted"> <title>Titulo do artigo com rating igual a 2</title> <text>texto do artigo com rating igual a 2</text> <image>img1.jpg</image> </article> <article layouttype="2" xpos="5" ypos="7" border="dotted"> <title>Titulo do artigo com rating igual a 2</title> <text>texto do artigo com rating igual a 2</text> <image>img1.jpg</image> </article> </contents> </document> and this is good. After this i want to apply another generator in xsl, <!-- XLS STYLESHEET daeTransformer2html.xsl --> <?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output type="xml"/> <xsl:template match="/"> <xsl:apply-templates /> </xsl:template> <xsl:template match="contents"> <HTML> <HEAD> </HEAD> <BODY> <xsl:apply-templates select="[EMAIL PROTECTED]'2']"/> </BODY> </HTML> </xsl:template> <xsl:template match="article"> article <xsl:value-of select="title"/> <xsl:value-of select="text"/> <img> <xsl:attribute name="src"> <xsl:value-of select="image"/> </xsl:attribute> </img> </xsl:template> </xsl:stylesheet> The sitemap defined is as follows <!-- SITEMAP --> <map:match pattern="daestart"> <map:generate type="serverpages" src="daexsps/start.xsp"/> <map:transform src="daestyles/removens.xsl"/> <map:transform type="dae"/> <map:transform src="daestyles/daeTransformer2html.xsl"/> <map:serialize type="html"/> </map:match> and the answer sent to the browser is <!-- RESPONSE SENT TO BROWSER --> <HTML> <HEAD> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> </HEAD> <BODY></BODY> </HTML> wich is not right. I tried to copy the first XML Fragment and put it in a file with the name daexmltest.xml and apply the XSL referenced earlier (pipeline bellow) <!-- PIPELINE --> <map:match pattern="daetest"> <map:generate src="daexmltest.xml"/> <map:transform src="daestyles/daeTransformer2html.xsl"/> <map:serialize type="html"/> </map:match> and the response to the browser was <HTML> <HEAD> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> </HEAD> <BODY> article Titulo com rating 2Texto<img src=""> article Titulo do artigo com rating igual a 2texto do artigo com rating igual a 2<img src="img1.jpg"></BODY> </HTML> and this is rigth, because it accesses the attribute @layouttype and returns only the <article> tags that has @layouttype=2 If you have any ideas , of how to handle this ... Thanks in advance Miguel Carvalho --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
