[svn-components] 6639 - in /trunk/Feed: src/processors/ tests/ tests/rss2/regression/generate/item/category/ tests/rss2/regression/parse/item/category/

2007-10-31 Thread Alexandru Stanoi
Author: as
Date: Wed Oct 31 10:28:20 2007
New Revision: 6639

Log:
- Added support for multiple 'item/category' in RSS2 feeds.

Added:
trunk/Feed/tests/rss2/regression/generate/item/category/
trunk/Feed/tests/rss2/regression/generate/item/category/category.in
trunk/Feed/tests/rss2/regression/generate/item/category/category.out
trunk/Feed/tests/rss2/regression/generate/item/category/category_domain.in
trunk/Feed/tests/rss2/regression/generate/item/category/category_domain.out
trunk/Feed/tests/rss2/regression/generate/item/category/category_empty.in
trunk/Feed/tests/rss2/regression/generate/item/category/category_empty.out
trunk/Feed/tests/rss2/regression/generate/item/category/category_multiple.in

trunk/Feed/tests/rss2/regression/generate/item/category/category_multiple.out
trunk/Feed/tests/rss2/regression/parse/item/category/
trunk/Feed/tests/rss2/regression/parse/item/category/category.in
trunk/Feed/tests/rss2/regression/parse/item/category/category.out
trunk/Feed/tests/rss2/regression/parse/item/category/category_domain.in
trunk/Feed/tests/rss2/regression/parse/item/category/category_domain.out
trunk/Feed/tests/rss2/regression/parse/item/category/category_empty.in
trunk/Feed/tests/rss2/regression/parse/item/category/category_empty.out
trunk/Feed/tests/rss2/regression/parse/item/category/category_multiple.in
trunk/Feed/tests/rss2/regression/parse/item/category/category_multiple.out
Modified:
trunk/Feed/src/processors/rss2.php
trunk/Feed/tests/regression_test.php

