I've got a feature request to add namespaces to TeXML. Reasons are very strong, so I can't reject the proposal. Here is my answer:
I though about namespaces at the very beginning, and decided to avoid namespaces to simplify TeXML. The namespaces is a dark corner of XML technologies for many developers.
> the problem of trying to reconcile XML with a namespace and XML without a namespace.
Unbeatable point! Well, let assign a namespace URI for TeXML:
The namespace prefix is not important, but I think the best variant is "texml". So a TeXML document may look like this:
I don't want force user to use TeXML namespace, so I'm going to introduce modes of processing:
* namespace-aware, and
* no namespaces, as now.
About technical implementation. I'd like to update "glue_handler" in the file "handler.py": let handler "startElementNS" validates "uri" (it should be None or TeXML's URI), creates new attributes map as there are no namespaces (maybe it's not required, need to read documentation), and delegates processing to "startElement". The same is for "endElementNS".
I suppose all these actions slow down the conversion, so I'd like to enable namespaces feature only on demand (for example, "-ns" command line flag).
What do you think about it?