[Gd-chatter] r11210 - trunk/libraries/network/web-framework
turbo24prg at gwydiondylan.org
turbo24prg at gwydiondylan.org
Sat Feb 24 00:29:19 CET 2007
Author: turbo24prg
Date: Sat Feb 24 00:29:18 2007
New Revision: 11210
Modified:
trunk/libraries/network/web-framework/changes.dylan
trunk/libraries/network/web-framework/library.dylan
Log:
Job: minor
- add prefix to all elements
Modified: trunk/libraries/network/web-framework/changes.dylan
==============================================================================
--- trunk/libraries/network/web-framework/changes.dylan (original)
+++ trunk/libraries/network/web-framework/changes.dylan Sat Feb 24 00:29:18 2007
@@ -340,6 +340,14 @@
end;
define method generate-atom (con :: <xhtml-content>, #key)
+ local method change-prefix (elements :: <sequence>)
+ for (element in elements)
+ element.prefix := "xhtml";
+ if (element.node-children.size > 0)
+ change-prefix(choose(rcurry(instance?, <element>), element.node-children));
+ end if;
+ end for;
+ end;
let document = parse-document(concatenate("<div>", con.content, "</div>"));
if (document)
let atom-content = with-xml()
@@ -350,6 +358,7 @@
atom-content.node-children[0].xml-name := "xhtml:div";
atom-content.node-children[0].node-children :=
root(document).node-children;
+ change-prefix(choose(rcurry(instance?, <element>), atom-content.node-children[0].node-children));
atom-content;
else
next-method();
Modified: trunk/libraries/network/web-framework/library.dylan
==============================================================================
--- trunk/libraries/network/web-framework/library.dylan (original)
+++ trunk/libraries/network/web-framework/library.dylan Sat Feb 24 00:29:18 2007
@@ -149,7 +149,7 @@
use date;
use xml-parser,
import: { node-children, node-children-setter,
- parse-document, root,
+ parse-document, root, <element>,
name-setter => xml-name-setter};
use simple-xml;
More information about the chatter
mailing list