forked from dr-leo/pandaSDMX
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from khaeru/feature/multiple-writers
Support multiple writers
- Loading branch information
Showing
22 changed files
with
613 additions
and
199 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from functools import lru_cache | ||
|
||
from lxml.etree import QName | ||
|
||
|
||
# XML Namespaces | ||
_base_ns = 'http://www.sdmx.org/resources/sdmxml/schemas/v2_1' | ||
NS = { | ||
'com': f'{_base_ns}/common', | ||
'data': f'{_base_ns}/data/structurespecific', | ||
'str': f'{_base_ns}/structure', | ||
'mes': f'{_base_ns}/message', | ||
'gen': f'{_base_ns}/data/generic', | ||
'footer': f'{_base_ns}/message/footer', | ||
'xml': 'http://www.w3.org/XML/1998/namespace', | ||
'xsi': 'http://www.w3.org/2001/XMLSchema-instance', | ||
} | ||
|
||
|
||
@lru_cache() | ||
def qname(ns, name): | ||
"""Return a fully-qualified tag *name* in namespace *ns*.""" | ||
return QName(NS[ns], name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.