Re: [xslt] Non-existent variable => error?



> Well, let's back up just a little....  First, the documentation.  My
> interpretation of its words of wisdom is that if you really screw
> up, like give it a pointer that points to a letter from your aunt
> Martha instead of a nice XML document, and it can't reply with a
> valid document, then it has every right to reply with a NULL
> pointer.  It specifically *doesn't* mean that you haven't made any
> mistake anywhere, or that your stylesheet is error-free.

To that I can only agree.

> Next the philosophy.  There are many ways of dealing with an error.
> One of my favourites is to crash and burn exactly at the point of
> the error.  Another of my favourites is to produce a rude error
> message to the user, pick up your toys, and go home.  Unfortunately,
> users tend not to enjoy either of these approaches, so
> libxml/libxslt instead go as far as they can, finding as many
> different errors as possible, and producing the most meaningful
> output they can within this hostile (user) environment.  By default,
> error messages are sent to stderr.  If you don't like this, there
> are many other options available.  But, in any event, the error
> *has* been notified [which was the point of my initial response].
> What the user chooses to do with that notification is up to him

To that I agree as well, just that I overlooked the fact that something was
returned and I understood the originating message as a claim to return NULL
incase any error occurs, not a partly processed document. That was the point
of my statement that this is environment-dependent. Some will like NULL if
not absolutely everything went right so they can stop the ball before it
shoots their left eye. Others will rather take what they can, because the
source of the document is ourside their control and they cannot take
influence on malformness it may bring. Given the rich libxml interface and
possibility to act as you please, I would personally vote for the second,
but I have no real use-case to back it upon.

> (or, as Igor would say, up to her).

Oh, that is just my way to complain about the acute lack of females in this
computer business :-) You won't believe what herd of pigs males become when
left alone in the office for months... we stop shaving, stop changing
clothes, neither we watch our language nor what we eat... :-) :-)

Ciao
Igor




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]