4 messages in com.googlegroups.google-enterprise-developerGoogle Onebox
FromSent OnAttachments
mattdawg21 Aug 2006 09:14 
Jeff Ragusa21 Aug 2006 18:40 
mattdawg22 Aug 2006 09:08 
mattdawg24 Aug 2006 14:01 
Subject:Google Onebox
From:mattdawg (some@gmail.com)
Date:08/21/2006 09:14:53 AM
List:com.googlegroups.google-enterprise-developer

Hello Everyone,

I am playing around with google onebox and am using the python simulator for now and am just having some trouble understanding what I need to do to get this funny working. Here is what I have so far. This is my directory_example.xml

<?xml version="1.0" encoding="UTF-8"?> <GoogleEnterpriseSources xmlns:xsl="http://www.w3.org/1999/xsl/Transform"> <onebox type="external"> <name>directory_example</name> <description>This is a sample OneBox to see if I can query a directory information</description> <trigger triggerType="keyword">directory</trigger> <providerURL>http://localhost/testing</providerURL> <resultsTemplate> {xslt template} </resultsTemplate> </onebox> </GoogleEnterpriseSources>

here is my directory_example.xsl

<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:template name="directory_example"> <table border="0" cellpadding="1" cellspacing="0"> <tbody> <tr> <td colspan="2"> <nobr> <a> <xsl:attribute name="href"><xsl:value-of select="title/urlLink"/> </xsl:attribute> <b> <xsl:value-of select="title/urlText"/> </b> </a> </nobr> </td> </tr> <tr> <td valign="top" width="40"> <img> <xsl:attribute name="src"><xsl:value-of select="IMAGE_SOURCE"/> </xsl:attribute> </img> </td> <td valign="top" width="99%"> <xsl:for-each select="MODULE_RESULT"> <font size="-1"> <b><a> <xsl:attribute name="href"><xsl:value-of select="U"/> </xsl:attribute> <xsl:value-of select="Field[@name='firstname']"/> <xsl:value-of select="Field[@name='lastname']"/> </a></b> - <xsl:value-of select="Field[@name='email']"/> - <xsl:value-of select="Field[@name='phone']"/> </font> <br/> </xsl:for-each> </td> </tr> </tbody> </table> </xsl:template> </xsl:stylesheet>

at the command prompt I am typing: python onebox_simulator.py directory_example.xml --dumpOutput=1

Now I don't even know if all that is correct but it's working and it asks me to enter a query I enter: directory matt just for a test. I put some documents inside of the url to see if it could find anything and well frankly I don't know what I am doing.

So here are my questions. -What do I need to have in my url directory? -Is what I have correct? -This is just a test to see if I can figure out what I need to do, but what I want to do is eventually search a database. Am I even going in the right direction? -Is there a tutorial or some additional documentation that could help me with this? I have read Google OneBox for Enterprise Design Principles.htm and Google OneBox for Enterprise Developer's Guide.htm but am having trouble applying it.

I am sorry I am new to this kinda thing and can't quite get it. Any help here would be great.

Thanks, Matt