Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Cyclic checking

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: John Cowan <jcowan AT reutershealth.com>
  • To: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Cyclic checking
  • Date: Fri, 19 Sep 2003 13:27:50 -0400

Elliotte Rusty Harold scripsit:

> I'll eventually look into ways of speeding it up, but I do not
> believe speed is more important than correctness.

I think you are absolutely right in this case: making sure that toXML always
returns a well-formed document (hmm, is an infinitely long document
well-formed?
No parser can handle it!) is more important than a fairly cheap check that
corresponds only to the depth and can be bypassed in the most common case
(viz. the new child has no children).

But....

> A program that does
> the wrong thing 1000 times faster is useless.

Which would you rather have, a version of Saxon with one bug less, or one
that ran 1000 times faster?

> Parsing currently short circuits a lot of checks the parser has
> already done. I should be able to short this one too, though it may
> not currently be short circuited in 1.0d21.

If you make the test I mentioned above (which someone else on the list came
up with, not me), then it is implicitly in effect during parsing, since
parsers
always add new nodes to old.

--
"I could dance with you till the cows John Cowan
come home. On second thought, I'd http://www.ccil.org/~cowan
rather dance with the cows when you http://www.reutershealth.com
came home." --Rufus T. Firefly jcowan AT reutershealth.com




Archive powered by MHonArc 2.6.24.

Top of Page