Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-932884-xhtml-serialization into lp:zorba

2012-08-31 Thread William Candillon
Works great on two examples that used to be buggy.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-932884-xhtml-serialization/+merge/122156
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-932884-xhtml-serialization into lp:zorba

2012-08-31 Thread Matthias Brantner
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-932884-xhtml-serialization/+merge/122156
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-932884-xhtml-serialization into lp:zorba

2012-08-31 Thread Matthias Brantner
The proposal to merge lp:~zorba-coders/zorba/bug-932884-xhtml-serialization 
into lp:zorba has been updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-932884-xhtml-serialization/+merge/122156
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-932884-xhtml-serialization/+merge/122156
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-932884-xhtml-serialization into lp:zorba

2012-08-31 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/bug-932884-xhtml-serialization-2012-08-31T14-56-55.077Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-932884-xhtml-serialization/+merge/122156
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-932884-xhtml-serialization into lp:zorba

2012-08-31 Thread Zorba Build Bot
Validation queue job bug-932884-xhtml-serialization-2012-08-31T14-56-55.077Z is 
finished. The final status was:

All tests succeeded!
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-932884-xhtml-serialization/+merge/122156
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-932884-xhtml-serialization into lp:zorba

2012-08-31 Thread noreply
The proposal to merge lp:~zorba-coders/zorba/bug-932884-xhtml-serialization 
into lp:zorba has been updated.

Status: Approved = Merged

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-932884-xhtml-serialization/+merge/122156
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-932884-xhtml-serialization/+merge/122156
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-932884-xhtml-serialization into lp:zorba

2012-08-30 Thread Chris Hillery
Chris Hillery has proposed merging 
lp:~zorba-coders/zorba/bug-932884-xhtml-serialization into lp:zorba.

Requested reviews:
  Matthias Brantner (matthias-brantner)
Related bugs:
  Bug #932884 in Zorba: empty tags in XHTML serialization
  https://bugs.launchpad.net/zorba/+bug/932884

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-932884-xhtml-serialization/+merge/122156
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-932884-xhtml-serialization/+merge/122156
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2012-08-30 15:14:16 +
+++ ChangeLog	2012-08-30 21:39:21 +
@@ -21,6 +21,7 @@
   * Fixed bug #1039488 (inserting more than one pair at once in a JSON object)
   * Fixed bug #1042840 (qname pool free-list corruption)
   * Fixed bug #866984 (better error message for an eval error)
+  * Fixed bug #932884 (HTML and XHTML serialization of empty elements)
 	
 version 2.6
 

