SAX2: Namespace Processing and NSUtils helper class

Didier PH Martin martind at netfolder.com
Thu Dec 16 15:59:58 GMT 1999


Hi Steinar,

Steinar said:
My problem is that I don't see clearly how people are going to use
namespaces.  That's why I put a "Hm..." there.

I suspect that people are going to intermingle stuff from different
namespaces, in a way that'll make processing hard.

Will stuff from different namespaces always have the same semantics?
Or should I expect seperate processesing depending on the context?

Didier reply:
So, if I understand you well, you think that there is a high probability
that people will intermingle elements from different name spaces without
mentionning that they are own by a name space? Is it what you mean?

In that case, it will be harder to attach the processing of a particular
element with a document or event handler.

One possible algorith though:
a) All event handler are structured as a list.
b) each event handler receives the element for interpretation. If the
element is recognized then it is processed

here we may have a variant and a possible source of conflict:
a) if the handler recognize the element and process it, then the element
processing is ended. CON: the element could be part of a name space and then
processed. This element also contains an attribute  from an other name space
(ex: an xlink:type attribute) and therefore, the element is not processed by
the event handler attached to the element by the attribute.

b) the handler always go through the whole list. CON if two name space have
the same attribute, then it may be improperly processed by the wong event
handler.

Conclusion: yes, in the absence of architectural form in the XML world, if
people do not take the habit to mark their elements with the name space
identifier, it may bring some problems. People used to HTML will have
problems here. For them we increased the level of complexity. Sound like XML
is slowly becomming as complex as SGML :-)

Cheers
Didier PH Martin
mailto:martind at netfolder.com
http://www.netfolder.com


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo at ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)





More information about the Xml-dev mailing list