Lists Home |
Date Index |
----- Original Message -----
From: "Paul Prescod" <email@example.com>
To: "Dare Obasanjo" <firstname.lastname@example.org>
Sent: Monday, January 28, 2002 2:01 PM
Subject: Re: [xml-dev] Auto-completion in editors (RE: [xml-dev] ANN: XML
Origin, the XML Editor & XSLT Debugger Released)
> Dare Obasanjo wrote:
> > Exactly what is inefficient about putting open tags in a stack as you see
> > and popping them off as the tag is closed with soem flag that halts this
> > process when withing CDATA sections? Is there some sophisticated nuance
> > missed?
> When are you doing this pushing and popping? The user opens a hundred
> megabyte document and scrolls to the bottom. They insert the cursor and
> try to close a tag. There is no way to know the context without parsing
> from the top in real-time. Plus, you need to deal with documents that
> are not well-formed so you can't use a regular XML parser.
Handling closing tags could be a multi-stage process. If you want to support
the the feature when users enter data in the middle of the document you can
Create a table of the start & end of all CDATA sections and comments in the
document as they are created.
If a user enters data and starts a close tag, the first step is too see if it
is within a CDATA section or comment so we know whether to do anything or not.
If the tag isn't in one of these sections then work backward from that point
until you see an open tag and that's what you are looking for.
Of course, I didn't think too hard about this so there are probably flaws in
this approach as well, either way I doin't believe it is that difficult to
implement this efficiently.
> I don't mean to say it is rocket science, just that it certainly isn't
> as easy as it seems at first.
> I think your machine date is wrong.
Yes, it is. All will be explained soon. :)
THINGS TO DO IF I BECOME AN EVIL OVERLORD #118
If I have equipment which performs an important function, it will not
be activated by a lever that someone could trigger by accidentally falling
on when fatally wounded.
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com