Author: as Date: Fri Nov 16 13:16:50 2007 New Revision: 6751 Log: - Added support for generating 'content' ATOM feed entry sub-element. # Still need support to generate 'content' with XML contents. # Still need to modify the tests to include the content-link-summary dependencies.
Added: trunk/Feed/tests/atom/regression/generate/entry/content/ trunk/Feed/tests/atom/regression/generate/entry/content/content_empty.in trunk/Feed/tests/atom/regression/generate/entry/content/content_empty.out trunk/Feed/tests/atom/regression/generate/entry/content/content_empty_src.in trunk/Feed/tests/atom/regression/generate/entry/content/content_empty_src.out trunk/Feed/tests/atom/regression/generate/entry/content/content_src_type_zip.in trunk/Feed/tests/atom/regression/generate/entry/content/content_src_type_zip.out trunk/Feed/tests/atom/regression/generate/entry/content/content_type_absent.in trunk/Feed/tests/atom/regression/generate/entry/content/content_type_absent.out trunk/Feed/tests/atom/regression/generate/entry/content/content_type_html.in trunk/Feed/tests/atom/regression/generate/entry/content/content_type_html.out trunk/Feed/tests/atom/regression/generate/entry/content/content_type_png.in trunk/Feed/tests/atom/regression/generate/entry/content/content_type_png.out trunk/Feed/tests/atom/regression/generate/entry/content/content_type_text.in trunk/Feed/tests/atom/regression/generate/entry/content/content_type_text.out trunk/Feed/tests/atom/regression/generate/entry/content/content_type_text_other.in trunk/Feed/tests/atom/regression/generate/entry/content/content_type_text_other.out trunk/Feed/tests/atom/regression/generate/entry/content/content_type_xhtml.in trunk/Feed/tests/atom/regression/generate/entry/content/content_type_xhtml.out trunk/Feed/tests/atom/regression/generate/entry/content/powered-by-141x32-white.png (with props) Modified: trunk/Feed/src/processors/atom.php Modified: trunk/Feed/src/processors/atom.php ============================================================================== --- trunk/Feed/src/processors/atom.php [iso-8859-1] (original) +++ trunk/Feed/src/processors/atom.php [iso-8859-1] Fri Nov 16 13:16:50 2007 @@ -450,6 +450,102 @@ } /** + * Creates an XML node in the XML document being generated. + * + * @param DOMNode $root The root in which to create the node $element + * @param string $element The name of the node to create + * @param string $parent The name of the parent node which contains the node $element + * @param array(string=>mixed) $dataNode The data for the node to create + * @ignore + */ + protected function generateContentNode( DOMNode $root, $element, $parent = null, $dataNode ) + { + $elementTag = $this->xml->createElement( $element ); + $root->appendChild( $elementTag ); + + $subElement = $parent; + + if ( $parent !== null ) + { + $subElement = $element; + $element = $parent; + } + + $attributes = array(); + $required = $this->schema->getRequiredAttributes( $element, $subElement ); + + foreach ( $this->schema->getAttributes( $element, $subElement ) as $attribute => $type ) + { + if ( isset( $dataNode->$attribute ) ) + { + $val = $dataNode->$attribute; + if ( $attribute === 'type' ) + { + switch ( $val ) + { + case 'html': + $dataNode->set( htmlspecialchars( $dataNode ) ); + $this->addAttribute( $elementTag, 'type', $val ); + break; + + case 'xhtml': + $this->addAttribute( $elementTag, 'type', $val ); + $this->addAttribute( $elementTag, 'xmlns:xhtml', 'http://www.w3.org/1999/xhtml' ); + $xhtmlTag = $this->xml->createElement( 'xhtml:div', $dataNode->__toString() ); + $elementTag->appendChild( $xhtmlTag ); + $elementTag = $xhtmlTag; + break; + + case 'text': + $this->addAttribute( $elementTag, 'type', $val ); + break; + + default: + if ( substr_compare( $val, '+xml', -4, 4, true ) === 0 + || substr_compare( $val, '/xml', -4, 4, true ) === 0 ) + { + // @todo: implement to assign the text in $dataNode as an XML node into $elementTag + $this->addAttribute( $elementTag, 'type', $val ); + } + else if ( substr_compare( $val, 'text/', 0, 5, true ) === 0 ) + { + $dataNode->set( htmlspecialchars( $dataNode ) ); + $this->addAttribute( $elementTag, 'type', $val ); + break; + } + else if ( $val !== null ) + { + // @todo: make 76 and "\n" options? + $dataNode->set( chunk_split( base64_encode( $dataNode ), 76, "\n" ) ); + $this->addAttribute( $elementTag, 'type', $val ); + } + else + { + $val = 'text'; + $this->addAttribute( $elementTag, 'type', $val ); + } + break; + + } + } + else + { + $this->addAttribute( $elementTag, $attribute, $val ); + } + } + else if ( in_array( $attribute, $required ) ) + { + throw new ezcFeedRequiredMetaDataMissingException( $attribute ); + } + } + + if ( !$this->schema->isEmpty( $element, $subElement ) ) + { + $elementTag->nodeValue = $dataNode; + } + } + + /** * Creates an XML person node in the XML document being generated. * * @param DOMNode $root The root in which to create the node $element @@ -557,6 +653,16 @@ } $this->generateNode( $entryTag, $element, $parent, $dataNode ); + break; + + case 'content': + $dataNode = $data; + if ( is_array( $data ) ) + { + $dataNode = $data[0]; + } + + $this->generateContentNode( $entryTag, $element, $parent, $dataNode ); break; case 'author': Added: trunk/Feed/tests/atom/regression/generate/entry/content/content_empty.in ============================================================================== --- trunk/Feed/tests/atom/regression/generate/entry/content/content_empty.in (added) +++ trunk/Feed/tests/atom/regression/generate/entry/content/content_empty.in [iso-8859-1] Fri Nov 16 13:16:50 2007 @@ -1,0 +1,10 @@ +<?php +return array( 'id' => 'Feed id', + 'title' => array( array( '#' => 'Feed title' ) ), + 'updated' => 'Feed updated', + 'author' => array( array( 'name' => 'Author name' ) ), + 'item' => array( array( 'id' => 'Entry id', + 'title' => array( array( '#' => 'Entry title' ) ), + 'updated' => 'Entry updated', + 'content' => array( array() ) ) ) ); +?> Added: trunk/Feed/tests/atom/regression/generate/entry/content/content_empty.out ============================================================================== --- trunk/Feed/tests/atom/regression/generate/entry/content/content_empty.out (added) +++ trunk/Feed/tests/atom/regression/generate/entry/content/content_empty.out [iso-8859-1] Fri Nov 16 13:16:50 2007 @@ -1,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<feed xmlns="http://www.w3.org/2005/Atom"> + <id>Feed id</id> + <title>Feed title</title> + <updated>XXX</updated> + <author> + <name>Author name</name> + </author> + <entry> + <id>Entry id</id> + <title>Entry title</title> + <updated>XXX</updated> + <content></content> + </entry> +</feed> Added: trunk/Feed/tests/atom/regression/generate/entry/content/content_empty_src.in ============================================================================== --- trunk/Feed/tests/atom/regression/generate/entry/content/content_empty_src.in (added) +++ trunk/Feed/tests/atom/regression/generate/entry/content/content_empty_src.in [iso-8859-1] Fri Nov 16 13:16:50 2007 @@ -1,0 +1,10 @@ +<?php +return array( 'id' => 'Feed id', + 'title' => array( array( '#' => 'Feed title' ) ), + 'updated' => 'Feed updated', + 'author' => array( array( 'name' => 'Author name' ) ), + 'item' => array( array( 'id' => 'Entry id', + 'title' => array( array( '#' => 'Entry title' ) ), + 'updated' => 'Entry updated', + 'content' => array( array( 'src' => 'http://ezcomponents.org/files/downloads/ezcomponents-1.0.zip' ) ) ) ) ); +?> Added: trunk/Feed/tests/atom/regression/generate/entry/content/content_empty_src.out ============================================================================== --- trunk/Feed/tests/atom/regression/generate/entry/content/content_empty_src.out (added) +++ trunk/Feed/tests/atom/regression/generate/entry/content/content_empty_src.out [iso-8859-1] Fri Nov 16 13:16:50 2007 @@ -1,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<feed xmlns="http://www.w3.org/2005/Atom"> + <id>Feed id</id> + <title>Feed title</title> + <updated>XXX</updated> + <author> + <name>Author name</name> + </author> + <entry> + <id>Entry id</id> + <title>Entry title</title> + <updated>XXX</updated> + <content src="http://ezcomponents.org/files/downloads/ezcomponents-1.0.zip"></content> + </entry> +</feed> Added: trunk/Feed/tests/atom/regression/generate/entry/content/content_src_type_zip.in ============================================================================== --- trunk/Feed/tests/atom/regression/generate/entry/content/content_src_type_zip.in (added) +++ trunk/Feed/tests/atom/regression/generate/entry/content/content_src_type_zip.in [iso-8859-1] Fri Nov 16 13:16:50 2007 @@ -1,0 +1,11 @@ +<?php +return array( 'id' => 'Feed id', + 'title' => array( array( '#' => 'Feed title' ) ), + 'updated' => 'Feed updated', + 'author' => array( array( 'name' => 'Author name' ) ), + 'item' => array( array( 'id' => 'Entry id', + 'title' => array( array( '#' => 'Entry title' ) ), + 'updated' => 'Entry updated', + 'content' => array( array( 'src' => 'http://ezcomponents.org/files/downloads/ezcomponents-1.0.zip', + 'type' => 'application/x-zip' ) ) ) ) ); +?> Added: trunk/Feed/tests/atom/regression/generate/entry/content/content_src_type_zip.out ============================================================================== --- trunk/Feed/tests/atom/regression/generate/entry/content/content_src_type_zip.out (added) +++ trunk/Feed/tests/atom/regression/generate/entry/content/content_src_type_zip.out [iso-8859-1] Fri Nov 16 13:16:50 2007 @@ -1,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<feed xmlns="http://www.w3.org/2005/Atom"> + <id>Feed id</id> + <title>Feed title</title> + <updated>XXX</updated> + <author> + <name>Author name</name> + </author> + <entry> + <id>Entry id</id> + <title>Entry title</title> + <updated>XXX</updated> + <content type="application/x-zip" src="http://ezcomponents.org/files/downloads/ezcomponents-1.0.zip"> +</content> + </entry> +</feed> Added: trunk/Feed/tests/atom/regression/generate/entry/content/content_type_absent.in ============================================================================== --- trunk/Feed/tests/atom/regression/generate/entry/content/content_type_absent.in (added) +++ trunk/Feed/tests/atom/regression/generate/entry/content/content_type_absent.in [iso-8859-1] Fri Nov 16 13:16:50 2007 @@ -1,0 +1,10 @@ +<?php +return array( 'id' => 'Feed id', + 'title' => array( array( '#' => 'Feed title' ) ), + 'updated' => 'Feed updated', + 'author' => array( array( 'name' => 'Author name' ) ), + 'item' => array( array( 'id' => 'Entry id', + 'title' => array( array( '#' => 'Entry title' ) ), + 'updated' => 'Entry updated', + 'content' => array( array( '#' => 'Entry content' ) ) ) ) ); +?> Added: trunk/Feed/tests/atom/regression/generate/entry/content/content_type_absent.out ============================================================================== --- trunk/Feed/tests/atom/regression/generate/entry/content/content_type_absent.out (added) +++ trunk/Feed/tests/atom/regression/generate/entry/content/content_type_absent.out [iso-8859-1] Fri Nov 16 13:16:50 2007 @@ -1,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<feed xmlns="http://www.w3.org/2005/Atom"> + <id>Feed id</id> + <title>Feed title</title> + <updated>XXX</updated> + <author> + <name>Author name</name> + </author> + <entry> + <id>Entry id</id> + <title>Entry title</title> + <updated>XXX</updated> + <content>Entry content</content> + </entry> +</feed> Added: trunk/Feed/tests/atom/regression/generate/entry/content/content_type_html.in ============================================================================== --- trunk/Feed/tests/atom/regression/generate/entry/content/content_type_html.in (added) +++ trunk/Feed/tests/atom/regression/generate/entry/content/content_type_html.in [iso-8859-1] Fri Nov 16 13:16:50 2007 @@ -1,0 +1,11 @@ +<?php +return array( 'id' => 'Feed id', + 'title' => array( array( '#' => 'Feed title' ) ), + 'updated' => 'Feed updated', + 'author' => array( array( 'name' => 'Author name' ) ), + 'item' => array( array( 'id' => 'Entry id', + 'title' => array( array( '#' => 'Entry title' ) ), + 'updated' => 'Entry updated', + 'content' => array( array( '#' => 'Entry content', + 'type' => 'html' ) ) ) ) ); +?> Added: trunk/Feed/tests/atom/regression/generate/entry/content/content_type_html.out ============================================================================== --- trunk/Feed/tests/atom/regression/generate/entry/content/content_type_html.out (added) +++ trunk/Feed/tests/atom/regression/generate/entry/content/content_type_html.out [iso-8859-1] Fri Nov 16 13:16:50 2007 @@ -1,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<feed xmlns="http://www.w3.org/2005/Atom"> + <id>Feed id</id> + <title>Feed title</title> + <updated>XXX</updated> + <author> + <name>Author name</name> + </author> + <entry> + <id>Entry id</id> + <title>Entry title</title> + <updated>XXX</updated> + <content type="html">Entry content</content> + </entry> +</feed> Added: trunk/Feed/tests/atom/regression/generate/entry/content/content_type_png.in ============================================================================== --- trunk/Feed/tests/atom/regression/generate/entry/content/content_type_png.in (added) +++ trunk/Feed/tests/atom/regression/generate/entry/content/content_type_png.in [iso-8859-1] Fri Nov 16 13:16:50 2007 @@ -1,0 +1,11 @@ +<?php +return array( 'id' => 'Feed id', + 'title' => array( array( '#' => 'Feed title' ) ), + 'updated' => 'Feed updated', + 'author' => array( array( 'name' => 'Author name' ) ), + 'item' => array( array( 'id' => 'Entry id', + 'title' => array( array( '#' => 'Entry title' ) ), + 'updated' => 'Entry updated', + 'content' => array( array( '#' => file_get_contents( dirname( __FILE__ ) . DIRECTORY_SEPARATOR . 'powered-by-141x32-white.png' ), + 'type' => 'image/png' ) ) ) ) ); +?> Added: trunk/Feed/tests/atom/regression/generate/entry/content/content_type_png.out ============================================================================== --- trunk/Feed/tests/atom/regression/generate/entry/content/content_type_png.out (added) +++ trunk/Feed/tests/atom/regression/generate/entry/content/content_type_png.out [iso-8859-1] Fri Nov 16 13:16:50 2007 @@ -1,0 +1,82 @@ +<?xml version="1.0" encoding="utf-8"?> +<feed xmlns="http://www.w3.org/2005/Atom"> + <id>Feed id</id> + <title>Feed title</title> + <updated>XXX</updated> + <author> + <name>Author name</name> + </author> + <entry> + <id>Entry id</id> + <title>Entry title</title> + <updated>XXX</updated> + <content type="image/png">iVBORw0KGgoAAAANSUhEUgAAAI0AAAAgCAYAAAAv3PuVAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz +AAAG6AAABugB4Yi/JwAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAA4zSURB +VHic7Zx5UJRXtsB/3YCACIJhERTS0qIIcQE7IEEWJQLiMAHX4G6W0TjxPTVl8mQ0UWtMJJvmJVMy +2cRSY0jElIAGkEQEUUkTYoCnGEBAFhHZDcra9/3Bo8dOd6OOM8G88Kv6qvjuOd+5p2+f795zl0YC +CAYZ5D4wBBBiMG4GuTckEgnSgXZikN8eg0EzyH0zGDSD3DeGA1VxaWkpRUVFAFhaWuLj44NU+nDE +cEtLC5cvX8bLy0tLlpWVxeOPP46JickAePbgfJOey82bbTplvr6TsLG1uquNAQuaXbt2kZ+fj4OD +Azdv3qShoYGYmBiCg4MHyiU1n332GTk5OTqDZuPGjXz88cdMnjx5ADx7MH78sZi/7/1Kr/zSxQo2 +/2X5Xe0MWNBIJBLmzZvHyy+/DMC2bdtITk4mODiY6upqjh49ilQqZcGCBdja2pKdnY21tTXjx4+n +srISExMTbGxsOHv2LJaWlri5udHV1cXhw4dpa2tj2bJlDBs2DIAzZ86Ql5dHQEAAkydPprm5mUOH +DmFlZcXixYvVPpWWlnLs2DHy8vIwNNTdNEIIUlJSyMjIYOHChdjb23PlyhXKy8uZOXMmAPv37ycq +KoohQ4b8m1vx3unp6WHfx8nYjRzBu3v+EyMjzc+XlHiGA/u/Ju/7y3hOHd+vrYdiPLhx4walpaVY +Wlo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d7d6E/JOOjo68PPzo729HZlMRnV1tZZOTU0N48f3fzjoXiksLMTe3h4A +GxsbdQD1UV5ejrm5+T3ZkslkyOVyjTZSKpVMmTIFV1fXe7IxYsQI6urqNMqEEJw7d46kpCQKCwsp +KCigoKAANzc3Dh06dE92+zAyMmTlqjlUVNSSmpKjU6ejo5MD+7/GZZwj/gEeOnX66LeniYiIIDo6 +mtjYWHVOc/36dfWBo7lz53L79m0uXrxIZGSkxrP+/v5s2LBBfW9sbExgYCA+Pj44OjreOTZSWVnJ +1KlTMTExITQ0lJiYGJ544gl1MlpbW8vw4cPx9vYmKytLa0r4y/tflu3du5f4+HigN6epqKhg9erV +ADz11FOsW7eO7OxszM3NUalUlJeXM3fuXLWd/uyHhoaya9cuDX/r6uowMzPD2dmZmpoavc/3lc+f +P58FCxZQXFzMiBEj6OnpYevWrchkMoKCgnB2dkYqldLW1kZVVZXenqY/pipc8fAczxefp/PooyO1 +DmJlZV6gqekmm15Z0m+yDPewjdDZ2cnp06fp7OzEzMwMPz8/DAwMAEhLS6OrS3fiJZfLdb5pjY2N +nD9/XqMhp02bxiOPPKKhd+fB88cee4xHH30U6B0OCwsL8fb+R5KWm5uLXC7HyspKXUdFRQUeHh5E +RkYybtw4dWJuZGREQECAenZFbwOQk5NDQ0MDBgYG+Pn5YWZmBvQmvT09PVqzpbNnz+Lp6ak+fnGn +v+7u7shkMr3+AhQXF2NsbKxO3lUqFVlZWTQ2NgK9u/EWFhY0NTVx/vx5VCoVVlZWeHl5/dOnAmtr +G3hp/X/T1dWtUz4zSMGatZE6ZX1IJJL//3tP4eHhLFmyhKeffnqgXXkoKC2p4ubNWzplLi6OmOmZ +Zvfxuwia8vJybGxs1D3HIA/G7yJoBvnXMvhb7kH+KSQM/quRQe6T/wVxbgvu8Q7LOgAAAABJRU5E +rkJggg== +</content> + </entry> +</feed> Added: trunk/Feed/tests/atom/regression/generate/entry/content/content_type_text.in ============================================================================== --- trunk/Feed/tests/atom/regression/generate/entry/content/content_type_text.in (added) +++ trunk/Feed/tests/atom/regression/generate/entry/content/content_type_text.in [iso-8859-1] Fri Nov 16 13:16:50 2007 @@ -1,0 +1,11 @@ +<?php +return array( 'id' => 'Feed id', + 'title' => array( array( '#' => 'Feed title' ) ), + 'updated' => 'Feed updated', + 'author' => array( array( 'name' => 'Author name' ) ), + 'item' => array( array( 'id' => 'Entry id', + 'title' => array( array( '#' => 'Entry title' ) ), + 'updated' => 'Entry updated', + 'content' => array( array( '#' => 'Entry content', + 'type' => 'text' ) ) ) ) ); +?> Added: trunk/Feed/tests/atom/regression/generate/entry/content/content_type_text.out ============================================================================== --- trunk/Feed/tests/atom/regression/generate/entry/content/content_type_text.out (added) +++ trunk/Feed/tests/atom/regression/generate/entry/content/content_type_text.out [iso-8859-1] Fri Nov 16 13:16:50 2007 @@ -1,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<feed xmlns="http://www.w3.org/2005/Atom"> + <id>Feed id</id> + <title>Feed title</title> + <updated>XXX</updated> + <author> + <name>Author name</name> + </author> + <entry> + <id>Entry id</id> + <title>Entry title</title> + <updated>XXX</updated> + <content type="text">Entry content</content> + </entry> +</feed> Added: trunk/Feed/tests/atom/regression/generate/entry/content/content_type_text_other.in ============================================================================== --- trunk/Feed/tests/atom/regression/generate/entry/content/content_type_text_other.in (added) +++ trunk/Feed/tests/atom/regression/generate/entry/content/content_type_text_other.in [iso-8859-1] Fri Nov 16 13:16:50 2007 @@ -1,0 +1,29 @@ +<?php +return array( 'id' => 'Feed id', + 'title' => array( array( '#' => 'Feed title' ) ), + 'updated' => 'Feed updated', + 'author' => array( array( 'name' => 'Author name' ) ), + 'item' => array( array( 'id' => 'Entry id', + 'title' => array( array( '#' => 'Entry title' ) ), + 'updated' => 'Entry updated', + 'content' => array( array( '#' => ' +\documentclass[12pt]{article} +\title{\LaTeX} +\date{} +\begin{document} + \maketitle \LaTeX{} is a document preparation system for the \TeX{} + typesetting program. It offers programmable desktop publishing + features and extensive facilities for automating most aspects of + typesetting and desktop publishing, including numbering and + cross-referencing, tables and figures, page layout, bibliographies, + and much more. \LaTeX{} was originally written in 1984 by Leslie + Lamport and has become the dominant method for using \TeX; few + people write in plain \TeX{} anymore. The current version is + \LaTeXe. + \newline + % This is a comment, it is not shown in the final output. + % The following shows a little of the typesetting power of LaTeX +\end{document} +', + 'type' => 'text/x-tex' ) ) ) ) ); +?> Added: trunk/Feed/tests/atom/regression/generate/entry/content/content_type_text_other.out ============================================================================== --- trunk/Feed/tests/atom/regression/generate/entry/content/content_type_text_other.out (added) +++ trunk/Feed/tests/atom/regression/generate/entry/content/content_type_text_other.out [iso-8859-1] Fri Nov 16 13:16:50 2007 @@ -1,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8"?> +<feed xmlns="http://www.w3.org/2005/Atom"> + <id>Feed id</id> + <title>Feed title</title> + <updated>XXX</updated> + <author> + <name>Author name</name> + </author> + <entry> + <id>Entry id</id> + <title>Entry title</title> + <updated>XXX</updated> + <content type="text/x-tex"> +\documentclass[12pt]{article} +\title{\LaTeX} +\date{} +\begin{document} + \maketitle \LaTeX{} is a document preparation system for the \TeX{} + typesetting program. It offers programmable desktop publishing + features and extensive facilities for automating most aspects of + typesetting and desktop publishing, including numbering and + cross-referencing, tables and figures, page layout, bibliographies, + and much more. \LaTeX{} was originally written in 1984 by Leslie + Lamport and has become the dominant method for using \TeX; few + people write in plain \TeX{} anymore. The current version is + \LaTeXe. + \newline + % This is a comment, it is not shown in the final output. + % The following shows a little of the typesetting power of LaTeX +\end{document} +</content> + </entry> +</feed> Added: trunk/Feed/tests/atom/regression/generate/entry/content/content_type_xhtml.in ============================================================================== --- trunk/Feed/tests/atom/regression/generate/entry/content/content_type_xhtml.in (added) +++ trunk/Feed/tests/atom/regression/generate/entry/content/content_type_xhtml.in [iso-8859-1] Fri Nov 16 13:16:50 2007 @@ -1,0 +1,11 @@ +<?php +return array( 'id' => 'Feed id', + 'title' => array( array( '#' => 'Feed title' ) ), + 'updated' => 'Feed updated', + 'author' => array( array( 'name' => 'Author name' ) ), + 'item' => array( array( 'id' => 'Entry id', + 'title' => array( array( '#' => 'Entry title' ) ), + 'updated' => 'Entry updated', + 'content' => array( array( '#' => 'Entry content', + 'type' => 'xhtml' ) ) ) ) ); +?> Added: trunk/Feed/tests/atom/regression/generate/entry/content/content_type_xhtml.out ============================================================================== --- trunk/Feed/tests/atom/regression/generate/entry/content/content_type_xhtml.out (added) +++ trunk/Feed/tests/atom/regression/generate/entry/content/content_type_xhtml.out [iso-8859-1] Fri Nov 16 13:16:50 2007 @@ -1,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<feed xmlns="http://www.w3.org/2005/Atom"> + <id>Feed id</id> + <title>Feed title</title> + <updated>XXX</updated> + <author> + <name>Author name</name> + </author> + <entry> + <id>Entry id</id> + <title>Entry title</title> + <updated>XXX</updated> + <content type="xhtml" xmlns:xhtml="http://www.w3.org/1999/xhtml"> + <xhtml:div>Entry content</xhtml:div> + </content> + </entry> +</feed> Added: trunk/Feed/tests/atom/regression/generate/entry/content/powered-by-141x32-white.png ============================================================================== Binary file - no diff available. Propchange: trunk/Feed/tests/atom/regression/generate/entry/content/powered-by-141x32-white.png ------------------------------------------------------------------------------ svn:mime-type = image/png -- svn-components mailing list svn-components@lists.ez.no http://lists.ez.no/mailman/listinfo/svn-components