You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by "Joost Schouten (mailing lists)" <jo...@jsportal.com> on 2009/03/13 04:49:55 UTC

[T5.1] generator meta screws up xml response

Hi,

I have Tapestry generate an XML igoogle gadget file and have set the
@Meta("tapestry.response-content-type=text/xml") Recently however my
xml results in:

<Module>
    <head>
        <meta content="Apache Tapestry Framework (version
5.1.0.1-SNAPSHOT)" name="generator"/>
    </head>
    <ModulePrefs title="Hello World!"/>
    <Content type="html">
        Hello, world!
    </Content>
</Module>

It might be a good idea to have Tapestry recognize the content type
and only add the genrator Meta info on text/html content types. Or am
I missing something. Setting SymbolConstants.OMIT_GENERATOR_META=true
application wide fixes the problem, but that seems to rigorous for
just one or 2 xml resonses.

Cheers,
Joost

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


Re: [T5.1] generator meta screws up xml response

Posted by "Joost Schouten (mailing lists)" <jo...@jsportal.com>.
I created https://issues.apache.org/jira/browse/TAP5-584 and added a
patch that fixes the problem. If approved I'd love to see it included.

Cheers,
Joost

On Sat, Mar 14, 2009 at 3:09 PM, Howard Lewis Ship <hl...@gmail.com> wrote:
> Seems like a reasonable patch.
>
> On Fri, Mar 13, 2009 at 8:35 PM, Joost Schouten (mailing lists)
> <jo...@jsportal.com> wrote:
>> I see your point. Maybe you should check if the root element is <html>
>> or not. If not, don't add the <head> and <meta>. If you agree, I could
>> build a patch for this.
>>
>> Cheers, Joost
>>
>> On Fri, Mar 13, 2009 at 9:44 AM, Howard Lewis Ship <hl...@gmail.com> wrote:
>>> How would you distinguish between an XML response and an XHTML response?
>>>
>>> On Thu, Mar 12, 2009 at 8:49 PM, Joost Schouten (mailing lists)
>>> <jo...@jsportal.com> wrote:
>>>> Hi,
>>>>
>>>> I have Tapestry generate an XML igoogle gadget file and have set the
>>>> @Meta("tapestry.response-content-type=text/xml") Recently however my
>>>> xml results in:
>>>>
>>>> <Module>
>>>>    <head>
>>>>        <meta content="Apache Tapestry Framework (version
>>>> 5.1.0.1-SNAPSHOT)" name="generator"/>
>>>>    </head>
>>>>    <ModulePrefs title="Hello World!"/>
>>>>    <Content type="html">
>>>>        Hello, world!
>>>>    </Content>
>>>> </Module>
>>>>
>>>> It might be a good idea to have Tapestry recognize the content type
>>>> and only add the genrator Meta info on text/html content types. Or am
>>>> I missing something. Setting SymbolConstants.OMIT_GENERATOR_META=true
>>>> application wide fixes the problem, but that seems to rigorous for
>>>> just one or 2 xml resonses.
>>>>
>>>> Cheers,
>>>> Joost
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Howard M. Lewis Ship
>>>
>>> Creator Apache Tapestry and Apache HiveMind
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

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


Re: [T5.1] generator meta screws up xml response

Posted by Howard Lewis Ship <hl...@gmail.com>.
Seems like a reasonable patch.

On Fri, Mar 13, 2009 at 8:35 PM, Joost Schouten (mailing lists)
<jo...@jsportal.com> wrote:
> I see your point. Maybe you should check if the root element is <html>
> or not. If not, don't add the <head> and <meta>. If you agree, I could
> build a patch for this.
>
> Cheers, Joost
>
> On Fri, Mar 13, 2009 at 9:44 AM, Howard Lewis Ship <hl...@gmail.com> wrote:
>> How would you distinguish between an XML response and an XHTML response?
>>
>> On Thu, Mar 12, 2009 at 8:49 PM, Joost Schouten (mailing lists)
>> <jo...@jsportal.com> wrote:
>>> Hi,
>>>
>>> I have Tapestry generate an XML igoogle gadget file and have set the
>>> @Meta("tapestry.response-content-type=text/xml") Recently however my
>>> xml results in:
>>>
>>> <Module>
>>>    <head>
>>>        <meta content="Apache Tapestry Framework (version
>>> 5.1.0.1-SNAPSHOT)" name="generator"/>
>>>    </head>
>>>    <ModulePrefs title="Hello World!"/>
>>>    <Content type="html">
>>>        Hello, world!
>>>    </Content>
>>> </Module>
>>>
>>> It might be a good idea to have Tapestry recognize the content type
>>> and only add the genrator Meta info on text/html content types. Or am
>>> I missing something. Setting SymbolConstants.OMIT_GENERATOR_META=true
>>> application wide fixes the problem, but that seems to rigorous for
>>> just one or 2 xml resonses.
>>>
>>> Cheers,
>>> Joost
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Howard M. Lewis Ship
>>
>> Creator Apache Tapestry and Apache HiveMind
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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


Re: [T5.1] generator meta screws up xml response

Posted by "Joost Schouten (mailing lists)" <jo...@jsportal.com>.
I see your point. Maybe you should check if the root element is <html>
or not. If not, don't add the <head> and <meta>. If you agree, I could
build a patch for this.

Cheers, Joost

On Fri, Mar 13, 2009 at 9:44 AM, Howard Lewis Ship <hl...@gmail.com> wrote:
> How would you distinguish between an XML response and an XHTML response?
>
> On Thu, Mar 12, 2009 at 8:49 PM, Joost Schouten (mailing lists)
> <jo...@jsportal.com> wrote:
>> Hi,
>>
>> I have Tapestry generate an XML igoogle gadget file and have set the
>> @Meta("tapestry.response-content-type=text/xml") Recently however my
>> xml results in:
>>
>> <Module>
>>    <head>
>>        <meta content="Apache Tapestry Framework (version
>> 5.1.0.1-SNAPSHOT)" name="generator"/>
>>    </head>
>>    <ModulePrefs title="Hello World!"/>
>>    <Content type="html">
>>        Hello, world!
>>    </Content>
>> </Module>
>>
>> It might be a good idea to have Tapestry recognize the content type
>> and only add the genrator Meta info on text/html content types. Or am
>> I missing something. Setting SymbolConstants.OMIT_GENERATOR_META=true
>> application wide fixes the problem, but that seems to rigorous for
>> just one or 2 xml resonses.
>>
>> Cheers,
>> Joost
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

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


Re: [T5.1] generator meta screws up xml response

Posted by Howard Lewis Ship <hl...@gmail.com>.
How would you distinguish between an XML response and an XHTML response?

On Thu, Mar 12, 2009 at 8:49 PM, Joost Schouten (mailing lists)
<jo...@jsportal.com> wrote:
> Hi,
>
> I have Tapestry generate an XML igoogle gadget file and have set the
> @Meta("tapestry.response-content-type=text/xml") Recently however my
> xml results in:
>
> <Module>
>    <head>
>        <meta content="Apache Tapestry Framework (version
> 5.1.0.1-SNAPSHOT)" name="generator"/>
>    </head>
>    <ModulePrefs title="Hello World!"/>
>    <Content type="html">
>        Hello, world!
>    </Content>
> </Module>
>
> It might be a good idea to have Tapestry recognize the content type
> and only add the genrator Meta info on text/html content types. Or am
> I missing something. Setting SymbolConstants.OMIT_GENERATOR_META=true
> application wide fixes the problem, but that seems to rigorous for
> just one or 2 xml resonses.
>
> Cheers,
> Joost
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator Apache Tapestry and Apache HiveMind

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