[XML-SIG] XML namespaces and Python attributes

Ken MacLeod ken@bitsko.slc.ut.us
26 Apr 2000 12:23:03 -0500

This was a random thought that came up during a discussion of RDF and
namespace support in languages: since XML uses/supports a model of
mixing namespaces at the object attribute level, can/should we look
into supporting that with first-class syntax in languages?  We used
Python as an example:

  rdf = 'http://www.w3.org/TR/RDF/'
  my_description = some_item.rdf:description

and an unaliased syntax:

  my_description = some_item.{http://www.w3.org/TR/RDF/}description

Internal implementation would use tuples as we've discussed here

The same syntax could possibly be used as indexes as well, so the
following would all be synonomous:

  namespace = 'someURI'
  dict[(namespace, 'localname')]

(The conflict of syntax with ranges is noted, some other special
character would likely need to be used.)

  -- Ken