Re: Extension candidates
"Dimitre Novatchev" <[email protected]> Thu, 11 Dec 2008 15:49:29 -0800
| Newsgroups | gmane.text.xml.xslt.extensions |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Dec 11, 2008 at 12:06 PM, Michael Kay <[email protected]> wrote: >> Michael and Dimitre have just added new extension >> candidates on http://www.fgeorges.org/exslt2-wiki/. Thank >> you! I have a few questions about them... > > I wonder if we shouldn't capture the discussion on the wiki itself. Start by > creating a page for discussing each candidate extension, then put the > questions there and let each evolve into a specification. Completely agree. Thus it will be available and everybody could join the discussion. >> >> > * xx:node-ref() - for any node produce a value, which can be >> > used to obtain this node (node reference) >> >> > * xx:node-from-ref() - navigate to (select) a node from its node >> > reference >> >> By "value," do you mean "atomic value"? I am not sure to >> see exactly the purpose, would you have a sample use case? > > There's been a fair bit of discussion of such functions on the XQuery WG > mailing list in the last few weeks. > Some people wanted the ref to take a > form of a string or URI so it could be stored in a document. Some wanted > ref() to be synonmous with generate-id(). Some wanted it to be a ref() to > any value (sequence), not necessarily just a node. A big difficulty is the > interaction with garbage collection. There are two conflicting requirements > - the reference should be a string, so you can store it in a document; but > the node should continue to exist so long as the reference exists. Basically > these two requirements come from different use cases, and I think they might > need different facilities. These two requirements are not conflicting. I imagine an implementation where references are stored in a hash table, where the string is the key and the actual reference is the value. -- Cheers, Dimitre