Modified: trunk/Feed/src/processors/rss2.php
==
--- trunk/Feed/src/processors/rss2.php [iso-8859-1] (original)
+++ trunk/Feed/src/processors/rss2.php [iso-8859-1] Wed Oct 31 10:28:20 2007
@@ -92,7 +92,10 @@
  'description'  = array( 
'#' = 'string' ),
 
  'author'   = array( 
'#' = 'string' ),
- 'category' = array( 
'#' = 'string' ),
+ 'category' = array( 
'#' = 'string',
+  
'ATTRIBUTES' = array( 'domain' = 'string' ),
+  
'MULTI' = 'categories' ),
+
  'comments' = array( 
'#' = 'string' ),
  'enclosure'= array( 
'#' = 'none',
   
'ATTRIBUTES' = array( 'url'= 'string',
@@ -421,7 +424,7 @@
 {
 $normalizedAttribute = ezcFeedTools::normalizeName( 
$attribute, $this-schema-getItemsMap() );
 
-$metaData = $this-schema-isMulti( 'item', $attribute ) ? 
$this-get( $this-schema-getMulti( 'item', $attribute ), $attribute ) : 
$item-$attribute;
+$metaData = $item-$attribute;
 
 if ( !is_null( $metaData ) )
 {
@@ -439,6 +442,29 @@
 // $permaLink = substr( 
$metaData[0]-__toString(), 0, 7 ) === 'http://' ? true : false;
 
 $this-generateMetaDataWithAttributes( $itemTag, 
$normalizedAttribute, $metaData, $attributes );
+break;
+
+case 'category':
+foreach ( $metaData as $dataNode )
+{
+$attributes = array();
+foreach ( $this-schema-getAttributes( 
'item', $attribute ) as $key = $type )
+{
+if ( isset( $dataNode-$key ) )
+{
+$attributes[$key] = $dataNode-$key;
+}
+}
+
+if ( count( $attributes ) = 1 )
+{
+$this-generateMetaDataWithAttributes( 
$itemTag, $normalizedAttribute, $dataNode, $attributes );
+}
+else
+{
+$this-generateMetaData( $itemTag, 
$normalizedAttribute, $dataNode );
+}
+}
 break;
 
 case 'pubDate':

Modified: trunk/Feed/tests/regression_test.php
==
--- trunk/Feed/tests/regression_test.php [iso-8859-1] (original)
+++ trunk/Feed/tests/regression_test.php [iso-8859-1] Wed Oct 31 10:28:20 2007
@@ -138,7 

[svn-components] 6640 - in /trunk/Feed: src/processors/rss2.php tests/rss2/regression/generate/item/item_empty.out tests/rss2/regression/generate/item/item_link.out

2007-10-31 Thread Alexandru Stanoi
Author: as
Date: Wed Oct 31 10:51:47 2007
New Revision: 6640

Log:
- The 'item/link' is not required in RSS2 feeds.

Modified:
trunk/Feed/src/processors/rss2.php
trunk/Feed/tests/rss2/regression/generate/item/item_empty.out
trunk/Feed/tests/rss2/regression/generate/item/item_link.out

Modified: trunk/Feed/src/processors/rss2.php
==
--- trunk/Feed/src/processors/rss2.php [iso-8859-1] (original)
+++ trunk/Feed/src/processors/rss2.php [iso-8859-1] Wed Oct 31 10:51:47 2007
@@ -110,7 +110,7 @@
  'pubDate'  = array( 
'#' = 'string' ),
  'source'   = array( 
'#' = 'string' ),
 
- 'AT_LEAST_ONE' = array( 
'title', 'link', 'description' ),
+ 'AT_LEAST_ONE' = array( 
'title', 'description' ),
  'OPTIONAL' = array( 
'title', 'link', 'description',
   
'author', 'category', 'comments',
   
'enclosure', 'guid', 'pubDate',

Modified: trunk/Feed/tests/rss2/regression/generate/item/item_empty.out
==
--- trunk/Feed/tests/rss2/regression/generate/item/item_empty.out [iso-8859-1] 
(original)
+++ trunk/Feed/tests/rss2/regression/generate/item/item_empty.out [iso-8859-1] 
Wed Oct 31 10:51:47 2007
@@ -1,1 +1,1 @@
-At least one of these attributes is required: title, link, description.
+At least one of these attributes is required: title, description.

Modified: trunk/Feed/tests/rss2/regression/generate/item/item_link.out
==
--- trunk/Feed/tests/rss2/regression/generate/item/item_link.out [iso-8859-1] 
(original)
+++ trunk/Feed/tests/rss2/regression/generate/item/item_link.out [iso-8859-1] 
Wed Oct 31 10:51:47 2007
@@ -1,14 +1,1 @@
-?xml version=1.0 encoding=utf-8?
-rss version=2.0
-  channel
-titleFeed title/title
-linkFeed link/link
-descriptionFeed description/description
-pubDateXXX/pubDate
-generatoreZ Components/generator
-docshttp://www.rssboard.org/rss-specification/docs
-item
-  linkItem link/link
-/item
-  /channel
-/rss
+At least one of these attributes is required: title, description.


-- 
svn-components mailing list
svn-components@lists.ez.no
http://lists.ez.no/mailman/listinfo/svn-components


[svn-components] 6641 - in /trunk/Feed: src/processors/ tests/rss2/regression/generate/item/source/ tests/rss2/regression/parse/item/source/

2007-10-31 Thread Alexandru Stanoi
Author: as
Date: Wed Oct 31 11:14:06 2007
New Revision: 6641

Log:
- Added support for 'item/source' RSS2 feed element.

Added:
trunk/Feed/tests/rss2/regression/generate/item/source/
trunk/Feed/tests/rss2/regression/generate/item/source/source.in
trunk/Feed/tests/rss2/regression/generate/item/source/source.out
trunk/Feed/tests/rss2/regression/generate/item/source/source_empty.in
trunk/Feed/tests/rss2/regression/generate/item/source/source_empty.out
trunk/Feed/tests/rss2/regression/generate/item/source/source_url.in
trunk/Feed/tests/rss2/regression/generate/item/source/source_url.out
trunk/Feed/tests/rss2/regression/parse/item/source/
trunk/Feed/tests/rss2/regression/parse/item/source/source.in
trunk/Feed/tests/rss2/regression/parse/item/source/source.out
trunk/Feed/tests/rss2/regression/parse/item/source/source_empty.in
trunk/Feed/tests/rss2/regression/parse/item/source/source_empty.out
trunk/Feed/tests/rss2/regression/parse/item/source/source_url.in
trunk/Feed/tests/rss2/regression/parse/item/source/source_url.out
Modified:
trunk/Feed/src/processors/rss2.php

Modified: trunk/Feed/src/processors/rss2.php
==
--- trunk/Feed/src/processors/rss2.php [iso-8859-1] (original)
+++ trunk/Feed/src/processors/rss2.php [iso-8859-1] Wed Oct 31 11:14:06 2007
@@ -108,7 +108,8 @@
   
'ATTRIBUTES' = array( 'isPermaLink' = 'string' ) ),
 
  'pubDate'  = array( 
'#' = 'string' ),
- 'source'   = array( 
'#' = 'string' ),
+ 'source'   = array( 
'#' = 'string',
+  
'ATTRIBUTES' = array( 'url' = 'string' ) ),
 
  'AT_LEAST_ONE' = array( 
'title', 'description' ),
  'OPTIONAL' = array( 
'title', 'link', 'description',
@@ -493,6 +494,20 @@
 }
 }
 
+break;
+
+case 'source':
+if ( is_array( $metaData ) )
+{
+$metaData = $metaData[0];
+}
+
+if ( !isset( $metaData-url ) )
+{
+throw new 
ezcFeedRequiredMetaDataMissingException( 'item/source/url' );
+}
+$attributes = array( 'url' = $metaData-url );
+$this-generateMetaDataWithAttributes( $itemTag, 
$normalizedAttribute, $metaData, $attributes );
 break;
 
 default:

Added: trunk/Feed/tests/rss2/regression/generate/item/source/source.in
==
--- trunk/Feed/tests/rss2/regression/generate/item/source/source.in (added)
+++ trunk/Feed/tests/rss2/regression/generate/item/source/source.in 
[iso-8859-1] Wed Oct 31 11:14:06 2007
@@ -1,0 +1,10 @@
+?php
+return array( 'title' = 'Feed title',
+  'link'  = array( 'Feed link' ),
+  'description' = 'Feed description',
+ 'item' = array( array( 'title' = 'Item title',
+  'link' = 'Item link',
+  'description' = 'Item description',
+  'source' = 'Item source' ), ),
+);
+?

Added: trunk/Feed/tests/rss2/regression/generate/item/source/source.out
==
--- trunk/Feed/tests/rss2/regression/generate/item/source/source.out (added)
+++ trunk/Feed/tests/rss2/regression/generate/item/source/source.out 
[iso-8859-1] Wed Oct 31 11:14:06 2007
@@ -1,0 +1,1 @@
+There was no data submitted for required channel attribute 'item/source/url'.

Added: trunk/Feed/tests/rss2/regression/generate/item/source/source_empty.in
==
--- trunk/Feed/tests/rss2/regression/generate/item/source/source_empty.in 
(added)
+++ trunk/Feed/tests/rss2/regression/generate/item/source/source_empty.in 
[iso-8859-1] Wed Oct 31 11:14:06 2007
@@ -1,0 +1,10 @@
+?php
+return array( 'title' = 'Feed title',
+  'link'  = array( 'Feed link' ),
+  'description' = 'Feed description',
+ 'item' = array( array( 'title' = 'Item title',
+  'link' = 'Item link',
+  'description' = 'Item description',
+ 

[svn-components] 6646 - /docs/logos.txt

2007-10-31 Thread Derick Rethans
Author: dr
Date: Wed Oct 31 21:00:51 2007
New Revision: 6646

Log:
- Update the logos file
#- This should be moved to the other repository, among some other files.

Modified:
docs/logos.txt

Modified: docs/logos.txt
==
--- docs/logos.txt [iso-8859-1] (original)
+++ docs/logos.txt [iso-8859-1] Wed Oct 31 21:00:51 2007
@@ -67,25 +67,29 @@
 Powered by logos
 --
 
-=== 

-Example Download
-=== 

-.. image:: /images/logos/powered-by-130x16-white.pngPNG__
 

-.. image:: /images/logos/powered-by-130x16-indigo.png   PNG__
 

-.. image:: /images/logos/powered-by-211x16-white.pngPNG__
 

-.. image:: /images/logos/powered-by-211x16-indigo.png   PNG__
 

-.. image:: /images/logos/powered-by-141x32-white.pngPNG__
 

-.. image:: /images/logos/powered-by-141x32-indigo.png   PNG__
-=== 

+=== 

+Example Download
+=== 

+.. image:: /images/logos/powered-by-130x16-white.pngPNG__
+--- 

+.. image:: /images/logos/powered-by-130x16-indigo.png   PNG__
+--- 

+.. image:: /images/logos/powered-by-211x16-white.pngPNG__
+--- 

+.. image:: /images/logos/powered-by-211x16-transparent.png  PNG__ GIF__
+--- 

+.. image:: /images/logos/powered-by-211x16-indigo.png   PNG__
+--- 

+.. image:: /images/logos/powered-by-141x32-white.pngPNG__
+--- 

+.. image:: /images/logos/powered-by-141x32-indigo.png   PNG__
+=== 

 
 __ /images/logos/powered-by-130x16-white.png
 __ /images/logos/powered-by-130x16-indigo.png
 __ /images/logos/powered-by-211x16-white.png
+__ /images/logos/powered-by-211x16-transparent.png
+__ /images/logos/powered-by-211x16-transparent.gif
 __ /images/logos/powered-by-211x16-indigo.png
 __ /images/logos/powered-by-141x32-white.png
 __ /images/logos/powered-by-141x32-indigo.png


-- 
svn-components mailing list
svn-components@lists.ez.no
http://lists.ez.no/mailman/listinfo/svn-components


[svn-components] 6647 - in /experimental/Document: docs/ src/converters/ tests/ tests/files/

2007-10-31 Thread Kirill Subbotin
Author: ks
Date: Wed Oct 31 21:53:46 2007
New Revision: 6647

Log:
- More xhtml - docbook tests.
- Minor xsl fixes.
- Made html2docbook.php example a command-line utility.

Added:
experimental/Document/tests/files/docbook_sample_basic.xml
experimental/Document/tests/files/docbook_sample_lists.xml
experimental/Document/tests/files/docbook_sample_tables.xml
experimental/Document/tests/files/xhtml_sample_basic.xml
experimental/Document/tests/files/xhtml_sample_lists.xml
experimental/Document/tests/files/xhtml_sample_tables.xml
Modified:
experimental/Document/docs/html2docbook.php
experimental/Document/docs/html2docbook_static.php
experimental/Document/src/converters/xhtml_docbook.xsl
experimental/Document/tests/convert_xhtml_test.php
experimental/Document/tests/document_basic_test.php

Modified: experimental/Document/docs/html2docbook.php
==
--- experimental/Document/docs/html2docbook.php [iso-8859-1] (original)
+++ experimental/Document/docs/html2docbook.php [iso-8859-1] Wed Oct 31 
21:53:46 2007
@@ -1,34 +1,13 @@
 ?php
 require_once 'html2docbook_autoload.php';
 
-$xhtml = '!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
-html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
-head
-  titleTest document/title
-/head
-body
-h1Header 1/h1
-p
-Para 1
-/p
-h2Header 1.1/h2
-p
-Para 2
-/p
-ul
-   li
-   p
-   List item 1 para 1
-   /p
-   p
-   List item 1 para 2
-   /p
-   /li
-   liList item 2/li
-   liList item 2 line 1br/line 2/li
-/ul
-/body
-/html';
+if ( count( $argc )  1 || count( $argc )  2 )
+{
+  echo \nUsage: html2docbook html filename [docbook filename]\n;
+  die();
+}
+
+$xhtml = file_get_contents( $argv[1] );
 
 $docXhtml = new ezcDocumentXML( 'xhtml', $xhtml );
 
@@ -36,6 +15,9 @@
 $docDocbook = $converter-convert( $docXhtml );
 $result = $docDocbook-getXML();
 
-echo Docbook:\n . $result;
+if ( isset( $argv[2] ) )
+file_put_contents( $argv[2], $result );
+else
+echo Docbook:\n . $result;
 
 ?

Modified: experimental/Document/docs/html2docbook_static.php
==
--- experimental/Document/docs/html2docbook_static.php [iso-8859-1] (original)
+++ experimental/Document/docs/html2docbook_static.php [iso-8859-1] Wed Oct 31 
21:53:46 2007
@@ -1,43 +1,21 @@
 ?php
 require_once 'html2docbook_autoload.php';
 
-$xhtml = '!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN 
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd;
-html xmlns=http://www.w3.org/1999/xhtml; xml:lang=en lang=en
-head
-  titleTest document/title
-/head
-body
-h1Header 1/h1
-p
-Para 1
-/p
-h2Header 1.1/h2
-p
-Para 2
-/p
-ul
-   li
-   p
-   List item 1 para 1
-   /p
-   p
-   List item 1 para 2
-   /p
-   /li
-   liList item 2/li
-   liList item 2 line 1br/line 2/li
-/ul
-h1Header 2/h1
-p
-Para 3
-/p
-/body
-/html';
+if ( count( $argc )  1 || count( $argc )  2 )
+{
+  echo \nUsage: html2docbook html filename [docbook filename]\n;
+  die();
+}
+
+$xhtml = file_get_contents( $argv[1] );
 
 $docXhtml = new ezcDocumentXML( 'xhtml', $xhtml );
 $docDocbook = ezcDocumentXhtmlToDocbook::convert( $docXhtml );
 $result = $docDocbook-getXML();
 
-echo Docbook:\n . $result;
+if ( isset( $argv[2] ) )
+file_put_contents( $argv[2], $result );
+else
+echo Docbook:\n . $result;
 
 ?

Modified: experimental/Document/src/converters/xhtml_docbook.xsl
==
--- experimental/Document/src/converters/xhtml_docbook.xsl [iso-8859-1] 
(original)
+++ experimental/Document/src/converters/xhtml_docbook.xsl [iso-8859-1] Wed Oct 
31 21:53:46 2007
@@ -132,26 +132,6 @@
   /xsl:attribute
  /anchor
 /xsl:template
-
-!--xsl:template name=string.subst
- xsl:param name=string select=''/
- xsl:param name=substitute select=''/
- xsl:param name=with select=''/
- xsl:choose
-  xsl:when test=contains($string,$substitute)
-   xsl:variable name=pre select=substring-before($string,$substitute)/
-   xsl:variable name=post select=substring-after($string,$substitute)/
-   xsl:call-template name=string.subst
-xsl:with-param name=string select=concat($pre,$with,$post)/
-xsl:with-param name=substitute select=$substitute/
-xsl:with-param name=with select=$with/
-   /xsl:call-template
-  /xsl:when
-  xsl:otherwise
-   xsl:value-of select=$string/
-  /xsl:otherwise
- /xsl:choose
-/xsl:template --
 
 !-- Images --
 !-- Images and image maps --
@@ -224,6 +204,61 @@
  /xsl:choose
 /xsl:template
 
+!-- inline formatting --
+xsl:template match=html:b | html:strong
+ emphasis role=strong
+  xsl:apply-templates/
+ /emphasis
+/xsl:template
+
+xsl:template match=html:i | html:em | html:emphasize
+ emphasis
+  xsl:apply-templates/
+ /emphasis

[svn-components] 6650 - /docs/news/2007-11-01.txt

2007-10-31 Thread Derick Rethans
Author: dr
Date: Wed Oct 31 22:37:46 2007
New Revision: 6650

Log:
- Add temp news item for testing scripts.

Added:
docs/news/2007-11-01.txt   (with props)

Added: docs/news/2007-11-01.txt
==
--- docs/news/2007-11-01.txt (added)
+++ docs/news/2007-11-01.txt [iso-8859-1] Wed Oct 31 22:37:46 2007
@@ -1,0 +1,8 @@
+===
+eZ Components website launched!
+===
+
+:Author: Derick Rethans
+:Date: 2007-11-01 12:00
+
+Yay! New website.

Propchange: docs/news/2007-11-01.txt
--
svn:eol-style = native


-- 
svn-components mailing list
svn-components@lists.ez.no
http://lists.ez.no/mailman/listinfo/svn-components


[svn-components] 6651 - /docs/news/2007-11-01.txt

2007-10-31 Thread Derick Rethans
Author: dr
Date: Wed Oct 31 22:40:09 2007
New Revision: 6651

Log:
- Remove test item.

Removed:
docs/news/2007-11-01.txt

-- 
svn-components mailing list
svn-components@lists.ez.no
http://lists.ez.no/mailman/listinfo/svn-components