Returns a list of the user's documents from Google Docs™.
Attribute | Description | Type | Default | Options | Use |
---|---|---|---|---|---|
category | The category of documents to return. The value of this attribute must be set to 'document'. | xs:string | document | document | required |
page-index | An optional number of the page to return in the response. It is not an error if the value of this attribute is greater than the actual number of pages, in that case an empty response is returned. | xs:integer | 1 | [1,∞] | optional |
page-size | An optional number of documents returned in a single response page. It is an error if the value is outside the range. | xs:integer | 10 | [1,500] | optional |
query | An optional query string. If specified, then only the documents that contain this string will be returned. The matching is case insensitive. | xs:string | optional | ||
xml:id | It is used by the pipeline:errorSourceID function to identify the gdocs:list-docs element. Refer to Handling pipeline errors for further information. | xs:ID | optional |
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/2002/06/xhtml2"
xmlns:pipeline="http://www.volantis.com/xmlns/marlin-pipeline"
xmlns:gdocs="http://www.volantis.com/xmlns/2008/08/gdocs">
<head>
<title>gdocs:list-docs</title>
</head>
<body>
<div>
<pipeline:transform href="list2xdime.xsl">
<gdocs:list-docs xml:id="first-list" category="document">
<gdocs:authenticate user-id="antennatests@gmail.com" password="1antenna1"/>
</gdocs:list-docs>
</pipeline:transform>
</div>
</body>
</html>
The Google Docs service returns the list of available documents in the form of a feed. You must use an XSL transform to convert the feed to an XDIME presentation markup.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns="http://www.w3.org/2002/06/xhtml2"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:atom="http://www.w3.org/2005/Atom"
version="2.0">
<xsl:template match="atom:feed">
<h1>
<xsl:value-of select="atom:title"/>
</h1>
<xsl:for-each select="atom:entry">
<div>
<a>
<xsl:attribute name="href">
<xsl:value-of select="atom:content/@src"/>
</xsl:attribute>
<xsl:value-of select="atom:title"/>
</a>
</div>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>