More Related Content
Similar to BluePrint Mobile Framework
Similar to BluePrint Mobile Framework (20)
More from Christian Heilmann
More from Christian Heilmann (20)
BluePrint Mobile Framework
- 13. Rich set of controls available Navigation bar Image list tables Maps & directions location
- 21. How it works? (HTML) HTML renderer Widget engine Your server html BP
- 25. C onfig.xml <?xml version="1.0" encoding="UTF-8"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://mobile.yahoo.com/widgets/schema/1.0/config/"> <title>YDN Widget</title> <version>1.0</version> <identifier>ydn-widget-1</identifier> <description>YDN Widget</description> <icon>ybang</icon> <author organization="Yahoo!" href="http://developer.yahoo.com" email= [email_address] >Jose Palazon</author> <!-- change this widget base to your server url --> <widget base="http://www.noletia.com/ydn"> <preview> <icon>ybang</icon> <label>YDN Widget</label> </preview> <shortcuts> <item default="true"> <label>YDN Widget</label> <href>index.php</href> </item> </shortcuts> </widget> </config>
- 26. Server side code <?php header( "Content-Type: application/x-ywidget+xml" ); header( "Cache-Control: no-cache" ); $xsl = "ydn.xsl"; $xml = "http://developer.yahoo.com/blog/index.xml"; $xslt = new XSLTProcessor(); $xslt->importStyleSheet(DOMDocument::load($xsl)); echo ($xslt->transformToXML(DOMDocument::load($xml))); ?>
- 27. Server side code <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" encoding="utf-8" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system= http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd indent="yes"/> <xsl:template match='//channel'> <page> <content> <section> <header layout="simple"> <layout-items> <block class="title">YDN Widget</block> </layout-items> </header> </section> <xsl:apply-templates select="item" /> </content> </page> </xsl:template> <xsl:template match="item"> <placard layout="card" class="link"> <layout-items> <image resource="ybang"/> <block class="title"><xsl:value-of select="title"/></block> <block class="description"><xsl:value-of select="pubDate"/></block> <block class="subtext"><xsl:value-of select="category"/></block> </layout-items> <load resource="{link}" event="activate"/> </placard> </xsl:template> </xsl:stylesheet>