Page 2 of 2

Posted: Thu Aug 31, 2006 10:55 pm
by Luke
well I wouldn't be interested in it for day-to-day xhtml markup. It seems like you could use it to have your code automate the creation of the documents in very large and complicated web applications though. And also to allow for the things I already mentioned... easy integration with pre-built libraries such as Google Maps and Scriptaculous...

Building applications in this way would still allow a lot of seperation between business logic and presentation. Although your application would be responsible for creating markup, your application would have an enourmous amount of flexibility, and yet still be consistant in that markup. Consistant markup makes for easy css styling... and a smooth ride for the user. I am extremely fascinated with this idea... and when I get some time I am going to explore it thoroughly

Posted: Thu Aug 31, 2006 11:17 pm
by alex.barylski
alvinphp wrote:
The Ninja Space Goat wrote:Umm... yea pretty much. Do you use that at all? I haven't had time to look it over completely, but I imagine this could be used to compose fully valid XHTML documents? This could be a pretty powerful set of objects if put in the right hands it seems like... I wonder how come I've never seen/heard of it before... :?
Why not just code the site in XHTML? I am kind of confused at the point of this. All the sites I do now are in XHTML.
XML or more specifically SGML is the markup language. It defines what a tag is, but not how it is structured, etc...

HTML, XHTML, XML, VML, etc are all forms of SGML...just specialized.

HTML has a structure, but it's loosely enforced whereas XHTML strict requires very specific structure and tagging rules, like closing all tags, etc...

You can use a DOM to interact with *any* SGML document, regardless of whether it's an XML file or XHTML strict...

Not everyone knows how to write 100% valid XHTML...myself included although I've done pretty go so far :P

You could read a template which was poorly written in HTML 3 or 4 by an end user who used Front Page, etc load it into a DOM and programatically make the HTML code XHTML STRICT but it would take alot of work...

Likewise, by abstracting the SGML model in the form of a DOM (which is what I assume Spacegoat meant?) you could easily incorporate drivers to output specific document types according to browser detection, etc...

For instance, your PHP script could detect if the user had the latest browser and output valid XHTML code...but if there using an older browser maybe HTML 4 would suffice or even be better off...

The idea or principle is solid, I only disuade because it's a helluva lof of work...

When re-writting HTML to XHTML or visa-versa...you *may* likely have to change the DOM and when it's output to whatever format, this may result in visually malformed pages, despite being technically correct...

I can't think of a concrete example, but consider the following:

The users WYSIWYG editor outputs something like:

<span><h3>Hello <i>italicized</h3> world</i></span>

Horrible HTML I agree and not likely done by any WYSIWYG, but...it's possible, perhaps by hand written inexperienced developers???

How do you correct that code to XHTML programatically???

Does the author intend:

<h3><span>Hello </span><i>italicized world</i></h3>

or

<h3><span>Hello </span> italicized</h3><i>world</i>

Not to mention all the rules behind writing valid XHTML code... :P

Horrible example, but I think it illustrates my point...

There is alot of work to be done, which is "almost" impossible without first rendering the pre & post HTML to compare changes and test to see if visually they are different or not...

Basically...the way I see it...it's a major PITA to develop something quite like that...

But again i'm not sure where Spacegoat is planning on taking this...perhaps it's not quite what I think it is???

Cheers :)

Posted: Thu Aug 31, 2006 11:26 pm
by Luke
no... there was never any talk of creating a WYSIWYG editor or fixing anybody's markup. That stuff is irrelevant. This is about an application having complete control over its output markup... and then a designer creating a stylesheet to decorate that markup.

EDIT: but as everybody has mentioned so far... it would be an immense amount of work

Posted: Fri Sep 01, 2006 12:06 am
by RobertGonzalez
And I am not so sure it would be extensible across a team of developers (Designer, DBA, Programmer). Putting the entire scope of markup creation/styling into one pool seems to me to make it less workable later on for more than one developer that may not be you.

Posted: Fri Sep 01, 2006 12:35 am
by alex.barylski
The Ninja Space Goat wrote:no... there was never any talk of creating a WYSIWYG editor or fixing anybody's markup. That stuff is irrelevant. This is about an application having complete control over its output markup... and then a designer creating a stylesheet to decorate that markup.

EDIT: but as everybody has mentioned so far... it would be an immense amount of work
Creating a WYSIWYG editor... :?
This is about an application having complete control over its output markup
I realize that, but if the markup isn't going to modified by anyone, why bother using a DOM? It's just more work, when you could just have an expert write the template and be done with it...???

Posted: Fri Sep 01, 2006 12:49 am
by Luke
because I'm not talking about templates either... hrmm... I don't think anybody is really understanding what I'm getting at... and I am terrible at explaining it. I will try to explain a little better in the am.

Posted: Fri Sep 01, 2006 12:54 am
by alex.barylski
The Ninja Space Goat wrote:because I'm not talking about templates either... hrmm... I don't think anybody is really understanding what I'm getting at... and I am terrible at explaining it. I will try to explain a little better in the am.
We suffer from the same chronic problem then amigo :P

I have the very same frustrations...your not alone *pats ninja on the back*