Re: References in XPath that can be represented by a string andstill can be garbage collected
Dimitre Novatchev <[email protected]> Thu, 18 Dec 2008 08:14:41 -0800 (PST)
| Newsgroups | gmane.text.xml.xslt.extensions |
|---|---|
| Message-ID | <[email protected]> |
> > > > This fully answers the question and proves that there are no > > concurency anomalies. > > > > Doesn't look like a proof to me. And it doesn't address my specific example. > > Given a node $N whose string-reference happens to be 'n123', if you do > > String $S = ref(RM, $N); > Node $M = deref(RM, 'n123'); > > you will get $M set to the node $N; but if you do the two instructions the > other way round, $M will be null. That is, the result depends on order of > evaluation. As I said, I'm not sure this is serious, because if you call > deref() with a string that wasn't obtained from the RM, the results are > undefined anyway. But it's a warning signal that indicates we need to be > very careful. What is the problem? Getting a null when trying to access a Ref by an non-existing key is... the right thing ! Cheers, Dimitre