[
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.
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