You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Fernando Padilla <fe...@alum.mit.edu> on 2007/09/05 18:43:13 UTC

Re: [T5] xml namespace support (facebook, fbml)

I was wondering if people could look into this patch and make comments.
 I would love to get it accepted sooner rather than later. :)

https://issues.apache.org/jira/browse/TAPESTRY-1600




Josh Canfield wrote:
> This has been mentioned as a bug in this list, search for *T5: XML
> declaration is missing from rendered page. Any workrounds?*
> 
> While I haven't tried this, I imagine that you could create components to
> work around this for now using MarkupWriter.writeRaw(). Or possibly use the
> OutputRaw component.
> 
> http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/corelib/components/OutputRaw.html
> 
> 
> Josh
> 
> On 8/30/07, Fernando Padilla <fe...@alum.mit.edu> wrote:
>> Hi.  We are going to be writing a facebook application, and we want to
>> use Tapestry 5.  To do so, we have to generate FBML:
>> http://wiki.developers.facebook.com/index.php/FBML
>>
>> We came hit a pretty big snag, in that it doesn't look like tapestry 5
>> support namespaces/prefixes.  Below you see the tapestry template we are
>> using, and you see the output below it.  And we need all of the "fb:"
>> prefixes to stay there, as well as the "xmlns:fb" declaration.
>>
>> Do you have any ideas?  I know I can probably create a component for
>> each element, but that would just be a big unmaintainable pain ( there
>> are like 50 right now and the FBML language changes ).. Or is there a
>> simpler way to maintain lots of mostly the same components :(
>>
>> Any other ideas?
>>
>>
>>
>>
>>
>> <fb:fbml xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"
>> xmlns:fb="http://apps.facebook.com/ns/1.0">
>>        <h1>Welcome</h1>
>>         <p>Just to prove this is live: </p>
>>        <p> The current time is: ${currentTime}. </p>
>>        <fb:name uid="1305604"/>
>>        <span>[<t:pagelink t:page="Start">refresh</t:pagelink>]</span>
>> </fb:fbml>
>>
>>
>> <fbml>
>>        <h1>Welcome</h1>
>>         <p>Just to prove this is live: </p>
>>        <p> The current time is: Thu Aug 30 13:43:19 PDT 2007. </p>
>>        <name uid="1305604"></name>
>>        <span>[<a href="/fandom/start" id="pagelink">refresh</a>]</span>
>> </fbml>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
> 
> 

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


Re: [T5] xml namespace support (facebook, fbml)

Posted by Nick Westgate <ni...@key-planning.co.jp>.
Looks useful. I do hope someone has time to look into it.

Cheers,
Nick.


Fernando Padilla wrote:
> I was wondering if people could look into this patch and make comments.
>  I would love to get it accepted sooner rather than later. :)
> 
> https://issues.apache.org/jira/browse/TAPESTRY-1600
> 
> 
> 
> 
> Josh Canfield wrote:
>> This has been mentioned as a bug in this list, search for *T5: XML
>> declaration is missing from rendered page. Any workrounds?*
>>
>> While I haven't tried this, I imagine that you could create components to
>> work around this for now using MarkupWriter.writeRaw(). Or possibly use the
>> OutputRaw component.
>>
>> http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/corelib/components/OutputRaw.html
>>
>>
>> Josh
>>
>> On 8/30/07, Fernando Padilla <fe...@alum.mit.edu> wrote:
>>> Hi.  We are going to be writing a facebook application, and we want to
>>> use Tapestry 5.  To do so, we have to generate FBML:
>>> http://wiki.developers.facebook.com/index.php/FBML
>>>
>>> We came hit a pretty big snag, in that it doesn't look like tapestry 5
>>> support namespaces/prefixes.  Below you see the tapestry template we are
>>> using, and you see the output below it.  And we need all of the "fb:"
>>> prefixes to stay there, as well as the "xmlns:fb" declaration.
>>>
>>> Do you have any ideas?  I know I can probably create a component for
>>> each element, but that would just be a big unmaintainable pain ( there
>>> are like 50 right now and the FBML language changes ).. Or is there a
>>> simpler way to maintain lots of mostly the same components :(
>>>
>>> Any other ideas?
>>>
>>>
>>>
>>>
>>>
>>> <fb:fbml xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"
>>> xmlns:fb="http://apps.facebook.com/ns/1.0">
>>>        <h1>Welcome</h1>
>>>         <p>Just to prove this is live: </p>
>>>        <p> The current time is: ${currentTime}. </p>
>>>        <fb:name uid="1305604"/>
>>>        <span>[<t:pagelink t:page="Start">refresh</t:pagelink>]</span>
>>> </fb:fbml>
>>>
>>>
>>> <fbml>
>>>        <h1>Welcome</h1>
>>>         <p>Just to prove this is live: </p>
>>>        <p> The current time is: Thu Aug 30 13:43:19 PDT 2007. </p>
>>>        <name uid="1305604"></name>
>>>        <span>[<a href="/fandom/start" id="pagelink">refresh</a>]</span>
>>> </fbml>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
> 
> 

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


Re: [T5] xml namespace support (facebook, fbml)

Posted by Fernando Padilla <fe...@alum.mit.edu>.
Well. I haven't kept up the patches because I haven't gathered the 
courage to change all my templates from .html to .tml. :) :)  But I 
should get to that soon.

