On 06/07/2005, at 7:49 PM, Martin Orth wrote:
The cfxhtmlbeans project basic parts are a ColdFusion code generator
and a xHTML schema parser.
For each xHTML elemement(html tag) within the schema the generator
creates a CFC with the name
of the element. eg. table.cfc for the element table.
I understand your intentions, but I'd really hate to have to maintain
code like this:
<cfset
myHTMLPage=createObject("component","xhtmlcomponents.xhtml.html").init(
)>
<cfset myHead=myHTMLPage.new("head")>
<cfset myTitle= myHead.new("title")>
<cfset myTitle.set_value("A page")>
<cfset myBody=myHTMLPage.new("body")>
<cfset myBody.set_Bgcolor("ff00ff")>
<cfset myH1=myBody.new("h1")>
<cfset myH1String=myH1.new("string")>
<cfset myH1String.set_value("Hello world!")>
Frankly Coldfusion's syntax and language features suck for creating a
nice CFC based API for this stuff.
Maybe if it looked something like this:
<cfscript>
b = createObject("component","xhtmlcomponents.builder.xhtml");
html = b.html (
b.head (b.title ("A page" )),
b.body (attrs (bgcolor = "ff00ff"),
b.h1 (b.text ("Hello world"))
)
)
WriteOutput(html.output());
</cfscript>
But then you can't use loops or conditionals when creating elements, so
this format is pretty darn useless anyways....
- tim lucas
---
You are currently subscribed to farcry-dev as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/