forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <>
Subject Re: [views] xsl:comment in templates
Date Wed, 31 Aug 2005 08:13:28 GMT
On Wed, 2005-08-31 at 00:36 -0700, Diwaker Gupta wrote:
> I'm still an XML newbie, so you gotta help me out here Thorsten :-)
> On Friday 26 August 2005 12:57 pm, Thorsten Scherler wrote:
> > http://localhost:8888/prepare.include.xhtml.index
> >
> > still contains them but the stylesheet is <alias:stylesheet/> and the
> > <xsl:comment>. That could be the cause.
> hmm, I don't quite understand. The rest of the tags are still in the xsl: 
> namespace, so why is this a problem?
> > You need to add a stylesheet  in <map:match
> > pattern="get.contract.*.xhtml"> that transforms  <xsl:comment> to
> > <alias:comment>
> Alright, so here's what I did.
> o in the viewHelper.xhtml plugin's output.xmap, I added
> <map:transform src="resources/stylesheets/aliascomment.xsl"/>
> just before the i18n transform.
> o aliascomment.xsl looks like:
>     <xsl:template match="@*|*|text()|processing-instruction()|comment()">
>         <xsl:copy>
>             <xsl:apply-templates select="@*|*|text()|processing-instruction()|
> comment()"/>
>         </xsl:copy>
>     </xsl:template>
>     <xsl:template match="xsl:comment">
>         <alias:comment>
>             <xsl:value-of select="."/>
>         </alias:comment>
>     </xsl:template>
> If I now view http://localhost:8888/prepare.include.xhtml.index, I can see 
> that all xsl:comment elements now appear as alias:comment elements. But the 
> HTML still doesn't comtain the comments. 

It was a shoot in the dark. Sorry! 

> From David's mail, it seems that this problem is not view related? 

Exactly, I was wrong with my assumption. :(

> But I'm not 
> sure. In any case, I'd like to gain a little more understanding of exactly 
> how does this whole "alias" business work, and why does it affect comments in 
> this weird manner. 

Actually I think it does not. I reckon it has more something to do with
the serialization. I guess cocoon change the serializer somehow and now
the comments are gone.

> We don't want to have a hack here, we need to understand 
> the problem first :-)


Agree, but we need to search for the real problem because in the "old
fashion" skin there aren't comments either. I do not think anymore that
this had something to do with the alias vs. xsl namespace.

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)

View raw message