But just as an update, yes we created a facebook app using facebook's 
fbml markup using T5 (with namespace patches), and a few other filters 
and services to help better integrate with facebook.  If you are on 
facebook, were thinking of trying it out, or are into sports, you can 
check out the apps:

http://apps.facebook.com/redsoxnation/
http://apps.facebook.com/yankeesfaithful/

(our first apps are for Red Sox Nation and Yankees Faithful, but we will 
be coming out with lots more ).




Something else interesting, is that these are actually one webapp.  But 
I have a filter (before tapestry filter) that rips out the leading 
directory and uses that to choose the "theme or skin" for the app..

http://apps.facebook.com/redsoxnation/start

is essentially interpreted as:

contextTeam: redsox
requestUri: http://apps.facebook.com/start





Jon McCarty wrote:
> I voted for this issue!  Also, it wasn't appearing on the JIRA "popular
> issues" list, so I changed the component to "tapestry-core".
> 
> Facebook, and other markup-based integration portals, is a fast growing
> sector of web development.  I hope to use T5 for these web application
> portals.  This fix will help.
> 
> 
> 
> Fernando Padilla wrote:
>> I was wondering if people could look into this patch and make comments.
>>  I would love to get it accepted sooner rather than later. :)
>>
>> https://issues.apache.org/jira/browse/TAPESTRY-1600
>>
>>
>>
>>
>> Josh Canfield wrote:
>>> This has been mentioned as a bug in this list, search for *T5: XML
>>> declaration is missing from rendered page. Any workrounds?*
>>>
>>> While I haven't tried this, I imagine that you could create components to
>>> work around this for now using MarkupWriter.writeRaw(). Or possibly use
>>> the
>>> OutputRaw component.
>>>
>>> http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/corelib/components/OutputRaw.html
>>>
>>>
>>> Josh
>>>
>>> On 8/30/07, Fernando Padilla <fe...@alum.mit.edu> wrote:
>>>> Hi.  We are going to be writing a facebook application, and we want to
>>>> use Tapestry 5.  To do so, we have to generate FBML:
>>>> http://wiki.developers.facebook.com/index.php/FBML
>>>>
>>>> We came hit a pretty big snag, in that it doesn't look like tapestry 5
>>>> support namespaces/prefixes.  Below you see the tapestry template we are
>>>> using, and you see the output below it.  And we need all of the "fb:"
>>>> prefixes to stay there, as well as the "xmlns:fb" declaration.
>>>>
>>>> Do you have any ideas?  I know I can probably create a component for
>>>> each element, but that would just be a big unmaintainable pain ( there
>>>> are like 50 right now and the FBML language changes ).. Or is there a
>>>> simpler way to maintain lots of mostly the same components :(
>>>>
>>>> Any other ideas?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> <fb:fbml xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"
>>>> xmlns:fb="http://apps.facebook.com/ns/1.0">
>>>>        <h1>Welcome</h1>
>>>>         <p>Just to prove this is live: </p>
>>>>        <p> The current time is: ${currentTime}. </p>
>>>>        <fb:name uid="1305604"/>
>>>>        [<t:pagelink t:page="Start">refresh</t:pagelink>]
>>>> </fb:fbml>
>>>>
>>>>
>>>> <fbml>
>>>>        <h1>Welcome</h1>
>>>>         <p>Just to prove this is live: </p>
>>>>        <p> The current time is: Thu Aug 30 13:43:19 PDT 2007. </p>
>>>>        <name uid="1305604"></name>
>>>>        [ /fandom/start refresh ]
>>>> </fbml>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>
>>
>>
> 

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


Re: [T5] xml namespace support (facebook, fbml)

Posted by Jon McCarty <jo...@hotmail.com>.
I voted for this issue!  Also, it wasn't appearing on the JIRA "popular
issues" list, so I changed the component to "tapestry-core".

Facebook, and other markup-based integration portals, is a fast growing
sector of web development.  I hope to use T5 for these web application
portals.  This fix will help.



Fernando Padilla wrote:
> 
> I was wondering if people could look into this patch and make comments.
>  I would love to get it accepted sooner rather than later. :)
> 
> https://issues.apache.org/jira/browse/TAPESTRY-1600
> 
> 
> 
> 
> Josh Canfield wrote:
>> This has been mentioned as a bug in this list, search for *T5: XML
>> declaration is missing from rendered page. Any workrounds?*
>> 
>> While I haven't tried this, I imagine that you could create components to
>> work around this for now using MarkupWriter.writeRaw(). Or possibly use
>> the
>> OutputRaw component.
>> 
>> http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/corelib/components/OutputRaw.html
>> 
>> 
>> Josh
>> 
>> On 8/30/07, Fernando Padilla <fe...@alum.mit.edu> wrote:
>>> Hi.  We are going to be writing a facebook application, and we want to
>>> use Tapestry 5.  To do so, we have to generate FBML:
>>> http://wiki.developers.facebook.com/index.php/FBML
>>>
>>> We came hit a pretty big snag, in that it doesn't look like tapestry 5
>>> support namespaces/prefixes.  Below you see the tapestry template we are
>>> using, and you see the output below it.  And we need all of the "fb:"
>>> prefixes to stay there, as well as the "xmlns:fb" declaration.
>>>
>>> Do you have any ideas?  I know I can probably create a component for
>>> each element, but that would just be a big unmaintainable pain ( there
>>> are like 50 right now and the FBML language changes ).. Or is there a
>>> simpler way to maintain lots of mostly the same components :(
>>>
>>> Any other ideas?
>>>
>>>
>>>
>>>
>>>
>>> <fb:fbml xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"
>>> xmlns:fb="http://apps.facebook.com/ns/1.0">
>>>        <h1>Welcome</h1>
>>>         <p>Just to prove this is live: </p>
>>>        <p> The current time is: ${currentTime}. </p>
>>>        <fb:name uid="1305604"/>
>>>        [<t:pagelink t:page="Start">refresh</t:pagelink>]
>>> </fb:fbml>
>>>
>>>
>>> <fbml>
>>>        <h1>Welcome</h1>
>>>         <p>Just to prove this is live: </p>
>>>        <p> The current time is: Thu Aug 30 13:43:19 PDT 2007. </p>
>>>        <name uid="1305604"></name>
>>>        [ /fandom/start refresh ]
>>> </fbml>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/-T5--xml-namespace-support-%28facebook%2C-fbml%29-tf4356861.html#a13013485
Sent from the Tapestry - User mailing list archive at Nabble.com.


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


Re: [T5] xml namespace support (facebook, fbml)

Posted by Fernando Padilla <fe...@alum.mit.edu>.
Specially for those trying to do xhtml or fbml :)

