<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.12-alpha" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: E4X: I want my S-expressions back</title>
	<link>http://www.lshift.net/blog/2006/06/24/e4x-i-want-my-s-expressions-back</link>
	<description>What happens at LShift</description>
	<pubDate>Sun, 07 Sep 2008 13:32:44 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.12-alpha</generator>

	<item>
		<title>by: tonyg</title>
		<link>http://www.lshift.net/blog/2006/06/24/e4x-i-want-my-s-expressions-back#comment-87062</link>
		<pubDate>Fri, 07 Mar 2008 10:42:39 +0000</pubDate>
		<guid>http://www.lshift.net/blog/2006/06/24/e4x-i-want-my-s-expressions-back#comment-87062</guid>
					<description>&lt;p&gt;Second embarrassing update: If I'd used an XMLList instead of an array, my buildItems() would have worked just as I intended:&lt;/p&gt;

&lt;pre&gt;function buildItems() {
  return &#60;&gt;&#60;item&gt;Hello&#60;/item&gt;
           &#60;item&gt;World!&#60;/item&gt;&#60;/&gt;;
}
var doc = &#60;mydocument&gt;{buildItems()}&#60;/mydocument&gt;;&lt;/pre&gt;
</description>
		<content:encoded><![CDATA[<p>Second embarrassing update: If I&#8217;d used an XMLList instead of an array, my buildItems() would have worked just as I intended:</p>
<pre>function buildItems() {
  return &lt;>&lt;item>Hello&lt;/item>
           &lt;item>World!&lt;/item>&lt;/>;
}
var doc = &lt;mydocument>{buildItems()}&lt;/mydocument>;</pre>
]]></content:encoded>
				</item>
	<item>
		<title>by: tonyg</title>
		<link>http://www.lshift.net/blog/2006/06/24/e4x-i-want-my-s-expressions-back#comment-87061</link>
		<pubDate>Fri, 07 Mar 2008 10:21:57 +0000</pubDate>
		<guid>http://www.lshift.net/blog/2006/06/24/e4x-i-want-my-s-expressions-back#comment-87061</guid>
					<description>&lt;p&gt;As it happens, I was wrong about the lack of computed tags:&lt;/p&gt;

&lt;pre&gt;js&gt; var y = 'sometag';
js&gt; (&#60;{y}/&gt;).toXMLString();
&#60;sometag/&gt;&lt;/pre&gt;
</description>
		<content:encoded><![CDATA[<p>As it happens, I was wrong about the lack of computed tags:</p>
<pre>js> var y = 'sometag';
js> (&lt;{y}/>).toXMLString();
&lt;sometag/></pre>
]]></content:encoded>
				</item>
	<item>
		<title>by: Chris Double</title>
		<link>http://www.lshift.net/blog/2006/06/24/e4x-i-want-my-s-expressions-back#comment-4044</link>
		<pubDate>Mon, 26 Jun 2006 10:18:51 +0000</pubDate>
		<guid>http://www.lshift.net/blog/2006/06/24/e4x-i-want-my-s-expressions-back#comment-4044</guid>
					<description>&lt;p&gt;Nice! I look forward to seeing what you've done :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Nice! I look forward to seeing what you&#8217;ve done :)</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: tonyg</title>
		<link>http://www.lshift.net/blog/2006/06/24/e4x-i-want-my-s-expressions-back#comment-4041</link>
		<pubDate>Mon, 26 Jun 2006 09:08:47 +0000</pubDate>
		<guid>http://www.lshift.net/blog/2006/06/24/e4x-i-want-my-s-expressions-back#comment-4041</guid>
					<description>&lt;p&gt;Thanks for the link, Chris - something similar had occurred to me, too (both the SXML and Seaside HTML canvas approaches should translate to Javascript pretty well), but I haven't had a chance to explore the design space properly yet.&lt;/p&gt;

&lt;p&gt;As it happens, I got into experimenting with E4X through hacking a Seaside-a-like onto your &lt;a href="http://www.bluishcoder.co.nz/2006/05/server-side-javascript.html" rel="nofollow"&gt;server-side javascript&lt;/a&gt; implementation. I'll post about that soon :-)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks for the link, Chris - something similar had occurred to me, too (both the SXML and Seaside HTML canvas approaches should translate to Javascript pretty well), but I haven&#8217;t had a chance to explore the design space properly yet.</p>
<p>As it happens, I got into experimenting with E4X through hacking a Seaside-a-like onto your <a href="http://www.bluishcoder.co.nz/2006/05/server-side-javascript.html" rel="nofollow">server-side javascript</a> implementation. I&#8217;ll post about that soon :-)</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Chris Double</title>
		<link>http://www.lshift.net/blog/2006/06/24/e4x-i-want-my-s-expressions-back#comment-3964</link>
		<pubDate>Sat, 24 Jun 2006 23:18:10 +0000</pubDate>
		<guid>http://www.lshift.net/blog/2006/06/24/e4x-i-want-my-s-expressions-back#comment-3964</guid>
					<description>&lt;p&gt;It's also frustrating that you can't take an E4X node and insert it directly into the browser DOM. &lt;/p&gt;

&lt;p&gt;There is no 'toHTML' which prevents the use of E4X for dynamically generating valid HTML - you have to stick with XHTML. Unfortunately some browsers require things like 'SCRIPT' tags to have a closing tag rather than the shortcut method. ie. They need  not . E4X is incapable of handling this and is non extensible for generating your own output methods.&lt;/p&gt;

&lt;p&gt;As an s-expression style approach I tend to use code like this:&lt;/p&gt;

&lt;p&gt;http://mg.to/2006/02/27/easy-dom-creation-for-jquery-and-prototype&lt;/p&gt;

&lt;p&gt;Chris.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>It&#8217;s also frustrating that you can&#8217;t take an E4X node and insert it directly into the browser DOM. </p>
<p>There is no &#8216;toHTML&#8217; which prevents the use of E4X for dynamically generating valid HTML - you have to stick with XHTML. Unfortunately some browsers require things like &#8216;SCRIPT&#8217; tags to have a closing tag rather than the shortcut method. ie. They need  not . E4X is incapable of handling this and is non extensible for generating your own output methods.</p>
<p>As an s-expression style approach I tend to use code like this:</p>
<p>http://mg.to/2006/02/27/easy-dom-creation-for-jquery-and-prototype</p>
<p>Chris.</p>
]]></content:encoded>
				</item>
</channel>
</rss>
