Another option is to put the FOOBAR into your .properties file:

<t:outputraw value="message:foobar"/>

... or write a single-line component:

public class Cout
{
  @Parameter(...)
  private String value;

  boolean beginRender(MarkupWriter writer)
  {
    writer.writeRaw("<!--");
    writer.writeRaw(value);
    writer.writeRaw("-->");

   return false;
  }
}

On Thu, Apr 16, 2009 at 12:37 PM, Borut Bolčina <borut.bolc...@gmail.com> wrote:
> Hi,
>
> funny thing. This
>
> <t:OutputRaw value="literal:<!--FOOBAR-->"/>
>
> gives me
>
> org.xml.sax.SAXParseException
> The value of attribute "value" associated with an element type
> "t:OutputRaw" must not contain the '<' character.
>
> while
>
> <t:OutputRaw value="literal:&lt;!--FOOBAR-->"/>
>
> renders ok as
> <!--FOOBAR-->
>
>
> So, character > is permited, while < is not??? Of course
>
> <t:OutputRaw value="literal:&lt;!--FOOBAR--&gt;"/>
>
> works as well.
>
> I am using 5.0.18.
>
> Thanks for the tip Howard.
>
> -Borut
>
>
> 2009/4/16 Howard Lewis Ship <hls...@gmail.com>:
>> Use the OutputRaw component?
>>
>> On Thu, Apr 16, 2009 at 8:03 AM, Borut Bolčina <borut.bolc...@gmail.com> 
>> wrote:
>>> Hi,
>>>
>>> maybe this will sound very obscure, but if I write a html comment in a
>>> tml file, for example:
>>>
>>> <t:layout xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd";>
>>>        <!--FOOBAR-->
>>> </t:layout>
>>>
>>> the rendered HTML is:
>>>
>>> <!-- FOOBAR -->
>>>
>>> Notice the space before F and space after R.
>>>
>>> Some external software is checking for presence of <!--FOOBAR--> and
>>> is failing because additional spaces are rendered in the HTML.
>>>
>>> Any hints before I start creating a component that renders what I want?
>>>
>>> Cheers,
>>> Borut
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Howard M. Lewis Ship
>>
>> Creator of Apache Tapestry
>> Director of Open Source Technology at Formos
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry
Director of Open Source Technology at Formos

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to