2 <xsl:stylesheet version=
"1.0"
3 xmlns:
xsl=
"http://www.w3.org/1999/XSL/Transform"
4 xmlns:
atom=
"http://www.w3.org/2005/Atom"
5 xmlns:
gd=
"http://schemas.google.com/g/2005">
7 <xsl:output method=
"xml" indent=
"yes"/>
9 <xsl:template match=
"child::entry">
12 <xsl:for-each select=
"descendant::gd:postalAddress">
14 <!-- TODO: add address location -->
16 <xsl:if test=
"@primary">
17 <xsl:attribute name=
"Pref">
18 <xsl:value-of select=
"@primary"/>
23 <xsl:value-of select=
"."/>
30 <xsl:value-of select=
"descendant::gd:email/@address"/>
36 <xsl:value-of select=
"descendant::atom:title"/>
42 <xsl:value-of select=
"descendant::gd:im[@protocol='http://schemas.google.com/g/2005#AIM']/@address"/>
47 <xsl:value-of select=
"descendant::gd:im[@protocol='http://schemas.google.com/g/2005#ICQ']/@address"/>
52 <xsl:value-of select=
"descendant::gd:im[@protocol='http://schemas.google.com/g/2005#JABBER']/@address"/>
57 <xsl:value-of select=
"descendant::gd:im[@protocol='http://schemas.google.com/g/2005#MSN']/@address"/>
62 <xsl:value-of select=
"descendant::gd:im[@protocol='http://schemas.google.com/g/2005#YAHOO']/@address"/>
65 <!-- Opensync doesn't have SKYPE type -->
69 <xsl:value-of select=
"descendant::atom:updated"/>
74 <xsl:for-each select=
"descendant::gd:phoneNumber">
77 <!-- Google allow use of @rel or @label, but not both! -->
78 <!-- TODO: parse @rel attribute and translate to valid Osync -->
79 <!-- <xsl:attribute name="Location"> -->
80 <!-- <xsl:value-of select="@rel"/> -->
81 <!-- </xsl:attribute> -->
82 <!-- Sets the element text, the phone number -->
83 <xsl:value-of select=
"."/>
90 <xsl:value-of select=
"descendant::atom:id"/>
96 <xsl:value-of select=
"descendant::atom:link[@rel='edit']/@href"/>