=== modified file 'src/api/serialization/serializer.cpp'
--- src/api/serialization/serializer.cpp	2012-08-30 13:45:43 +
+++ src/api/serialization/serializer.cpp	2012-08-30 21:39:21 +
@@ -1368,28 +1368,6 @@
 
 
 /***
-  Returns true for those elements which are not allowed under HTML to have
-  empty tags (more exactly they are required to have both opening and closing
-  tags).
-/
-static bool is_html_no_empty_tags_element(const store::Item* item)
-{
-  if (item == NULL)
-return false;
-
-  zstring nodename;
-  utf8::to_lower(item-getNodeName()-getStringValue(), nodename);
-
-  if (ztd::equals(nodename, script, 6) ||
-  ztd::equals(nodename, textarea, 8) ||
-  ztd::equals(nodename, div, 3))
-return true;
-  else
-return false;
-}
-
-
-/***
 
 /
 static bool is_html_boolean_attribute(const zstring attribute)
@@ -1569,27 +1547,17 @@
 }
 else
 {
-  // The HTML 4.01 spec says that both tags (begin and end tags) are REQUIRED
-  // for script, textarea and div tags.
-  if (is_html_no_empty_tags_element(item) ||
-  (ser-include_content_type == PARAMETER_VALUE_YES 
-   strcasecmp(qname.c_str(), head) == 0))
+  // The HTML 4.01 and XQuery Serialization specs strongly imply that
+  // ALL empty elements must be serialized as either a matched open-
+  // close tag, or (only for elements with an empty content model) as
+  // an unclosed open tag.
+  if (is_html_empty_content_model_element(item))
   {
 tr  ;
-tr  /  qname  ;
   }
   else
   {
-// The HTML output method MUST NOT output an end-tag for empty elements.
-// For HTML 4.0, the empty elements are area, base, basefont, br, col,
-// frame, hr, img, input, isindex, link, meta and param. For example,
-// an element written as br/ or br/br in an XSLT stylesheet MUST
-// be output as br.
-if (is_html_empty_content_model_element(item) 
-ser-version == PARAMETER_VALUE_VERSION_4_0)
-  tr  ;
-else
-  tr  /;
+tr  /  qname  ;
   }
 }
 

=== added directory 'test/rbkt/ExpQueryResults/zorba/serialization/html'
=== added file 'test/rbkt/ExpQueryResults/zorba/serialization/html/empty-1.xml.res'
--- test/rbkt/ExpQueryResults/zorba/serialization/html/empty-1.xml.res	1970-01-01 00:00:00 +
+++ test/rbkt/ExpQueryResults/zorba/serialization/html/empty-1.xml.res	2012-08-30 21:39:21 +
@@ -0,0 +1,1 @@
+bodyareabasebrcolhrimg src=http://www.zorba-xquery.com;inputlinkmetaparam name=a value=1/body
\ No newline at end of file

=== added file 'test/rbkt/ExpQueryResults/zorba/serialization/html/empty-2.xml.res'
--- test/rbkt/ExpQueryResults/zorba/serialization/html/empty-2.xml.res	1970-01-01 00:00:00 +
+++ test/rbkt/ExpQueryResults/zorba/serialization/html/empty-2.xml.res	2012-08-30 21:39:21 +
@@ -0,0 +1,1 @@
+bodyp/ptextarea/textareatd/tdiframe/iframediv/divscript/script/body
\ No newline at end of file

=== added directory 'test/rbkt/ExpQueryResults/zorba/serialization/xhtml'
=== added file 'test/rbkt/ExpQueryResults/zorba/serialization/xhtml/empty-1.xml.res'
--- test/rbkt/ExpQueryResults/zorba/serialization/xhtml/empty-1.xml.res	1970-01-01 00:00:00 +
+++ test/rbkt/ExpQueryResults/zorba/serialization/xhtml/empty-1.xml.res	2012-08-30 21:39:21 +
@@ -0,0 +1,1 @@
+bodyarea /base /br /col /hr /img src=http://www.zorba-xquery.com; /input /link /meta /param name=a value=1 //body
\ No newline at end of file

=== added file 'test/rbkt/ExpQueryResults/zorba/serialization/xhtml/empty-2.xml.res'
--- test/rbkt/ExpQueryResults/zorba/serialization/xhtml/empty-2.xml.res	1970-01-01 00:00:00 +
+++ 

[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-932884-xhtml-serialization into lp:zorba

2012-08-30 Thread Chris Hillery
The proposal to merge lp:~zorba-coders/zorba/bug-932884-xhtml-serialization 
into lp:zorba has been updated.

Status: Needs review = Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-932884-xhtml-serialization/+merge/122156
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-932884-xhtml-serialization/+merge/122156
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-932884-xhtml-serialization into lp:zorba

2012-08-30 Thread Chris Hillery
Matthias - you initially raised the issue about iframe serialization. If you 
could confirm that this change fixes that, and ideally doesn't break anything 
else, that'd be great.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-932884-xhtml-serialization/+merge/122156
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-932884-xhtml-serialization into lp:zorba

2012-08-30 Thread Chris Hillery
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-932884-xhtml-serialization/+merge/122156
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-932884-xhtml-serialization into lp:zorba

2012-08-30 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/bug-932884-xhtml-serialization-2012-08-30T21-42-53.199Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-932884-xhtml-serialization/+merge/122156
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-932884-xhtml-serialization into lp:zorba

2012-08-30 Thread Zorba Build Bot
Validation queue job bug-932884-xhtml-serialization-2012-08-30T21-42-53.199Z is 
finished. The final status was:

All tests succeeded!
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-932884-xhtml-serialization/+merge/122156
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-932884-xhtml-serialization into lp:zorba

2012-08-30 Thread Zorba Build Bot
Voting does not meet specified criteria. Required: Approve  1, Disapprove  1, 
Needs Fixing  1, Pending  1. Got: 1 Approve, 1 Pending.
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-932884-xhtml-serialization/+merge/122156
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/bug-932884-xhtml-serialization into lp:zorba

2012-08-30 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/bug-932884-xhtml-serialization 
into lp:zorba has been updated.

Status: Approved = Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-932884-xhtml-serialization/+merge/122156
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-932884-xhtml-serialization/+merge/122156
Your team Zorba Coders is subscribed to branch lp:zorba.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp