forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diwaker Gupta <>
Subject Re: [views] xsl:comment in templates
Date Wed, 31 Aug 2005 07:36:54 GMT
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:apply-templates select="@*|*|text()|processing-instruction()|
    <xsl:template match="xsl:comment">
            <xsl:value-of select="."/>

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. 

From David's mail, it seems that this problem is not view related? 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. We don't want to have a hack here, we need to understand 
the problem first :-)

On Apache:

View raw message