Multiple symbol spaces considered valuable

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Following up on the interesting analogy you drew during today's call
between Python and XML with respect to the value of a single symbol
space within a namespace, I offer the following analogy for
consideration:

 XML Namespace  :  Element : Attribute
 Python package :  Method  : Local variable

So, to take a concrete example, in the Python package/class
swap.formula [1], we find a local variable whose name is 's' in the
method *compareTerm*, which appears to be used to name a list of
Statements, and we find a local variable whose name is 's' in the
method *add*, which appears to be used to name an instance of class
StoredStatement.

To me it is unproblematic to understand these as distinct variables,
which share a local name, disambiguated by context.  They occur in
distinct symbol spaces, as Python by default scopes local variables
within methods.

A parallel can be drawn with the XHTML namespace, in which we find an
attribute named 'align' for the element *object* with one definition,
and an attribute named 'align' for the element *table* with a
different definition.  Again, it is unproblematic to understand these
as distinct attributes, which share a local name, disambiguated by
context.  They occur in distinct symbol spaces, since XML by default
scopes attributes within elements.

It follows that there _is_ no QName-style name, that is, one made of
of Namespace/Package name + local name, which distinguishes between
the two Python variables, just as there is no QName-style name which
distinguishes between the two XHTML attributes.  If you require a
global unambiguous name for one of the variables, or one of the
attributes, you require a more complex form of name (or URI), which
encodes sufficient information about the context (method or element,
in these cases), to disambiguate.

I don't think this is a bug, in Python or in XML -- I think it's a
natural pattern of naming.

ht

[1] http://dev.w3.org/cvsweb/2000/10/swap/formula.py?rev=1.30&content-type=text/x-cvsweb-markup
- -- 
 Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
                     Half-time member of W3C Team
    2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
            Fax: (44) 131 650-4587, e-mail: ht@inf.ed.ac.uk
                   URL: http://www.ltg.ed.ac.uk/~ht/
[mail really from me _always_ has this .sig -- mail without it is forged spam]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFDnyz7kjnJixAXWBoRAlxtAJ9S5P7Jqe22qYPRvP3DwfRByQzAfgCeJ4BH
ZUZDeabQqN2pl7GNdHQkfpk=
=lUcS
-----END PGP SIGNATURE-----

Received on Tuesday, 13 December 2005 20:20:20 UTC