[exslt] About node references

Michael Kay mike at saxonica.com
Mon Dec 15 14:07:10 MST 2008


> What use case do we have for flatten()? It seems that just 
> using deref() is sufficient and also there might be cases 
> when flattening a sequence and processing it may have 
> different results than when processing and dereferencing on the go.

Reasonable question. There was a proposal that refs should be implicitly
dereferenced based on the expected type, similar to atomization, and in that
case it seems to be only a recursive dereference that makes sense. It can be
user-written, so it's not a big loss to drop it for now.
> 
> 
> I would like to add the function I already proposed:
> 
>    string refCopy(ref)
> 
> which is to be used any time we want to copy/save a ref. 
> Dereferencing a copied/saved ref will be guaranteed to be 
> successful only for strings obtained from refCopy(). This 
> eliminates the "leakage" problem.

Sorry, I absolutely don't understand how you see this working.

When you say a "string obtained from refCopy()", I'm not sure what you mean.
Would it also work on

codepoints-to-string(string-to-codepoints(refCopy(x))?

Michael Kay
http://www.saxonica.com/



More information about the exslt mailing list