OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] XML-appropriate editing data structures

[ Lists Home | Date Index | Thread Index ]

On Fri, Apr 09, 2004 at 05:08:37PM +0200, Henrik Martensson wrote:
>On Fri, 2004-04-09 at 02:14, Amelia A Lewis wrote:
>
>> helpful.  Much the same is true of over-helpful XML editors (and is the
>> main reason I've had trouble using them (this is our return from tangent,
>> please note, aren't I being good?)): <element attribute="value"="" >text
>> content</element></element> is fairly messed up.  Leave me alone when I'm
>
>I do agree that something like that would be annoying. But I would not
>consider an editor that allows malformed tags like that to be a real XML
>editor at all. It is a text editor with XML syntax highlighting, which

Oh, horsefeathers.  You're either not reading what I'm writing, or not
understanding how and why it works, or so involved in strait-jacket editors
that you can't imagine any other use case.  As it happens, that's behavior
I've seen repeatedly.  It's because my fingers keep typing to the end of the
thought, whether the stupid software is inserting something or not.

If I type element attribute, some editors will insert ="", either not moving
the caret, or placing it between the added quotes.  If I'm typing at speed,
this likely means <element attribute="="value" >" by the time I finish
typing what I meant to type.

I don't know how you expect an editor to prevent this.  If I get to <element
attribute="=" (I've just typed my open quote, which it considers a close
quote), is it supposed to recognize that I've typed over something that it
typed in?  Interesting if so; should it also identify attribute= " and
attribute = " and attribute =" ?  (spacing variants).  If not, how am I ever
going to put the symbol "=" into an attribute?

The same thing happens at the end of an element.  I type </element>, but
because it's auto-completing, I get </element>element>.  Doesn't matter
whether it's moved the caret after its inserted element> or whether it left
the caret after the /, I get the same effect.

If I'm to believe that a "real XML editor" would not permit this, how does
it stop it?  Lock up and refuse to let me enter text at the point that it's
decided that it has already finished typing for me?

If that's a real editor, I don't want one.  I want an editor that lets me
use my knowledge, and if the editor's author is determined to believe that
they know more about my documents than I do, then they can go find different
customers.  I'll send them to you, if you like.

>is a different thing. (Just as a text editor with RTF or MIF
>highlighting would not be a word processor.)
>
>
>> typing.  Give me a key to tap on if I need help.  *However*, several of my
>> colleagues absolutely cannot comprehend this attitude, and profess
>> themselves unable to survive without automatic code-completion sorts of
>> facilities (most of them type slow, too, she sneered).
>
>My favourite XML editor has code completion, but creating a malformed or
>otherwise messed up tag is impossible.

Do you actually type at speed, including markup and content together?  Or do
you expect to pause at every markup boundary?  Perhaps that's the
difference.  I fail to see the point of "markup" based on binary insertions
that require alt-cokebottle-meta-shift-infinity; it's *text-based*.  I can
handle typing text, thanks very much.  Markup is just certain kinds of text. 
My fingers are trained to stuff in certain forms of markup without
interacting with my brain, and typically without looking at either the
keyboard or the screen.  If there's some automated completion happening in
the middle of this, it is *not* making my life easier, it's a close
approximation to hell, and that is *not* my idea of what a "real xml editor"
is supposed to do.

BTW, I switch fairly freely between "document-oriented" and "data-oriented"
styles, depending upon need (and I've got the xhtml dtd printed on the
insides of my retinas, I think, since it doesn't require any lookup; xmlspec
dtd and parts of docbook as well).  I want my editor to highlight mistakes
(like <element attribute="="value> and </element>element>, if I happen to
somehow type in something that awful (usually, what they catch are missing
>, missing / in a close, and missing " in attributes), and to give me
validation advice when asked for.  I like it if I can type </[some-key] and
get a proper close tag, although I forget that half the time if I'm in the
flow.  I do not, not, not, not *ever* want an editor to decide to change
*anything* in my document *at all* unless I have explicitly pressed a key,
or clicked a button, for which the contract is: "you know more than I do,
fix it."  In general and as a rule of thumb to be printed on the foreheads
of everyone related to programmers writing an editor: "You do not know more
about a document than its author does."

</rant>

"Real XML editor" my granny's featherbed.

Amy!
-- 
Amelia A. Lewis                    amyzing {at} talsever.com
There are two major products that came out of Berkeley: LSD and BSD
Unix.  We don't believe this to be a coincidence.




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS