Chuck Esterbrook <[EMAIL PROTECTED]> wrote:
> At 01:40 PM 5/29/2001 -0500, Ian Bicking wrote:
> >Though if IE had just kept the HTMLINPUT tag, that would have helped a
> >lot too. It was such a good idea. Sigh.
>
> What was that? I never heard of it.
Apparently for a beta (5.0 beta, maybe) they had something like
TEXTAREA... maybe it was called HTMLAREA. Anyway, you could enter
rich text, with bold, italic, etc. IE would then send it as text with
HTML markup. But they took it out :-(
> >I must say that MiddleKit's CSV model descriptions are awfully
> >annoying. I write code in a text editor, the model is part of the
> >code (even if it declarative), and counting commas is difficult.
>
> You're only annoyed because you're using a text editor.
> Use any spreadsheet. Then you will be very happy.
I don't like spreadsheets. I code in Emacs. I read my mail in
Emacs. I love Emacs. I never ever use spreadsheets, why use them for
this one thing?
> You can do this now. Check out the test suite for UserKit. I create an MK
> model there *in Python*.
>
> Knock yourself out. ;-)
I'm unclear, once I've created the model how do I create the store
based on that model?
> I'd also be curious if ArgoUML's flavor of XML could be read *and* if
> ArgoUML is flexible enough to capture non-UML-corresponding aspects of MK's
> model via attribute dictionaries (or some other technique) in the GUI.
> Why? Because then you could define your object model in Argo and use it in
> MiddleKit.
>
> http://www.argouml.org/
I've never really understood what UML languages really offer over just
reading something and thinking about it.
> >I have kind of moved elsewhere, as I've decided I've needed to do
> >more, um, concretely productive work. But I still kind of like the
> >ZPT syntax. Specifically, there's no good way to do table-row
> >repetition solely within a WYSIWYG editor with the Velocity-style
> >syntaxes (which is, on the larger level, the same syntax that most
> >template systems use -- i.e., on the text level). It's also nice with
> >dynamic SRC attributes in a IMG tag, where Velocity-style means you
> >get a broken image, and also don't get automatic HEIGHT and WIDTH
> >tags, or whatever else your WYSIWYG editor can do for you.
>
> I'm not clear on why Velocity breaks images:
>
> <IMG SRC=$foo>
>
> $foo could expand to:
> "foo.gif"
> or even:
> "foo.gif" width=10 height=10
>
> What am I missing?
The WYSIWYG editor would really like to know what image you are
inserting. The editor of course can't find any image named $foo. It
would be easier for it to understand
<IMG SRC="sample.gif" replace="$foo">
Or whatever.
> >I also like the ability to use the same system to do HTML-level
> >transformations. Similar to XSLT, except in a procedural language we
> >already know (Python).
>
> Would WebUtils.HTMLTag help at all here? It puts HTML into a Pythonic
> structure. It doesn't have many manipulative conveniences right now. Just
> searching and writing the HTML back out.
Yes. Like I said before, HTMLTag is fairly close to equivalent to the
structure I used. The transformer I used that implemented the
ZPT-style attribute-based language also could be used to transform the
HTML from one form to another. I felt this was best handled as a
transformation, not a method of the HTML parse tree.
To give an example of HTML transformation, here's the code to change
all A HREF tags to use redirects (so you can log it) and have some
JavaScript to hide you are doing that:
def a_transform(node):
if not node.has_key("href"):
# It must be a <a name> node, which we don't care about
return node
loc = node["href"]
if loc[:7] != "http://" and loc[:8] != "https://":
# It's a local site or something, so we don't need to log
return node
node["href"] = '/redirect.cgi?loc=%s' % urllib.quote(loc)
node["onMouseOver"] = "window.status='%s'" % htmlEncode(loc)
node["onMouseOut"] = "window.status=''"
return node
# This is all the cruft that sets up the tranformation.
# This would all be packaged up in a useful function, if given
# a clearer context.
htmlTrans = HTMLTransformer()
tagTrans = TagTransformer()
htmlTrans.addTransformer(tagTrans)
tagTrans.addTransformer("a", a_transform)
htmlSource = HTMLParser(htmlText).parse()
HTMLUnparser(htmlTrans.transform(htmlSource)).unparse()
_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/webware-devel