> -----Original Message-----
> From: Gavin (JIRA) [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 18 April 2006 8:30 PM
> To: [email protected]
> Subject: [jira] Commented: (FOR-834) GenericMarkup strips comments
>
> [ http://issues.apache.org/jira/browse/FOR-
> 834?page=comments#action_12374923 ]
>
> Gavin commented on FOR-834:
> ---------------------------
>
> I have an idea that may cure this but not sure of the 'how'.
>
> What about we create a <comment></comment> element that when processed by
> genericMarkup.ft , gets converted into
> <xsl:comment></xsl:comment>. Then the final output will render correctly
> into <!-- --> and will work for both comments and SSI commands.?
>
> So in the theme.fv file we could have :-
>
> <forrest:contract name="genericMarkup">
> <forrest:property name="genericMarkup">
> <hr/>
> <comment>This is a comment</comment>
> </forrest:property>
> </forrest:contract>
>
> Then we transform this in genericMarkup.ft :-
>
> <xsl:template match="/">
> <forrest:content>
> <forrest:part>
> <xsl:copy-of select="$genericMarkup/*"/>
> </forrest:part>
> </forrest:content>
> </xsl:template>
>
> Now somewhere above we get it to check for <comment> and transform it into
> <xsl:comment> , this is the bit I'm stuck on.
Actually now, I have this working - at least I can get the comments and
SSI's transformed nicely. I can also then get the rest of the content
Transformed correctly without repeating the comments.
Last hurdle, ideas welcome, I can not get the comments and the content
To mix properly - that is, once I got a comment transformed and then
The content, any more comments get ignored.
Using <comment>This is a comment</comment> in the theme.fv file, I then
Changed the genericMarkup.ft file to read:-
<xsl:param name="genericMarkup"/>
<xsl:template match="/">
<forrest:content>
<forrest:part>
<xsl:copy-of select="$genericMarkup/*[not('comment')]"/>
<xsl:comment><xsl:value-of select="$genericMarkup/comment"/></xsl:comment>
</forrest:part>
</forrest:content>
</xsl:template>
</xsl:stylesheet>
</forrest:template>
Like I say, comments transform nicely, but any html afterwards and any
comments afterwards are then ignored. I'm looking at xsl:choose etc
But no luck so far. Hope the above hints someone else.
Gav...
>
> Then, hopefully the output file will contain <!-- This is a comment -->
>
> For SSI the deal is the same, in the theme.fv file we say :-
>
> <comment>#include virtual="/file.inc" </comment>
>
> Which after processing will say:-
>
> <!--#include virtual="/file.inc" -->
>
> OR - Is there a way of putting <xsl:comment> directly into the theme.fv
> file - I tried it already as is and got :-
>
> The prefix "xsl" for element "xsl:comment" is not bound , hence the above
> idea.
>
> WDYT ?
>
> > GenericMarkup strips comments
> > -----------------------------
> >
> > Key: FOR-834
> > URL: http://issues.apache.org/jira/browse/FOR-834
> > Project: Forrest
> > Type: Bug
>
> > Components: Dispatcher (aka views)
> > Versions: 0.8-dev
> > Reporter: paul bolger
> > Priority: Minor
>
> >
> > Comments added to the markup in GenericMarkup are not passed to the
> output. This has implications for using server side includes within a
> Forrest site.
>
> --
> This message is automatically generated by JIRA.
> -
> If you think it was sent incorrectly contact one of the administrators:
> http://issues.apache.org/jira/secure/Administrators.jspa
> -
> For more information on JIRA, see:
> http://www.atlassian.com/software/jira
>
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.385 / Virus Database: 268.4.3/316 - Release Date: 17/04/2006