Re: System properties

Colin Paul Adams <[email protected]>
Newsgroups gmane.text.xml.xslt.extensions
Message-ID <[email protected]>
>>>>> "Mike" == Mike Brown <[email protected]> writes:

    Mike> I think that it is the processor's prerogative as to whether
    Mike> to expose such modifications. I would guess that most
    Mike> implementers would not want to bother keeping track of the
    Mike> original state of the environment, but I suppose that leads
    Mike> to another question: should this be side-effect free?

Of course a call to system-property MUST be side-effect free.
That is - to XSLT - if the processor wants to make a copy of the
environment for this purpose (and I guess that's what your next
paragraph is implying), then this is not a side-effect that will be
visible from within XSLT, and so does not concern us. (It might
concern the implementor though, and (s)he might want to document that.)

    Mike> If so, then environment variables should be exposed the same
    Mike> way through the entire transformation.

Yuck!
As long as you are only requiring that a given environment variable
will always have the same value (as seen by system-property)
throughout the transformation, then I'm happy enough.
But if you are requiring coherence for the set of environment
variables as a whole (as seen by a nasty, nosey, snooping external
program), then I'm not so happy. But I guess you didn't mean that
anyway, nor is it likely that such an incoherency would happen in
practice (unless some nasty impure extension function were to modify
the environment - in which case the author of such nasty extension
function can be blamed). . 

So to put it formally:

The result of a call to system-function (exslt-env:X) shall always
return the same value (for a given X) throughout the transaction.

then +1.

    Mike> +1 overall.

    Mike> I would add:

    Mike> Some operating systems store environment variables as
    Mike> encoded text, without any information about what encoding
    Mike> was used. The mapping of such data to an XPath string object
    Mike> is implementation-dependent.

Good point.
+1
-- 
Colin Paul Adams
Preston Lancashire
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.