>I wonder if you should test if local is blank and do something?

Each sanity-check costs us some performance. If we're willing to trust that
we'll be handed a correct namespace-aware SAX2 stream, we run faster... and
that is the most common situation. I'm somewhat reluctant to add a test
whose sole purpose is to make us more tolerant of someone else's bugs.

But I think there would be some value in a SAX1 to SAX2 adapter, and/or a
SAX sanity-check filter, which folks who are worried about this could plug
in between their SAX source and Xalan. That would have the advantages of
being usable with other applications as well, and of letting you simply
leave it out when you don't need it so there's no performance cost. The
downside would be that this might be a bit slower in the case where you
_do_ want the check... though since it would mostly be "tail-calls", it
should optimize well.

Something to think about.

Reply via email to