Please vote on the bug, I don't know when howard (are there any others 
working on Tap5?) will have time to review this.

The only thing is that I did not change the attribute api, because it 
currently takes a list of name,value pairs, I thought it would be too 
much to take a list of name,qname,uri,value quads. :)  So right now 
there is no way to add a namespaced attribute outside of the template.. 
but we can add a method to do that easily..

Also, does trunk build for anybody else?  tapestry-test under 
https://svn.apache.org/repos/asf/tapestry/tapestry5/trunk, at the latest 
svn 574982 is not building.  It's failing at compile time:

  package com.thoughtworks.selenium does not exist
  package org.mortbay.http does not exist
  package org.mortbay.jetty does not exist

is there a missing dependency??



#Cyrille37# wrote:
> Fernando Padilla a écrit :
>> I was wondering if people could look into this patch and make comments.
>>  I would love to get it accepted sooner rather than later. :)
>>
>> https://issues.apache.org/jira/browse/TAPESTRY-1600
>>   
> I think it's a must have behavior.
> cyrille.
> 
>>
>>
>>
>> Josh Canfield wrote:
>>  
>>> This has been mentioned as a bug in this list, search for *T5: XML
>>> declaration is missing from rendered page. Any workrounds?*
>>>
>>> While I haven't tried this, I imagine that you could create 
>>> components to
>>> work around this for now using MarkupWriter.writeRaw(). Or possibly 
>>> use the
>>> OutputRaw component.
>>>
>>> http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/corelib/components/OutputRaw.html 
>>>
>>>
>>>
>>> Josh
>>>
>>> On 8/30/07, Fernando Padilla <fe...@alum.mit.edu> wrote:
>>>    
>>>> Hi.  We are going to be writing a facebook application, and we want to
>>>> use Tapestry 5.  To do so, we have to generate FBML:
>>>> http://wiki.developers.facebook.com/index.php/FBML
>>>>
>>>> We came hit a pretty big snag, in that it doesn't look like tapestry 5
>>>> support namespaces/prefixes.  Below you see the tapestry template we 
>>>> are
>>>> using, and you see the output below it.  And we need all of the "fb:"
>>>> prefixes to stay there, as well as the "xmlns:fb" declaration.
>>>>
>>>> Do you have any ideas?  I know I can probably create a component for
>>>> each element, but that would just be a big unmaintainable pain ( there
>>>> are like 50 right now and the FBML language changes ).. Or is there a
>>>> simpler way to maintain lots of mostly the same components :(
>>>>
>>>> Any other ideas?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> <fb:fbml xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"
>>>> xmlns:fb="http://apps.facebook.com/ns/1.0">
>>>>        <h1>Welcome</h1>
>>>>         <p>Just to prove this is live: </p>
>>>>        <p> The current time is: ${currentTime}. </p>
>>>>        <fb:name uid="1305604"/>
>>>>        <span>[<t:pagelink t:page="Start">refresh</t:pagelink>]</span>
>>>> </fb:fbml>
>>>>
>>>>
>>>> <fbml>
>>>>        <h1>Welcome</h1>
>>>>         <p>Just to prove this is live: </p>
>>>>        <p> The current time is: Thu Aug 30 13:43:19 PDT 2007. </p>
>>>>        <name uid="1305604"></name>
>>>>        <span>[<a href="/fandom/start" id="pagelink">refresh</a>]</span>
>>>> </fbml>
>>>>
>>>>
>>>>       
>>   
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
> 

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


Re: [T5] xml namespace support (facebook, fbml)

Posted by #Cyrille37# <cy...@gmail.com>.
Fernando Padilla a écrit :
> I was wondering if people could look into this patch and make comments.
>  I would love to get it accepted sooner rather than later. :)
>
> https://issues.apache.org/jira/browse/TAPESTRY-1600
>   
I think it's a must have behavior.
cyrille.

