On Sat, Nov 12, 2011 at 2:24 AM, zpcspm <[email protected]> wrote:

> I have noticed a problem: there's still some nodes with wrong content
> in the body.

We are now "officially", that is, by my fiat, in a new testing regime.

I did take a look at the node you mentioned, but I know from several
days work that there are many problems with data.html, any one of
which could create a node that *looks* wrong, but is, in fact, just
about the only way Leo could import the code reasonable.

I have spent a *huge* amount of time on the verification code, and it
is my opinion that it can only create false *negative* reports: claims
that the code was no imported properly when in fact it *was* imported
properly.  Of course, I could be wrong about that, but I'd have to see
real proof of a verification failure.

So if you want me to take bug reports against the html importer
seriously, please show one of the following:

1. That Leo imports a **well-balanced** xml file in such a way that
the tag-name test you propose below fails. By well-balanced, I mean
"well-formed", in the sense of
http://www.w3.org/TR/REC-xml/#sec-starttags.  In other words, all
start tags must have properly nested matching end tags.  Not true for
data.html.

2. That Leo does not, in fact, import a file perfectly, though it claims to.

As noted in a previous post, this will be non-trivial for *you* to
verify, because the xml standard requires that newlines after start
tags and newlines before end tags may be freely inserted.  In fact,
Leo does this because there is no way to represent nodes without such
newlines.

Finally, I have spent too much time distilling large, ill-formed html
files into test cases.  If you want me to improve the html importer
further, please submit the smallest possible html file that
illustrates an import problem.

> Perhaps you could add a test that looks for '<TAGNAME' at the
> beginning and '/TAGNAME>' at the end of each node body. It shall be
> case-agnostic, at least for HTML tags and hopefully will catch more
> edge cases like this.

Can't be done, unless we know that the file is well balanced, and if
we knew that the importer wouldn't have to worry anyway.

In other words, this test would create false negatives for
non-well-balanced html: it would cause Leo to report that it had not
imported the file properly, when in fact it had.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to