[Zope] AW: [Zope] Thoughts on XMLishkindasorta things

Christopher G. Petrilli petrilli@amber.org
Sun, 31 Jan 1999 12:56:16 -0500


On Sun, Jan 31, 1999 at 03:51:24PM +0100, Carsten Oberscheid wrote:
> >
> > Anyway, so I've MOSTLY got the 'store' feature working, and here's how
> > I'm trying to do it...
> >
> > * Create new tag 'store', used like this:
> >
> > 	<?ztml store var foo ?>
> 
> I'm glad you liked this one (see below) :^)

Today, it seems to be the least destructive method of accomplishing the
goal...  which is to allow someone to write something "well-formed" if
they desire, though they certainly don't have to.  More on this later,
having spent last night reading over the XSL spec <cough-hairball>.

> > [I propose %blah; syntax, called parameter entities.
> 
> I'm sorry, you got this wrong. Parameter entities can only be used in the DTD, 
> while character entities are to be used in the document. Using a character 
> entity is the right way to go.

You're right of course, having gone back and read other parts of the XML
spec, it's not obvious in 4.1 that a parameter-entity is DTD only, but
it's in the preface in 4.  This is a really poorly written standard, in
my opinion... but that's just me... 

> Anyway, as Amos said, the "store" construct _is_ a hack. And not only for 
> esthetic reasons I'm not too happy with it myself. But since what you, Chris, 
> are doing is patching the existing DTML rather than a redesigning it, this 
> should be an acceptable workaround for the attribute problem.

Well, hack is in the eye of the beholder... it's certainly not the
"right thing", but neither is it the "wrong thing," it's simply a short
cut ot a goal.  I actually think this works pretty well for those who
want to use it.  It's also unclear whether or not this whole discussion
is relevent in many ways given DTMLs position as a quick scripting
language, and not a full markup language.

> In the long run, I agree that DTML should evolve to be fully XML compliant. I 
> don't want to comment on Paul Prescod's XSL-syntax proposal until I know more 
> about XSL (and reread the discussion he mentioned). Anyway, the DTML engine 
> _is_ a (pre-)processor, so on first thought it seems quite "natural" to use 
> PI's here (tempting enough, since these are quite rare animals in Joe Tagger's 
> boring life :-). On the other hand, XSL and other rendering engines are 
> processors as well, so... I think I shut up and think about this some more...
> 

Well, having looked at XSL last night, it seems to require about 10x the
"code" to do the same thing, this is totally bogus for human written
things, though I'm sure there are people who will argue that this will
all be automated by some fabulous tool---which doesn't exist yet.  Also,
a quick think-thru argues that it will always be slower to parse, don't
know how much slower, but I'd hazrad 3-4x slower...

Also, All the XSL parsers assume they're being fed with XML data, which
most certainly Zope isn't currently, no do I suspect will it be anytime
soon.  THis would require rendering objects into XML, then rendering
that through the XSL parser, then rendering the output of THAT into HTML
to send ot the user... wow, that sounds effecient :-)  No offense to the
XML bunch, it's a great idea, and will eventually probably take over the
world (if only because it's "hip"), but I don't think it's the right
hammer for this problem TODAY, maybe Q3, maybe not?  

I personally would go back to hand-coding HTML if I was forced to use
XSL for everything... it's just way too wordy, a COBOL markup language
of sorts.  (just my opinion) but my brain hurt after looking at it for
an hour or two... it just all blends together.

As I've outlined, my goal is to make this something that doesn't break
the basic tenants of an HTML parser, and shows up as editable.  It's not
designed ot fit entirely in the XML framework, that's a MUCH MUCH MUCH
larger job.

Chris
-- 
| Christopher Petrilli
| petrilli@amber.org