From: Adam R. <ada...@de...> - 2005-10-11 10:01:12
|
> > eXist was changed so that doc() now throws an exception if you give > it a > > path to a non-existent document. doc-available() has been > implemented to > > allow you to check if the document exists. > > Yes, that's true. But Chris said he's using the last snapshot, not > the > CVS version. The snapshot did not contain this change. > > > This was done to bring eXist's XQuery inline with the W3C XQuery > > Specification. > > Pierrick and I already argued about the correct interpretation of the > spec with respect to fn:doc and non-existing documents. Contrary to > our first reading, we have now agreed that the spec indeed allows an > implementation to return the empty sequence if a document could not > be > found (i.e. if we define that eXist maps all document paths within > its > own URI space to the empty sequence by default). This is the solution > I would prefer personally. Otherwise, an expression like > doc("...")//a > would throw an error instead of just returning (). This would somehow > be inconsistent compared to other path expressions like e.g. > collection("...")//a, which just returns () if the collection is > empty. We will thus change fn:doc back to its old behaviour. > Great news :-) I would prefer doc() to return () rather than throw an error, just need to change my code back now to not use doc-available() > Wolfgang > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Power Architecture Resource Center: Free content, downloads, > discussions, > and more. http://solutions.newsforge.com/ibmarch.tmpl > _______________________________________________ > Exist-open mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-open > |