Monday, November 08, 2010 at 12:05 AM.


on namespaceCollectDefinitions (adrmsg, adrelement) {
	<<Tue, May 9, 2000 at 1:46:02 AM by AR
		<<Check the element's attributes for namespace definitions and add them to the current scope
	local (adrtable = @adrmsg^.scopestack);
	if defined (adrelement^.["/atts"]) {
		local (adr, adrattributes = @adrelement^.["/atts"], adrstackframe = @adrtable^[sizeof (adrtable^)].namespaces, name);
		for adr in adrattributes {
			name = nameOf (adr^);
			if name == "xmlns" {
				adrstackframe^.xmlns = adr^;
			if name beginsWith "xmlns:" {
				adrstackframe^.[string.delete (name, 1, 6)] = adr^}}};

This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.