26 messages in com.googlegroups.google-mashup-editorRe: gm:link Tag and Google Data Sourc...
FromSent OnAttachments
Reto Meier08 Oct 2007 02:32 
Jason08 Oct 2007 15:56 
Reto Meier09 Oct 2007 05:16 
Jason10 Oct 2007 10:46 
Jason12 Nov 2007 11:16 
adszhu06 Jan 2008 04:37 
Jason07 Jan 2008 10:34 
adszhu10 Jan 2008 11:23 
Jason10 Jan 2008 16:17 
adszhu14 Jan 2008 08:50 
Jason14 Jan 2008 16:25 
Jason15 Jan 2008 10:46 
adszhu16 Jan 2008 04:43 
Ádám Szigeti22 Jan 2008 10:52 
Jason22 Jan 2008 11:25 
Ádám Szigeti23 Jan 2008 03:26 
Jason23 Jan 2008 10:35 
Ádám Szigeti24 Jan 2008 01:15 
Ádám Szigeti24 Jan 2008 10:47 
Jason25 Jan 2008 18:32 
Ádám Szigeti26 Jan 2008 09:09 
adszhu19 Feb 2008 01:00 
Jason21 Feb 2008 14:19 
Ádám Szigeti22 Feb 2008 01:41 
Jason22 Feb 2008 14:14 
Ádám Szigeti23 Feb 2008 08:01 
Subject:Re: gm:link Tag and Google Data Source Freshness
From:adszhu (ads@gmail.com)
Date:01/14/2008 08:50:33 AM
List:com.googlegroups.google-mashup-editor

Hi Jason,

OK, it seems <author> is a kind of tricky to fetch. Maybe the data under the "Fetch my calendars" just fine for me, which You already accessed in the sample mashup. However, the Location info ("where") of the appointments is a must for me. Isn't it easier to fetch than the <author>? My approach seems logical (line 352), but no results yet...

On Jan 11, 1:17 am, Jason <gmej@google.com> wrote:

Hi Adam. Since atom:author is managed by GME's server-side services, it is not exposed in fetched feeds; this explains why it is not appearing. I haven't tried this myself, but you may be able to extract an event's author using the getAuthors() method of the google.gdata.Entry class.

http://code.google.com/apis/gdata/jsdoc/1.1/google/gdata/Entry.html#g...

You could then copy this value into a custom GME element (e.g. gmd:author) and display it using your textarea control. Please let me know if this works for you.

- Jason

On Jan 10, 11:23 am, adszhu <ads@gmail.com> wrote:

Hi, In fact I don't want to write to that element, I just want to read it. Quite exactly, I want the owner of the calendar along with the Location of the appointments in the calendar appear in a table. The mashup is being built here:http://ppfinder.googlemashups.com/ Line 350 and 352 are not OK, I meand they fail to show on the mashup, although I believe I apply the correct XPath addressing.

Ciao,

Ádám

On Jan 7, 7:34 pm, Jason <gmej@google.com> wrote:

GME does not allow you to write to atom:author because this element is managed internally. Try using a custom element like gmd:authorName instead.

- Jason

On Jan 6, 4:37 am, adszhu <ads@gmail.com> wrote:

Hi, I am usinghttp://demo-jsgdatalib.googlemashups.com/asabasisfor my own mashup, and I faced some difficulties when reaching the elements of the calendar feed. It is the lines 374..376 of the code in GME. While Jason's <td align="center"><gm:date ref="gd:when/@startTime"/></td> expression operates, the <td><gm:text ref="author/name"/></td> does not. I have tried all the methods mentioned
athttp://www.w3schools.com/xpath/xpath_syntax.asp, including ".author/name", and "atom:author/name" as well. I also could not reach the "gd:where@valueString" data element. On the other hand, "title" can be fetched succesfully. Is there any trick that makes it work?

On Nov 12 2007, 8:17 pm, Jason <gmej@google.com> wrote:

Hi Reto. I have some good news for you:

1) As of last week's release, all caches, including those from Google Spreadsheets and Google Calendar, now expire after 10 minutes -- much better than once or twice a day. :) This greatly increases the utility of applications that use Google Spreadsheets, et al. as a data store.

2) Styles for certain tags (including gm:link and gm:image) have been adjusted so that they now more closely match their HTML analogues, meaning that they are now displayed as inline elements rather than block.

Enjoy!

- Jason

Hi Reto. My answers are inlined below:

