[EMAIL PROTECTED] wrote:
> >For the collective knowledge, after reading xmlc.enhydra.org a little:
> >XMLC semantically seems to be similar to some of the simple templates
> >systems that were passed around -- basically, you can just mark blocks
> >in XMLC.  This is done with the id attribute... i.e., to mark a block
> >you use:
> >
> ><span id="blockname">some text, maybe which will be replaced</span>
> 
> It's this part which supposedly makes it so compatible with WYSIWYG HTML 
> editors.

While it makes it really compatible, I have to say I am rather
unimpressed with it.  It's not concrete -- you can't see the id tags
in a WYSIWYG editor.  And it doesn't deal with the common situation of
inserting values -- i.e., that you sometimes define blocks, you
sometimes define repeating blocks, but probably the most common thing
will be to define insertion points.  An id tag seems a crude way to do
it.

> >I think extended tags have shown themselves to be very difficult to
> >use.  DTML-style tags produce wildly improper HTML, not to mention XML
> >(e.g., <img src="<dtml-var imagename>">).  They also are unfriendly to
> 
> Well, this isn't valid XML, to my knowledge, but I wasn't talking 
> about "extended HTML" syntax; I was talking about XML. Anyway, DTML offers a 
> selection of entities for this case, doesn't it?

Like I pointed out in a reply to Mike, entities aren't powerful enough
to replace the other statements.  And the other statements aren't
individually powerful enough to replace statement nesting.

> I haven't really used XSL, but one of the things which doesn't seem apparent to 
> me is how one can tailor the appearance of the final output without having to 
> transform XML documents to HTML documents (for example) on a repeated, trial-
> and-error basis to see whether the "stylesheet" is right.

I only tried to use it once -- to turn a database query result into a
formatted page.  You definitely have to think in the abstract, since
the XSL layout isn't related to the layout of the resulting page.

Eventually it just pissed me off, because I couldn't for the life of
me figure out a way to do sorting and grouping at the same time.  And
I think I'm better than the average bear at fitting my goals with odd
execution models -- but maybe I'd retry XSL if another good situation
arose.

> My newer XMLForms work uses XML namespaces instead. Here's a "group" definition 
> from the example:

Well, if XML tools aren't quite up to snuff, XML/XHTML combo tools
aren't even on the horizon -- they are something I think people have
considered for a long time, before even XML existed, but never really
done.  I suppose, though, that there is a certain support to it --
lots of tools allow you to insert custom tags, which would probably
suffice (at least if the xhtml namespace was the default, and the
XMLForms namespace was qualified -- but I guess that's an XML syntax
issue, isn't it?).

How would you do my example with the conditional highlighting?  Like,
in DTML:

  <tr bgcolor="<dtml-if c>#ffdddd<dtml-else>#ffffff</dtml-if>">
    [lots of complicated structure that shouldn't be written twice]
  </tr>

This seems to be the example that no system does very well, though ZPT
comes close if you do the conditional earlier, and then set the
attribute based on a saved value from that.


Kind of on a different topic: my own sense on form generation is that
the HTML generation should be done by a template system in the
abstract -- i.e., you should just make your
definition/validation/conversion part of the forms seperate, and they
provide the HTML elements (INPUT, FORM, etc) in some fashion that is
easy to plug into a template system -- like as a dictionary
({"username": '<input type="text" name="username" size="10">'}), or as
a function with methods (like an input(elementname) function, form()
function, etc).

Then a user can adopt the form interface seperately from the template
interface.  You can make a template system, they should just be
friendly with each other, not too closely tied.

Maybe your code is already arranged like this -- but if so, then I
think you should be more explicit, like give them two different names.

  Ian

_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to