STIXProject/python-stix — pull request #186 by benjamin9999 (2014-09-02 17:50:39+00:00)
Title: Id/Idref QName Namespace Support (read-only)

(This pull request is more about receiving feedback -- I don't expect this to be merged as-is)

Here is (read-only) support for dereferencing the namespaces for id/idref QNames.

- top-level STIX object id's only
- read-only -- no path to send the id namespace back to the bindings or serialize them

The namespace is read from the nsmap when fetching id/idref, and returned as a (id,namespace) pair.

The high-level object makes this available as id_ns and idref_ns.

It also adds idref_ns as an __init__ parameter for the high-level objects because it's useful in our workflow -- however, it is only an in-memory value.

I can submit the matching patch for python-cybox, but it's the same pattern shown here.