node-xml icon indicating copy to clipboard operation
node-xml copied to clipboard

No signalling of end-namespace-binding

Open laurie71 opened this issue 14 years ago • 0 comments

onStartElementNS() passes an array of namespace prefix/uri pairs, signalling the start of a namespace binding, but onEndElementNS() has no corresponding callback parameters to signal when namespace bindings go out of scope. This makes it necessary for API clients to implement a stack/counter pair to match end-element callbacks to start-element callbacks that introduced new namespace bindings, in order to correctly interpret common patterns of usage of prefixes on attribute names and within attribute values.

The recommended solution would be to add onStartNamespace and onEndNamespace callbacks, and remove/deprecate the 'namespaces' callback argument to onStartElementNS.

laurie71 avatar Feb 08 '11 09:02 laurie71