1) Yep, seen the client-sideJavaScriptlibraryfor Calendar. The big benefit ofGMEis that I can define one datasource (calendar) and have it automatically create a list and stick pins on a map without having to mess around with clientside Java. In fact, I'm trying to map the location of events in a calendar, the gm:map tag lets me do that in a single line, with the dynamic geocoding of the 'where' field done in the same place. Much neater than fetching the calendar and parsing through each item, geocoding, and placing pins. Been there. Hated it.

Fair enough. :) We are actually working to integrate the relatively newJavaScriptGDatalibraries andGMEin order to simplify the process of writing to calendar feeds, displaying unshared events, etc. considerably. This may not be right around the corner, but it's definitely on our road map.

2) Um yes. But that means I need to find a parameter that: (a) I don't need to specify for my purposes (b) Has sufficient scope to be changed every 30 mins / hour for the foreseeable future without running out of scope. Max-results is what I'musingin test for calendar, and I can mess with structured queries in spreadsheet to achieve similar results, but both fit firmly under 'cheap hack' rather than the extra time parameter that I can happily place in the 'lateral workaround' category.

Your points are valid. Unfortunately,GDatafeeds do not accept arbitrary query string parameters and Google Reader's feed-reading infrastructure, whichGMErelies on to pull and cache feeds, does not support variable cache refresh frequencies. I will reiterate your concerns, however.

3) gm:link : yep, did that -- but why does it behave that way in the first place? It's inconsistent with other tags and having it act this way by default means we need to hack around in CSS to get it to work, if it defaulted to inline it would be trivial to place it by itself on a  new lineusingstandard HTML.

I'll put in a feature request. Thanks for the suggestion.

Now the question!

For the record, what is the typical cache frequency for Calendar and Spreadsheet feeds? Spreadsheets in particular seems to update less than once a day!

I'm afraid I don't know the exact frequency, but, as you've pointed out, it is far too small to create applications that rely on displaying frequent updates to these feeds. I'll reiterate your concerns to the team, and hopefully we can come up with a mutually beneficial solution or at least a reasonable compromise. Thanks for your patience, and keep those questions coming. :)

On 8 Oct, 23:57, Jason <gmej@google.com> wrote:

Hi Reto. There have been several recent posts concerningGME'sfeed caching. I do have a couple of suggestions for you:

1. The newJavaScriptclientlibraryfor Google Calendar allows you to pull calendar and event feeds into standard HTML pages and, luckily enough,GMEsource files as well. This clientlibraryis only available for Calendar (for now...), but it's definitely worth a look. Oh, and did I mention that it also enables you to write to calendar feeds? This alone opens the door for some pretty awesome mashup possibilities. Click the link below to see a sample of theJavaScript clientlibraryfor Calendar in action.

2. Even though allGDataservices throw an error if you pass in an unrecognized query string parameter, you can use the parameters they do support, including max-results and updated-max, to achieve a higher "cache refresh rate." Bear in mind that your application will likely load much more slowly than it would ordinarily since fresh feeds are fetched and cached by the server every time you access a new URL, but this should work.

As far as your issues with the gm:link tag goes, CSS may be the solution you're looking for. In fact,GMEdeveloper Phil Rees recently wrote a very good article on re-stylingGMEtags:

It explains how to use the Firefox extension Firebug to inspectGME markup so you can manipulate it to fit your needs. For example, the following simple application displays the links for Digg articles in one line:

<gm:page title="My App" authenticate="false">   <style>     div .gwt-HTML {       display: inline;     }   </style>

  <gm:list data="http://digg.com/rss/index.xml" template="myTemplate"/

  <gm:template id="myTemplate">     <span repeat="true">       <gm:link ref="atom:link/@href" labelref="atom:title"/>     </span>   </gm:template> </gm:page>

Please let me know if you have any other questions.

- Jason

On Oct 8, 2:32 am, Reto Meier <reto@gmail.com> wrote:

I'm working on a big new mashup that includes data sourced from Google Calendar and Spreadsheets. While putting it together I've noticed a couple of issues.

I'm pulling feeds from Spreadsheets and Calendar, but theGMEcache for both sources isn't updated frequently (*maybe* once or twice a day). The usual trick of sticking a '&timevariable=[date/time variable goes here]' at the end of the feed address doesn't work, as Spreadsheet & Calendar have strict parameter passing requirements (which return an error of you add extra variables). It would be *really* nice to be able to set a parameter in the gm:data tag that specifies the frequency of cache refreshes -- particularly for SS and Cal. Even if it's coarse grained like 30mins / hourly / daily.

Also, I've noticed that the gm:link tag implies a trailing <br/>. In other words, you can't string a bunch of these links together on one line of text; and if the linkref field is empty,

...