>>I was wondering if anyone on this list could step forward and assist me in
>>gauging community interest in a Lingo DOM implementation. I currently have
>>Level 2 Core, Views, Traversal-Range and part of Events done and working.
>>
>>Comments? Advice? Flames?
>
>None of the above. What is a DOM? Does it involve recreational pain?
My apologies. I may have made a bad assumption that a good majority of
Lingo-L list members would know what the DOM is and how it could be used in
Director/Shockwave.
DOM stands for Document Object Model. It's a World Wide Web Consortium (W3C)
Recommendation, so it's here and now...and important. They're at Level 2
right now (which is what I'm implementing), and working on Level 3.
>From their site:
"W3C's Document Object Model (DOM) is a standard API (Application Programmer
Interface) to the document structure and aims to make it easy for
programmers to access components and delete, add or edit their content,
attributes and style. In essence, the DOM makes it possible for programmers
to write applications which work properly on all browsers and servers, and
on all platforms. While programmers may need to use different programming
languages, they do not need to change their programming model.
"W3C's Document Object Model thus offers programmers a platform- and
language-neutral program interface which will make programming reliably
across platforms with languages such as Java and ECMAScript a reality."
I'm adding Lingo to the list of programming languages that now implement the
DOM. With a Lingo DOM implementation, you can use Lingo to create and
manipulate, for example, XML document. I'm not talking about the XMLParser
Xtra -- that's just a non-validating parser with Lingo access to the parsed
node tree objects. I'm talking about a cast full of parent scripts which
implement every interface of the Level 2 DOM. Here's a snipette of Lingo
that show's how to create an XML document:
loImpl = new(script "DOM_DOMImplementation")
loDoc = loImpl.createDocument(VOID, "company",
loImpl.createDocumentType("company"))
loRootElem = loDoc.getDocumentElement()
loProdElem = loDoc.createElement("product")
loRootElem.appendChild(loProdElem)
loProdDataVal = loDoc.createTextNode("DOM-Lingo")
loProdElem.appendChild(loProdDataVal)
loCatElem = loDoc.createElement("category")
loRootElem.appendChild(loCatElem)
loCatElem.setAttribute("idea", "great")
loCatDataVal = loDoc.createTextNode("DOM Implementations")
loCatElem.appendChild(loCatDataVal)
loDevByElem = loDoc.createElement("developedBy")
loRootElem.appendChild(loDevByElem)
loDevByDataVal = loDoc.createTextNode("Christopher Watson")
loDevByElem.appendChild(loDevByDataVal)
The above code creates the following XML document in memory:
<company>
<product>DOM-Lingo</product>
<category idea="great">DOM Implementations</category>
<developedBy>Christopher Watson</developedBy>
</company>
Obviously, there's a lot more to the DOM, and implementing it, than this. I
don't want to burn bandwidth by providing a comprehensive overview. I'm sure
that those who know the worth of the DOM, and how that might relate to
Lingo, can also grasp the value of using it for specific
Director/Shockwave-related tasks or projects. Personally, I developed it to
form the XML that serves as the result output for my educational Shockwave
games. The reporting mechanism is complex, and XML's dynamicism fit the bill
quite nicely. I needed a way to construct, maintain, manipulate and post
that XML data. That's where my work on implementing the DOM in Lingo came
about.
Now I'm interested in knowing if there's interest out there for something
like this.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Christopher Watson
Sr. Software Engineer
Lightspan, Inc.
http://www.lightspan.com/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]