>
>
>
> Josh Canfield wrote:
>   
>> This has been mentioned as a bug in this list, search for *T5: XML
>> declaration is missing from rendered page. Any workrounds?*
>>
>> While I haven't tried this, I imagine that you could create components to
>> work around this for now using MarkupWriter.writeRaw(). Or possibly use the
>> OutputRaw component.
>>
>> http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/corelib/components/OutputRaw.html
>>
>>
>> Josh
>>
>> On 8/30/07, Fernando Padilla <fe...@alum.mit.edu> wrote:
>>     
>>> Hi.  We are going to be writing a facebook application, and we want to
>>> use Tapestry 5.  To do so, we have to generate FBML:
>>> http://wiki.developers.facebook.com/index.php/FBML
>>>
>>> We came hit a pretty big snag, in that it doesn't look like tapestry 5
>>> support namespaces/prefixes.  Below you see the tapestry template we are
>>> using, and you see the output below it.  And we need all of the "fb:"
>>> prefixes to stay there, as well as the "xmlns:fb" declaration.
>>>
>>> Do you have any ideas?  I know I can probably create a component for
>>> each element, but that would just be a big unmaintainable pain ( there
>>> are like 50 right now and the FBML language changes ).. Or is there a
>>> simpler way to maintain lots of mostly the same components :(
>>>
>>> Any other ideas?
>>>
>>>
>>>
>>>
>>>
>>> <fb:fbml xmlns:t="http://tapestry.apache.org/schema/tapestry_5_0_0.xsd"
>>> xmlns:fb="http://apps.facebook.com/ns/1.0">
>>>        <h1>Welcome</h1>
>>>         <p>Just to prove this is live: </p>
>>>        <p> The current time is: ${currentTime}. </p>
>>>        <fb:name uid="1305604"/>
>>>        <span>[<t:pagelink t:page="Start">refresh</t:pagelink>]</span>
>>> </fb:fbml>
>>>
>>>
>>> <fbml>
>>>        <h1>Welcome</h1>
>>>         <p>Just to prove this is live: </p>
>>>        <p> The current time is: Thu Aug 30 13:43:19 PDT 2007. </p>
>>>        <name uid="1305604"></name>
>>>        <span>[<a href="/fandom/start" id="pagelink">refresh</a>]</span>
>>> </fbml>
>>>
>>>
>>>       
>   



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