[Xpath-ng] Proposal for definition of values/lists
Uche Ogbuji
uche.ogbuji at fourthought.com
Mon Dec 9 16:49:32 MST 2002
> Hi Jeni,
>
> > Every value in XPath NG is a list or an atom. A list is a sequence
> > of zero or more values. Atoms are of two kinds: nodes and data.
> > Nodes are atoms that have identity whereas data are atoms that do
> > not have identity.
>
> What's the purpose of having two kinds of atoms? Yes, nodes have
> identity, other data types have not. But there are numerous things
> that differentiate value types, what makes the identity property
> so special?
I think this is really just a matter of editorial preference. I could go
either way with whether there are 2 or 4 kinds of atoms.
> > [Issue: Should we have node sets instead of generic lists?]
> Not sure, I think no if we can retain most of the XPath 1.0 semantics.
>
> > [Issue: Should we allow only flattened lists rather than allowing
> > lists to hold lists?]
> No, I think we should allow nested lists
>
> > [Issue: Should we allow heterogeneous lists or only allow lists
> > whose items are all nodes, all atoms or all lists?]
> Heterogeneous
I personally wouldn't mind heterogeneous, but I think it might really queer
things fro some implementors.
> > [Issue: Should the string "false" cast to boolean false?]
> No, defenitely not IMO
Emphatically agreed.
> > [Issue: Should lists be converted to strings by concatenating the
> > string value of each value, with spaces as separators?]
> No, provide a join function for this instead
Yep.
> [Issue: Singleton lists, are they treated transparently as the value of their only item?]
Good question. I'd say "no". SIngleton and empty lists are still lists in
all particulars.
--
Uche Ogbuji Fourthought, Inc.
http://uche.ogbuji.net http://4Suite.org http://fourthought.com
Tour of 4Suite - http://www.xml.com/pub/a/2002/10/16/py-xml.html
Proper XML Output in Python - http://www.xml.com/pub/a/2002/11/13/py-xml.html
RSS for Python - http://www-106.ibm.com/developerworks/webservices/library/ws-p
yth11.html
Debug XSLT on the fly - http://www-106.ibm.com/developerworks/xml/library/x-deb
ugxs.html
More information about the Xpath-ng
mailing list