Back to index

plone3  3.1.7
utils.py
Go to the documentation of this file.
00001 
00002 
00003 def fixtag(tag, namespaces):
00004     """ returns the tag name seperated from the namespace uri
00005     as givein in {some.namespace}tag in elementtree"""
00006     
00007     # given a decorated tag (of the form {uri}tag), return prefixed
00008     # tag and namespace declaration, if any
00009 
00010     namespace_uri, tag = tag[1:].split( "}", 1)
00011     ns = namespaces.get(namespace_uri)
00012     return tag, ns