[asterisk-commits] testsuite: Address RLS test failures (testsuite[master])

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Jun 13 08:36:10 CDT 2015


Matt Jordan has submitted this change and it was merged.

Change subject: testsuite: Address RLS test failures
......................................................................


testsuite: Address RLS test failures

pyxb was reliant upon core xml functionality that was overridden on
our build agents by PyXML. Since the version of Twisted that the
build agents use relies upon PyXML, we can't simply discard that, so
we are unable to use pyxb on the build agents for the time being.
This patch replaces pyxb with generated code that uses lxml to parse
the XML instead.

ASTERISK-25144 #close
Reported by: Jonathan Rose

Change-Id: I17583e5da602853e2e1814df8c712a59c4bbb288
---
M lib/python/asterisk/pcap.py
M lib/python/rlmi.py
M tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/basic/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/multiple_resources_single_change/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/resubscription_interruption/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/single_resource_multiple_changes/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/termination_interruption/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/full_state/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/initial_notify/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/partial_state/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/resubscribe_full_state/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/termination_full_state/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/basic/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/multiple_resources_single_change/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/resubscription_interruption/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/single_resource_multiple_changes/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/termination_interruption/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/full_state/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/initial_notify/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/partial_state/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/resubscribe_full_state/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/termination_full_state/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/off_nominal/mwi/no_list_resources_exist/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/off_nominal/mwi/resource_duplication/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/off_nominal/mwi/some_list_resources_exist/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/off_nominal/presence/resource_duplication/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists/off_nominal/presence/some_list_resources_exist/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/batched/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/full_state_alice/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/full_state_carol/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/initial_notify/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/partial_state_alice/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/partial_state_carol/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/resubscribe_full_state/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/termination_full_state/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/batched/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/full_state_alice/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/full_state_carol/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/initial_notify/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/listception_initial_notify/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/partial_state_alice/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/partial_state_carol/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/resubscribe_full_state/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/termination_full_state/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/mwi/resource_duplication/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/mwi/shared_name_w_list_support/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/mwi/shared_name_wo_list_support/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/presence/resource_duplication/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/presence/shared_name_w_list_support/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/presence/shared_name_wo_list_support/test-config.yaml
M tests/channels/pjsip/subscriptions/rls/rls_integrity.py
51 files changed, 1,396 insertions(+), 368 deletions(-)

Approvals:
  Mark Michelson: Looks good to me, but someone else must approve
  Matt Jordan: Looks good to me, approved; Verified



diff --git a/lib/python/asterisk/pcap.py b/lib/python/asterisk/pcap.py
index e675699..2db2b9c 100644
--- a/lib/python/asterisk/pcap.py
+++ b/lib/python/asterisk/pcap.py
@@ -247,7 +247,7 @@
 
     def __init__(self, ascii_packet, raw_packet):
         Packet.__init__(self, packet_type="RLMI", raw_packet=raw_packet)
-        self.list_elem = rlmi.CreateFromDocument(ascii_packet.strip())
+        self.list_elem = rlmi.parseString(ascii_packet.strip(), silence=True)
 
 
 class MultipartPart:
diff --git a/lib/python/rlmi.py b/lib/python/rlmi.py
index 3165be2..5e662a0 100644
--- a/lib/python/rlmi.py
+++ b/lib/python/rlmi.py
@@ -1,378 +1,1404 @@
-# ./rlmi.py
+#!/usr/bin/env python
 # -*- coding: utf-8 -*-
-# PyXB bindings for NM:3e5578c8ec4c38e134207ce683adb060f503853f
-# Generated 2014-06-10 12:31:07.911934 by PyXB version 1.2.3
-# Namespace urn:ietf:params:xml:ns:rlmi
 
-import pyxb
-import pyxb.binding
-import pyxb.binding.saxer
-import io
-import pyxb.utils.utility
-import pyxb.utils.domutils
+#
+# Generated Thu Jun 11 14:54:19 2015 by generateDS.py version 2.16a.
+#
+# Command line options:
+#   ('-o', 'rlmi.py')
+#
+# Command line arguments:
+#   schema_doc.xml
+#
+# Command line:
+#   /usr/local/bin/generateDS.py -o "rlmi.py" schema_doc.xml
+#
+# Current working directory (os.getcwd()):
+#   rlmi_schema_gen
+#
+
 import sys
+import re as re_
+import base64
+import datetime as datetime_
+import warnings as warnings_
+from lxml import etree as etree_
 
-# Unique identifier for bindings created at the same time
-_GenerationUID = pyxb.utils.utility.UniqueIdentifier('urn:uuid:01af2fb6-f0c5-11e3-9594-00219b028e33')
 
-# Version of PyXB used to generate the bindings
-_PyXBVersion = '1.2.3'
-# Generated bindings are not compatible across PyXB versions
-if pyxb.__version__ != _PyXBVersion:
-    raise pyxb.PyXBVersionError(_PyXBVersion)
+Validate_simpletypes_ = True
 
-# Import bindings for namespaces imported into schema
-import pyxb.binding.xml_
-import pyxb.binding.datatypes
 
-# NOTE: All namespace declarations are reserved within the binding
-Namespace = pyxb.namespace.NamespaceForURI(u'urn:ietf:params:xml:ns:rlmi', create_if_missing=True)
-Namespace.configureCategories(['typeBinding', 'elementBinding'])
+def parsexml_(infile, parser=None, **kwargs):
+    if parser is None:
+        # Use the lxml ElementTree compatible parser so that, e.g.,
+        #   we ignore comments.
+        parser = etree_.ETCompatXMLParser()
+    doc = etree_.parse(infile, parser=parser, **kwargs)
+    return doc
 
+#
+# User methods
+#
+# Calls to the methods in these classes are generated by generateDS.py.
+# You can replace these methods by re-implementing the following class
+#   in a module named generatedssuper.py.
 
-def CreateFromDocument(xml_text, default_namespace=None, location_base=None):
-    """Parse the given XML and use the document element to create a
-    Python instance.
+try:
+    from generatedssuper import GeneratedsSuper
+except ImportError as exp:
 
-    @param xml_text An XML document.  This should be data (Python 2
-    str or Python 3 bytes), or a text (Python 2 unicode or Python 3
-    str) in the L{pyxb._InputEncoding} encoding.
+    class GeneratedsSuper(object):
+        tzoff_pattern = re_.compile(r'(\+|-)((0\d|1[0-3]):[0-5]\d|14:00)$')
+        class _FixedOffsetTZ(datetime_.tzinfo):
+            def __init__(self, offset, name):
+                self.__offset = datetime_.timedelta(minutes=offset)
+                self.__name = name
+            def utcoffset(self, dt):
+                return self.__offset
+            def tzname(self, dt):
+                return self.__name
+            def dst(self, dt):
+                return None
+        def gds_format_string(self, input_data, input_name=''):
+            return input_data
+        def gds_validate_string(self, input_data, node=None, input_name=''):
+            if not input_data:
+                return ''
+            else:
+                return input_data
+        def gds_format_base64(self, input_data, input_name=''):
+            return base64.b64encode(input_data)
+        def gds_validate_base64(self, input_data, node=None, input_name=''):
+            return input_data
+        def gds_format_integer(self, input_data, input_name=''):
+            return '%d' % input_data
+        def gds_validate_integer(self, input_data, node=None, input_name=''):
+            return input_data
+        def gds_format_integer_list(self, input_data, input_name=''):
+            return '%s' % ' '.join(input_data)
+        def gds_validate_integer_list(
+                self, input_data, node=None, input_name=''):
+            values = input_data.split()
+            for value in values:
+                try:
+                    int(value)
+                except (TypeError, ValueError):
+                    raise_parse_error(node, 'Requires sequence of integers')
+            return values
+        def gds_format_float(self, input_data, input_name=''):
+            return ('%.15f' % input_data).rstrip('0')
+        def gds_validate_float(self, input_data, node=None, input_name=''):
+            return input_data
+        def gds_format_float_list(self, input_data, input_name=''):
+            return '%s' % ' '.join(input_data)
+        def gds_validate_float_list(
+                self, input_data, node=None, input_name=''):
+            values = input_data.split()
+            for value in values:
+                try:
+                    float(value)
+                except (TypeError, ValueError):
+                    raise_parse_error(node, 'Requires sequence of floats')
+            return values
+        def gds_format_double(self, input_data, input_name=''):
+            return '%e' % input_data
+        def gds_validate_double(self, input_data, node=None, input_name=''):
+            return input_data
+        def gds_format_double_list(self, input_data, input_name=''):
+            return '%s' % ' '.join(input_data)
+        def gds_validate_double_list(
+                self, input_data, node=None, input_name=''):
+            values = input_data.split()
+            for value in values:
+                try:
+                    float(value)
+                except (TypeError, ValueError):
+                    raise_parse_error(node, 'Requires sequence of doubles')
+            return values
+        def gds_format_boolean(self, input_data, input_name=''):
+            return ('%s' % input_data).lower()
+        def gds_validate_boolean(self, input_data, node=None, input_name=''):
+            return input_data
+        def gds_format_boolean_list(self, input_data, input_name=''):
+            return '%s' % ' '.join(input_data)
+        def gds_validate_boolean_list(
+                self, input_data, node=None, input_name=''):
+            values = input_data.split()
+            for value in values:
+                if value not in ('true', '1', 'false', '0', ):
+                    raise_parse_error(
+                        node,
+                        'Requires sequence of booleans '
+                        '("true", "1", "false", "0")')
+            return values
+        def gds_validate_datetime(self, input_data, node=None, input_name=''):
+            return input_data
+        def gds_format_datetime(self, input_data, input_name=''):
+            if input_data.microsecond == 0:
+                _svalue = '%04d-%02d-%02dT%02d:%02d:%02d' % (
+                    input_data.year,
+                    input_data.month,
+                    input_data.day,
+                    input_data.hour,
+                    input_data.minute,
+                    input_data.second,
+                )
+            else:
+                _svalue = '%04d-%02d-%02dT%02d:%02d:%02d.%s' % (
+                    input_data.year,
+                    input_data.month,
+                    input_data.day,
+                    input_data.hour,
+                    input_data.minute,
+                    input_data.second,
+                    ('%f' % (float(input_data.microsecond) / 1000000))[2:],
+                )
+            if input_data.tzinfo is not None:
+                tzoff = input_data.tzinfo.utcoffset(input_data)
+                if tzoff is not None:
+                    total_seconds = tzoff.seconds + (86400 * tzoff.days)
+                    if total_seconds == 0:
+                        _svalue += 'Z'
+                    else:
+                        if total_seconds < 0:
+                            _svalue += '-'
+                            total_seconds *= -1
+                        else:
+                            _svalue += '+'
+                        hours = total_seconds // 3600
+                        minutes = (total_seconds - (hours * 3600)) // 60
+                        _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)
+            return _svalue
+        @classmethod
+        def gds_parse_datetime(cls, input_data):
+            tz = None
+            if input_data[-1] == 'Z':
+                tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
+                input_data = input_data[:-1]
+            else:
+                results = GeneratedsSuper.tzoff_pattern.search(input_data)
+                if results is not None:
+                    tzoff_parts = results.group(2).split(':')
+                    tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
+                    if results.group(1) == '-':
+                        tzoff *= -1
+                    tz = GeneratedsSuper._FixedOffsetTZ(
+                        tzoff, results.group(0))
+                    input_data = input_data[:-6]
+            time_parts = input_data.split('.')
+            if len(time_parts) > 1:
+                micro_seconds = int(float('0.' + time_parts[1]) * 1000000)
+                input_data = '%s.%s' % (time_parts[0], micro_seconds, )
+                dt = datetime_.datetime.strptime(
+                    input_data, '%Y-%m-%dT%H:%M:%S.%f')
+            else:
+                dt = datetime_.datetime.strptime(
+                    input_data, '%Y-%m-%dT%H:%M:%S')
+            dt = dt.replace(tzinfo=tz)
+            return dt
+        def gds_validate_date(self, input_data, node=None, input_name=''):
+            return input_data
+        def gds_format_date(self, input_data, input_name=''):
+            _svalue = '%04d-%02d-%02d' % (
+                input_data.year,
+                input_data.month,
+                input_data.day,
+            )
+            try:
+                if input_data.tzinfo is not None:
+                    tzoff = input_data.tzinfo.utcoffset(input_data)
+                    if tzoff is not None:
+                        total_seconds = tzoff.seconds + (86400 * tzoff.days)
+                        if total_seconds == 0:
+                            _svalue += 'Z'
+                        else:
+                            if total_seconds < 0:
+                                _svalue += '-'
+                                total_seconds *= -1
+                            else:
+                                _svalue += '+'
+                            hours = total_seconds // 3600
+                            minutes = (total_seconds - (hours * 3600)) // 60
+                            _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)
+            except AttributeError:
+                pass
+            return _svalue
+        @classmethod
+        def gds_parse_date(cls, input_data):
+            tz = None
+            if input_data[-1] == 'Z':
+                tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
+                input_data = input_data[:-1]
+            else:
+                results = GeneratedsSuper.tzoff_pattern.search(input_data)
+                if results is not None:
+                    tzoff_parts = results.group(2).split(':')
+                    tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
+                    if results.group(1) == '-':
+                        tzoff *= -1
+                    tz = GeneratedsSuper._FixedOffsetTZ(
+                        tzoff, results.group(0))
+                    input_data = input_data[:-6]
+            dt = datetime_.datetime.strptime(input_data, '%Y-%m-%d')
+            dt = dt.replace(tzinfo=tz)
+            return dt.date()
+        def gds_validate_time(self, input_data, node=None, input_name=''):
+            return input_data
+        def gds_format_time(self, input_data, input_name=''):
+            if input_data.microsecond == 0:
+                _svalue = '%02d:%02d:%02d' % (
+                    input_data.hour,
+                    input_data.minute,
+                    input_data.second,
+                )
+            else:
+                _svalue = '%02d:%02d:%02d.%s' % (
+                    input_data.hour,
+                    input_data.minute,
+                    input_data.second,
+                    ('%f' % (float(input_data.microsecond) / 1000000))[2:],
+                )
+            if input_data.tzinfo is not None:
+                tzoff = input_data.tzinfo.utcoffset(input_data)
+                if tzoff is not None:
+                    total_seconds = tzoff.seconds + (86400 * tzoff.days)
+                    if total_seconds == 0:
+                        _svalue += 'Z'
+                    else:
+                        if total_seconds < 0:
+                            _svalue += '-'
+                            total_seconds *= -1
+                        else:
+                            _svalue += '+'
+                        hours = total_seconds // 3600
+                        minutes = (total_seconds - (hours * 3600)) // 60
+                        _svalue += '{0:02d}:{1:02d}'.format(hours, minutes)
+            return _svalue
+        def gds_validate_simple_patterns(self, patterns, target):
+            # pat is a list of lists of strings/patterns.  We should:
+            # - AND the outer elements
+            # - OR the inner elements
+            found1 = True
+            for patterns1 in patterns:
+                found2 = False
+                for patterns2 in patterns1:
+                    if re_.search(patterns2, target) is not None:
+                        found2 = True
+                        break
+                if not found2:
+                    found1 = False
+                    break
+            return found1
+        @classmethod
+        def gds_parse_time(cls, input_data):
+            tz = None
+            if input_data[-1] == 'Z':
+                tz = GeneratedsSuper._FixedOffsetTZ(0, 'UTC')
+                input_data = input_data[:-1]
+            else:
+                results = GeneratedsSuper.tzoff_pattern.search(input_data)
+                if results is not None:
+                    tzoff_parts = results.group(2).split(':')
+                    tzoff = int(tzoff_parts[0]) * 60 + int(tzoff_parts[1])
+                    if results.group(1) == '-':
+                        tzoff *= -1
+                    tz = GeneratedsSuper._FixedOffsetTZ(
+                        tzoff, results.group(0))
+                    input_data = input_data[:-6]
+            if len(input_data.split('.')) > 1:
+                dt = datetime_.datetime.strptime(input_data, '%H:%M:%S.%f')
+            else:
+                dt = datetime_.datetime.strptime(input_data, '%H:%M:%S')
+            dt = dt.replace(tzinfo=tz)
+            return dt.time()
+        def gds_str_lower(self, instring):
+            return instring.lower()
+        def get_path_(self, node):
+            path_list = []
+            self.get_path_list_(node, path_list)
+            path_list.reverse()
+            path = '/'.join(path_list)
+            return path
+        Tag_strip_pattern_ = re_.compile(r'\{.*\}')
+        def get_path_list_(self, node, path_list):
+            if node is None:
+                return
+            tag = GeneratedsSuper.Tag_strip_pattern_.sub('', node.tag)
+            if tag:
+                path_list.append(tag)
+            self.get_path_list_(node.getparent(), path_list)
+        def get_class_obj_(self, node, default_class=None):
+            class_obj1 = default_class
+            if 'xsi' in node.nsmap:
+                classname = node.get('{%s}type' % node.nsmap['xsi'])
+                if classname is not None:
+                    names = classname.split(':')
+                    if len(names) == 2:
+                        classname = names[1]
+                    class_obj2 = globals().get(classname)
+                    if class_obj2 is not None:
+                        class_obj1 = class_obj2
+            return class_obj1
+        def gds_build_any(self, node, type_name=None):
+            return None
+        @classmethod
+        def gds_reverse_node_mapping(cls, mapping):
+            return dict(((v, k) for k, v in mapping.iteritems()))
 
-    @keyword default_namespace The L{pyxb.Namespace} instance to use as the
-    default namespace where there is no default namespace in scope.
-    If unspecified or C{None}, the namespace of the module containing
-    this function will be used.
 
-    @keyword location_base: An object to be recorded as the base of all
-    L{pyxb.utils.utility.Location} instances associated with events and
-    objects handled by the parser.  You might pass the URI from which
-    the document was obtained.
-    """
+#
+# If you have installed IPython you can uncomment and use the following.
+# IPython is available from http://ipython.scipy.org/.
+#
 
-    if pyxb.XMLStyle_saxer != pyxb._XMLStyle:
-        dom = pyxb.utils.domutils.StringToDOM(xml_text)
-        return CreateFromDOM(dom.documentElement)
-    if default_namespace is None:
-        default_namespace = Namespace.fallbackNamespace()
-    saxer = pyxb.binding.saxer.make_parser(fallback_namespace=default_namespace, location_base=location_base)
-    handler = saxer.getContentHandler()
-    xmld = xml_text
-    if isinstance(xmld, unicode):
-        xmld = xmld.encode(pyxb._InputEncoding)
-    saxer.parse(io.BytesIO(xmld))
-    instance = handler.rootObject()
-    return instance
+## from IPython.Shell import IPShellEmbed
+## args = ''
+## ipshell = IPShellEmbed(args,
+##     banner = 'Dropping into IPython',
+##     exit_msg = 'Leaving Interpreter, back to program.')
 
+# Then use the following line where and when you want to drop into the
+# IPython shell:
+#    ipshell('<some message> -- Entering ipshell.\nHit Ctrl-D to exit')
 
-def CreateFromDOM(node, default_namespace=None):
-    """Create a Python instance from the given DOM node.
-    The node tag must correspond to an element declaration in this module.
+#
+# Globals
+#
 
-    @deprecated: Forcing use of DOM interface is unnecessary; use L{CreateFromDocument}."""
-    if default_namespace is None:
-        default_namespace = Namespace.fallbackNamespace()
-    return pyxb.binding.basis.element.AnyCreateFromDOM(node, default_namespace)
+ExternalEncoding = 'ascii'
+Tag_pattern_ = re_.compile(r'({.*})?(.*)')
+String_cleanup_pat_ = re_.compile(r"[\n\r\s]+")
+Namespace_extract_pat_ = re_.compile(r'{(.*)}(.*)')
+CDATA_pattern_ = re_.compile(r"<!\[CDATA\[.*?\]\]>", re_.DOTALL)
 
+#
+# Support/utility functions.
+#
 
-# Atomic simple type: [anonymous]
-class STD_ANON(pyxb.binding.datatypes.string, pyxb.binding.basis.enumeration_mixin):
 
-    """An atomic simple type."""
+def showIndent(outfile, level, pretty_print=True):
+    if pretty_print:
+        for idx in range(level):
+            outfile.write('    ')
 
-    _ExpandedName = None
-    _XSDLocation = pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 44, 8)
-    _Documentation = None
-STD_ANON._CF_enumeration = pyxb.binding.facets.CF_enumeration(value_datatype=STD_ANON, enum_prefix=None)
-STD_ANON.active = STD_ANON._CF_enumeration.addEnumeration(unicode_value=u'active', tag=u'active')
-STD_ANON.pending = STD_ANON._CF_enumeration.addEnumeration(unicode_value=u'pending', tag=u'pending')
-STD_ANON.terminated = STD_ANON._CF_enumeration.addEnumeration(unicode_value=u'terminated', tag=u'terminated')
-STD_ANON._InitializeFacetMap(STD_ANON._CF_enumeration)
 
+def quote_xml(inStr):
+    "Escape markup chars, but do not modify CDATA sections."
+    if not inStr:
+        return ''
+    s1 = (isinstance(inStr, basestring) and inStr or
+          '%s' % inStr)
+    s2 = ''
+    pos = 0
+    matchobjects = CDATA_pattern_.finditer(s1)
+    for mo in matchobjects:
+        s3 = s1[pos:mo.start()]
+        s2 += quote_xml_aux(s3)
+        s2 += s1[mo.start():mo.end()]
+        pos = mo.end()
+    s3 = s1[pos:]
+    s2 += quote_xml_aux(s3)
+    return s2
 
-# Complex type [anonymous] with content type ELEMENT_ONLY
-class CTD_ANON(pyxb.binding.basis.complexTypeDefinition):
-    """Complex type [anonymous] with content type ELEMENT_ONLY"""
-    _TypeDefinition = None
-    _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY
-    _Abstract = False
-    _ExpandedName = None
-    _XSDLocation = pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 8, 4)
-    _ElementMap = {}
-    _AttributeMap = {}
-    # Base type is pyxb.binding.datatypes.anyType
 
-    # Element {urn:ietf:params:xml:ns:rlmi}resource uses Python identifier resource
-    __resource = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'resource'), 'resource', '__urnietfparamsxmlnsrlmi_CTD_ANON_urnietfparamsxmlnsrlmiresource', True, pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 24, 2), )
+def quote_xml_aux(inStr):
+    s1 = inStr.replace('&', '&')
+    s1 = s1.replace('<', '<')
+    s1 = s1.replace('>', '>')
+    return s1
 
-    resource = property(__resource.value, __resource.set, None, None)
 
-    # Element {urn:ietf:params:xml:ns:rlmi}name uses Python identifier name
-    __name = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'name'), 'name', '__urnietfparamsxmlnsrlmi_CTD_ANON_urnietfparamsxmlnsrlminame', True, pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 58, 2), )
+def quote_attrib(inStr):
+    s1 = (isinstance(inStr, basestring) and inStr or
+          '%s' % inStr)
+    s1 = s1.replace('&', '&')
+    s1 = s1.replace('<', '<')
+    s1 = s1.replace('>', '>')
+    if '"' in s1:
+        if "'" in s1:
+            s1 = '"%s"' % s1.replace('"', """)
+        else:
+            s1 = "'%s'" % s1
+    else:
+        s1 = '"%s"' % s1
+    return s1
 
-    name = property(__name.value, __name.set, None, None)
 
-    # Attribute uri uses Python identifier uri
-    __uri = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, u'uri'), 'uri', '__urnietfparamsxmlnsrlmi_CTD_ANON_uri', pyxb.binding.datatypes.anyURI, required=True)
-    __uri._DeclarationLocation = pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 15, 6)
-    __uri._UseLocation = pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 15, 6)
+def quote_python(inStr):
+    s1 = inStr
+    if s1.find("'") == -1:
+        if s1.find('\n') == -1:
+            return "'%s'" % s1
+        else:
+            return "'''%s'''" % s1
+    else:
+        if s1.find('"') != -1:
+            s1 = s1.replace('"', '\\"')
+        if s1.find('\n') == -1:
+            return '"%s"' % s1
+        else:
+            return '"""%s"""' % s1
 
-    uri = property(__uri.value, __uri.set, None, None)
 
-    # Attribute version uses Python identifier version
-    __version = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, u'version'), 'version', '__urnietfparamsxmlnsrlmi_CTD_ANON_version', pyxb.binding.datatypes.unsignedInt, required=True)
-    __version._DeclarationLocation = pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 16, 6)
-    __version._UseLocation = pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 16, 6)
+def get_all_text_(node):
+    if node.text is not None:
+        text = node.text
+    else:
+        text = ''
+    for child in node:
+        if child.tail is not None:
+            text += child.tail
+    return text
 
-    version = property(__version.value, __version.set, None, None)
 
-    # Attribute fullState uses Python identifier fullState
-    __fullState = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, u'fullState'), 'fullState', '__urnietfparamsxmlnsrlmi_CTD_ANON_fullState', pyxb.binding.datatypes.boolean, required=True)
-    __fullState._DeclarationLocation = pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 18, 6)
-    __fullState._UseLocation = pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 18, 6)
+def find_attr_value_(attr_name, node):
+    attrs = node.attrib
+    attr_parts = attr_name.split(':')
+    value = None
+    if len(attr_parts) == 1:
+        value = attrs.get(attr_name)
+    elif len(attr_parts) == 2:
+        prefix, name = attr_parts
+        namespace = node.nsmap.get(prefix)
+        if namespace is not None:
+            value = attrs.get('{%s}%s' % (namespace, name, ))
+    return value
 
-    fullState = property(__fullState.value, __fullState.set, None, None)
 
-    # Attribute cid uses Python identifier cid
-    __cid = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, u'cid'), 'cid', '__urnietfparamsxmlnsrlmi_CTD_ANON_cid', pyxb.binding.datatypes.string)
-    __cid._DeclarationLocation = pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 20, 6)
-    __cid._UseLocation = pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 20, 6)
+class GDSParseError(Exception):
+    pass
 
-    cid = property(__cid.value, __cid.set, None, None)
 
-    _AttributeWildcard = pyxb.binding.content.Wildcard(process_contents=pyxb.binding.content.Wildcard.PC_lax, namespace_constraint=pyxb.binding.content.Wildcard.NC_any)
-    _ElementMap.update({
-        __resource.name(): __resource,
-        __name.name(): __name
-    })
-    _AttributeMap.update({
-        __uri.name(): __uri,
-        __version.name(): __version,
-        __fullState.name(): __fullState,
-        __cid.name(): __cid
-    })
+def raise_parse_error(node, msg):
+    msg = '%s (element %s/line %d)' % (msg, node.tag, node.sourceline, )
+    raise GDSParseError(msg)
 
 
-# Complex type [anonymous] with content type ELEMENT_ONLY
-class CTD_ANON_(pyxb.binding.basis.complexTypeDefinition):
-    """Complex type [anonymous] with content type ELEMENT_ONLY"""
-    _TypeDefinition = None
-    _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY
-    _Abstract = False
-    _ExpandedName = None
-    _XSDLocation = pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 25, 4)
-    _ElementMap = {}
-    _AttributeMap = {}
-    # Base type is pyxb.binding.datatypes.anyType
+class MixedContainer:
+    # Constants for category:
+    CategoryNone = 0
+    CategoryText = 1
+    CategorySimple = 2
+    CategoryComplex = 3
+    # Constants for content_type:
+    TypeNone = 0
+    TypeText = 1
+    TypeString = 2
+    TypeInteger = 3
+    TypeFloat = 4
+    TypeDecimal = 5
+    TypeDouble = 6
+    TypeBoolean = 7
+    TypeBase64 = 8
+    def __init__(self, category, content_type, name, value):
+        self.category = category
+        self.content_type = content_type
+        self.name = name
+        self.value = value
+    def getCategory(self):
+        return self.category
+    def getContenttype(self, content_type):
+        return self.content_type
+    def getValue(self):
+        return self.value
+    def getName(self):
+        return self.name
+    def export(self, outfile, level, name, namespace, pretty_print=True):
+        if self.category == MixedContainer.CategoryText:
+            # Prevent exporting empty content as empty lines.
+            if self.value.strip():
+                outfile.write(self.value)
+        elif self.category == MixedContainer.CategorySimple:
+            self.exportSimple(outfile, level, name)
+        else:    # category == MixedContainer.CategoryComplex
+            self.value.export(outfile, level, namespace, name, pretty_print)
+    def exportSimple(self, outfile, level, name):
+        if self.content_type == MixedContainer.TypeString:
+            outfile.write('<%s>%s</%s>' % (
+                self.name, self.value, self.name))
+        elif self.content_type == MixedContainer.TypeInteger or \
+                self.content_type == MixedContainer.TypeBoolean:
+            outfile.write('<%s>%d</%s>' % (
+                self.name, self.value, self.name))
+        elif self.content_type == MixedContainer.TypeFloat or \
+                self.content_type == MixedContainer.TypeDecimal:
+            outfile.write('<%s>%f</%s>' % (
+                self.name, self.value, self.name))
+        elif self.content_type == MixedContainer.TypeDouble:
+            outfile.write('<%s>%g</%s>' % (
+                self.name, self.value, self.name))
+        elif self.content_type == MixedContainer.TypeBase64:
+            outfile.write('<%s>%s</%s>' % (
+                self.name, base64.b64encode(self.value), self.name))
+    def to_etree(self, element):
+        if self.category == MixedContainer.CategoryText:
+            # Prevent exporting empty content as empty lines.
+            if self.value.strip():
+                if len(element) > 0:
+                    if element[-1].tail is None:
+                        element[-1].tail = self.value
+                    else:
+                        element[-1].tail += self.value
+                else:
+                    if element.text is None:
+                        element.text = self.value
+                    else:
+                        element.text += self.value
+        elif self.category == MixedContainer.CategorySimple:
+            subelement = etree_.SubElement(element, '%s' % self.name)
+            subelement.text = self.to_etree_simple()
+        else:    # category == MixedContainer.CategoryComplex
+            self.value.to_etree(element)
+    def to_etree_simple(self):
+        if self.content_type == MixedContainer.TypeString:
+            text = self.value
+        elif (self.content_type == MixedContainer.TypeInteger or
+                self.content_type == MixedContainer.TypeBoolean):
+            text = '%d' % self.value
+        elif (self.content_type == MixedContainer.TypeFloat or
+                self.content_type == MixedContainer.TypeDecimal):
+            text = '%f' % self.value
+        elif self.content_type == MixedContainer.TypeDouble:
+            text = '%g' % self.value
+        elif self.content_type == MixedContainer.TypeBase64:
+            text = '%s' % base64.b64encode(self.value)
+        return text
+    def exportLiteral(self, outfile, level, name):
+        if self.category == MixedContainer.CategoryText:
+            showIndent(outfile, level)
+            outfile.write(
+                'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (
+                    self.category, self.content_type, self.name, self.value))
+        elif self.category == MixedContainer.CategorySimple:
+            showIndent(outfile, level)
+            outfile.write(
+                'model_.MixedContainer(%d, %d, "%s", "%s"),\n' % (
+                    self.category, self.content_type, self.name, self.value))
+        else:    # category == MixedContainer.CategoryComplex
+            showIndent(outfile, level)
+            outfile.write(
+                'model_.MixedContainer(%d, %d, "%s",\n' % (
+                    self.category, self.content_type, self.name,))
+            self.value.exportLiteral(outfile, level + 1)
+            showIndent(outfile, level)
+            outfile.write(')\n')
 
-    # Element {urn:ietf:params:xml:ns:rlmi}instance uses Python identifier instance
-    __instance = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'instance'), 'instance', '__urnietfparamsxmlnsrlmi_CTD_ANON__urnietfparamsxmlnsrlmiinstance', True, pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 36, 2), )
 
-    instance = property(__instance.value, __instance.set, None, None)
+class MemberSpec_(object):
+    def __init__(self, name='', data_type='', container=0):
+        self.name = name
+        self.data_type = data_type
+        self.container = container
+    def set_name(self, name): self.name = name
+    def get_name(self): return self.name
+    def set_data_type(self, data_type): self.data_type = data_type
+    def get_data_type_chain(self): return self.data_type
+    def get_data_type(self):
+        if isinstance(self.data_type, list):
+            if len(self.data_type) > 0:
+                return self.data_type[-1]
+            else:
+                return 'xs:string'
+        else:
+            return self.data_type
+    def set_container(self, container): self.container = container
+    def get_container(self): return self.container
 
-    # Element {urn:ietf:params:xml:ns:rlmi}name uses Python identifier name
-    __name = pyxb.binding.content.ElementDeclaration(pyxb.namespace.ExpandedName(Namespace, u'name'), 'name', '__urnietfparamsxmlnsrlmi_CTD_ANON__urnietfparamsxmlnsrlminame', True, pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 58, 2), )
 
-    name = property(__name.value, __name.set, None, None)
+def _cast(typ, value):
+    if typ is None or value is None:
+        return value
+    return typ(value)
 
-    # Attribute uri uses Python identifier uri
-    __uri = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, u'uri'), 'uri', '__urnietfparamsxmlnsrlmi_CTD_ANON__uri', pyxb.binding.datatypes.anyURI, required=True)
-    __uri._DeclarationLocation = pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 32, 6)
-    __uri._UseLocation = pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 32, 6)
+#
+# Data representation classes.
+#
 
-    uri = property(__uri.value, __uri.set, None, None)
 
-    _AttributeWildcard = pyxb.binding.content.Wildcard(process_contents=pyxb.binding.content.Wildcard.PC_lax, namespace_constraint=pyxb.binding.content.Wildcard.NC_any)
-    _ElementMap.update({
-        __instance.name(): __instance,
-        __name.name(): __name
-    })
-    _AttributeMap.update({
-        __uri.name(): __uri
-    })
-
-
-# Complex type [anonymous] with content type SIMPLE
-class CTD_ANON_2(pyxb.binding.basis.complexTypeDefinition):
-    """Complex type [anonymous] with content type SIMPLE"""
-    _TypeDefinition = pyxb.binding.datatypes.string
-    _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_SIMPLE
-    _Abstract = False
-    _ExpandedName = None
-    _XSDLocation = pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 59, 4)
-    _ElementMap = {}
-    _AttributeMap = {}
-    # Base type is pyxb.binding.datatypes.string
-
-    # Attribute {http://www.w3.org/XML/1998/namespace}lang uses Python identifier lang
-    __lang = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(pyxb.namespace.XML, 'lang'), 'lang', '__urnietfparamsxmlnsrlmi_CTD_ANON_2_httpwww_w3_orgXML1998namespacelang', pyxb.binding.xml_.STD_ANON_lang)
-    __lang._DeclarationLocation = None
-    __lang._UseLocation = pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 62, 10)
-
-    lang = property(__lang.value, __lang.set, None, None)
-
-    _ElementMap.update({
-    })
-    _AttributeMap.update({
-        __lang.name(): __lang
-    })
-
+class list(GeneratedsSuper):
+    subclass = None
+    superclass = None
+    def __init__(self, fullState=None, version=None, uri=None, cid=None, name=None, resource=None):
+        self.original_tagname_ = None
+        self.fullState = _cast(bool, fullState)
+        self.version = _cast(int, version)
+        self.uri = _cast(None, uri)
+        self.cid = _cast(None, cid)
+        if name is None:
+            self.name = []
+        else:
+            self.name = name
+        if resource is None:
+            self.resource = []
+        else:
+            self.resource = resource
+        self.anyAttributes_ = {}
+    def factory(*args_, **kwargs_):
+        if list.subclass:
+            return list.subclass(*args_, **kwargs_)
+        else:
+            return list(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def add_name(self, value): self.name.append(value)
+    def insert_name_at(self, index, value): self.name.insert(index, value)
+    def replace_name_at(self, index, value): self.name[index] = value
+    def get_resource(self): return self.resource
+    def set_resource(self, resource): self.resource = resource
+    def add_resource(self, value): self.resource.append(value)
+    def insert_resource_at(self, index, value): self.resource.insert(index, value)
+    def replace_resource_at(self, index, value): self.resource[index] = value
+    def get_fullState(self): return self.fullState
+    def set_fullState(self, fullState): self.fullState = fullState
+    def get_version(self): return self.version
+    def set_version(self, version): self.version = version
+    def get_uri(self): return self.uri
+    def set_uri(self, uri): self.uri = uri
+    def get_cid(self): return self.cid
+    def set_cid(self, cid): self.cid = cid
+    def get_anyAttributes_(self): return self.anyAttributes_
+    def set_anyAttributes_(self, anyAttributes_): self.anyAttributes_ = anyAttributes_
+    def hasContent_(self):
+        if (
+            self.name or
+            self.resource
+        ):
+            return True
+        else:
+            return False
+    def export(self, outfile, level, namespace_='', name_='list', namespacedef_='', pretty_print=True):
+        if pretty_print:
+            eol_ = '\n'
+        else:
+            eol_ = ''
+        if self.original_tagname_ is not None:
+            name_ = self.original_tagname_
+        showIndent(outfile, level, pretty_print)
+        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+        already_processed = set()
+        self.exportAttributes(outfile, level, already_processed, namespace_, name_='list')
+        if self.hasContent_():
+            outfile.write('>%s' % (eol_, ))
+            self.exportChildren(outfile, level + 1, namespace_='', name_='list', pretty_print=pretty_print)
+            showIndent(outfile, level, pretty_print)
+            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
+        else:
+            outfile.write('/>%s' % (eol_, ))
+    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='list'):
+        unique_counter = 0
+        for name, value in self.anyAttributes_.items():
+            xsinamespaceprefix = 'xsi'
+            xsinamespace1 = 'http://www.w3.org/2001/XMLSchema-instance'
+            xsinamespace2 = '{%s}' % (xsinamespace1, )
+            if name.startswith(xsinamespace2):
+                name1 = name[len(xsinamespace2):]
+                name2 = '%s:%s' % (xsinamespaceprefix, name1, )
+                if name2 not in already_processed:
+                    already_processed.add(name2)
+                    outfile.write(' %s=%s' % (name2, quote_attrib(value), ))
+            else:
+                mo = re_.match(Namespace_extract_pat_, name)
+                if mo is not None:
+                    namespace, name = mo.group(1, 2)
+                    if name not in already_processed:
+                        already_processed.add(name)
+                        if namespace == 'http://www.w3.org/XML/1998/namespace':
+                            outfile.write(' %s=%s' % (
+                                name, quote_attrib(value), ))
+                        else:
+                            unique_counter += 1
+                            outfile.write(' xmlns:yyy%d="%s"' % (
+                                unique_counter, namespace, ))
+                            outfile.write(' yyy%d:%s=%s' % (
+                                unique_counter, name, quote_attrib(value), ))
+                else:
+                    if name not in already_processed:
+                        already_processed.add(name)
+                        outfile.write(' %s=%s' % (
+                            name, quote_attrib(value), ))
+        if self.fullState is not None and 'fullState' not in already_processed:
+            already_processed.add('fullState')
+            outfile.write(' fullState="%s"' % self.gds_format_boolean(self.fullState, input_name='fullState'))
+        if self.version is not None and 'version' not in already_processed:
+            already_processed.add('version')
+            outfile.write(' version="%s"' % self.gds_format_integer(self.version, input_name='version'))
+        if self.uri is not None and 'uri' not in already_processed:
+            already_processed.add('uri')
+            outfile.write(' uri=%s' % (self.gds_format_string(quote_attrib(self.uri).encode(ExternalEncoding), input_name='uri'), ))
+        if self.cid is not None and 'cid' not in already_processed:
+            already_processed.add('cid')
+            outfile.write(' cid=%s' % (self.gds_format_string(quote_attrib(self.cid).encode(ExternalEncoding), input_name='cid'), ))
+    def exportChildren(self, outfile, level, namespace_='', name_='list', fromsubclass_=False, pretty_print=True):
+        if pretty_print:
+            eol_ = '\n'
+        else:
+            eol_ = ''
+        for name_ in self.name:
+            name_.export(outfile, level, namespace_, name_='name', pretty_print=pretty_print)
+        for resource_ in self.resource:
+            resource_.export(outfile, level, namespace_, name_='resource', pretty_print=pretty_print)
+    def exportLiteral(self, outfile, level, name_='list'):
+        level += 1
+        already_processed = set()
+        self.exportLiteralAttributes(outfile, level, already_processed, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
+        if self.fullState is not None and 'fullState' not in already_processed:
+            already_processed.add('fullState')
+            showIndent(outfile, level)
+            outfile.write('fullState=%s,\n' % (self.fullState,))
+        if self.version is not None and 'version' not in already_processed:
+            already_processed.add('version')
+            showIndent(outfile, level)
+            outfile.write('version=%d,\n' % (self.version,))
+        if self.uri is not None and 'uri' not in already_processed:
+            already_processed.add('uri')
+            showIndent(outfile, level)
+            outfile.write('uri="%s",\n' % (self.uri,))
+        if self.cid is not None and 'cid' not in already_processed:
+            already_processed.add('cid')
+            showIndent(outfile, level)
+            outfile.write('cid="%s",\n' % (self.cid,))
+        for name, value in self.anyAttributes_.items():
+            showIndent(outfile, level)
+            outfile.write('%s="%s",\n' % (name, value,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('name=[\n')
+        level += 1
+        for name_ in self.name:
+            showIndent(outfile, level)
+            outfile.write('model_.name(\n')
+            name_.exportLiteral(outfile, level)
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        level -= 1
+        showIndent(outfile, level)
+        outfile.write('],\n')
+        showIndent(outfile, level)
+        outfile.write('resource=[\n')
+        level += 1
+        for resource_ in self.resource:
+            showIndent(outfile, level)
+            outfile.write('model_.resource(\n')
+            resource_.exportLiteral(outfile, level)
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        level -= 1
+        showIndent(outfile, level)
+        outfile.write('],\n')
+    def build(self, node):
+        already_processed = set()
+        self.buildAttributes(node, node.attrib, already_processed)
+        for child in node:
+            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+            self.buildChildren(child, node, nodeName_)
+        return self
+    def buildAttributes(self, node, attrs, already_processed):
+        value = find_attr_value_('fullState', node)
+        if value is not None and 'fullState' not in already_processed:
+            already_processed.add('fullState')
+            if value in ('true', '1'):
+                self.fullState = True
+            elif value in ('false', '0'):
+                self.fullState = False
+            else:
+                raise_parse_error(node, 'Bad boolean attribute')
+        value = find_attr_value_('version', node)
+        if value is not None and 'version' not in already_processed:
+            already_processed.add('version')
+            try:
+                self.version = int(value)
+            except ValueError as exp:
+                raise_parse_error(node, 'Bad integer attribute: %s' % exp)
+        value = find_attr_value_('uri', node)
+        if value is not None and 'uri' not in already_processed:
+            already_processed.add('uri')
+            self.uri = value
+        value = find_attr_value_('cid', node)
+        if value is not None and 'cid' not in already_processed:
+            already_processed.add('cid')
+            self.cid = value
+        self.anyAttributes_ = {}
+        for name, value in attrs.items():
+            if name not in already_processed:
+                self.anyAttributes_[name] = value
+    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
+        if nodeName_ == 'name':
+            obj_ = name.factory()
+            obj_.build(child_)
+            self.name.append(obj_)
+            obj_.original_tagname_ = 'name'
+        elif nodeName_ == 'resource':
+            obj_ = resource.factory()
+            obj_.build(child_)
+            self.resource.append(obj_)
+            obj_.original_tagname_ = 'resource'
+# end class list
 
-# Complex type [anonymous] with content type ELEMENT_ONLY
-class CTD_ANON_3(pyxb.binding.basis.complexTypeDefinition):
-    """Complex type [anonymous] with content type ELEMENT_ONLY"""
-    _TypeDefinition = None
-    _ContentTypeTag = pyxb.binding.basis.complexTypeDefinition._CT_ELEMENT_ONLY
-    _Abstract = False
-    _ExpandedName = None
-    _XSDLocation = pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 37, 4)
-    _ElementMap = {}
-    _AttributeMap = {}
-    # Base type is pyxb.binding.datatypes.anyType
 
-    # Attribute id uses Python identifier id
-    __id = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, u'id'), 'id', '__urnietfparamsxmlnsrlmi_CTD_ANON_3_id', pyxb.binding.datatypes.string, required=True)
-    __id._DeclarationLocation = pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 42, 6)
-    __id._UseLocation = pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 42, 6)
+class resource(GeneratedsSuper):
+    subclass = None
+    superclass = None
+    def __init__(self, uri=None, name=None, instance=None):
+        self.original_tagname_ = None
+        self.uri = _cast(None, uri)
+        if name is None:
+            self.name = []
+        else:
+            self.name = name
+        if instance is None:
+            self.instance = []
+        else:
+            self.instance = instance
+        self.anyAttributes_ = {}
+    def factory(*args_, **kwargs_):
+        if resource.subclass:
+            return resource.subclass(*args_, **kwargs_)
+        else:
+            return resource(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_name(self): return self.name
+    def set_name(self, name): self.name = name
+    def add_name(self, value): self.name.append(value)
+    def insert_name_at(self, index, value): self.name.insert(index, value)
+    def replace_name_at(self, index, value): self.name[index] = value
+    def get_instance(self): return self.instance
+    def set_instance(self, instance): self.instance = instance
+    def add_instance(self, value): self.instance.append(value)
+    def insert_instance_at(self, index, value): self.instance.insert(index, value)
+    def replace_instance_at(self, index, value): self.instance[index] = value
+    def get_uri(self): return self.uri
+    def set_uri(self, uri): self.uri = uri
+    def get_anyAttributes_(self): return self.anyAttributes_
+    def set_anyAttributes_(self, anyAttributes_): self.anyAttributes_ = anyAttributes_
+    def hasContent_(self):
+        if (
+            self.name or
+            self.instance
+        ):
+            return True
+        else:
+            return False
+    def export(self, outfile, level, namespace_='', name_='resource', namespacedef_='', pretty_print=True):
+        if pretty_print:
+            eol_ = '\n'
+        else:
+            eol_ = ''
+        if self.original_tagname_ is not None:
+            name_ = self.original_tagname_
+        showIndent(outfile, level, pretty_print)
+        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+        already_processed = set()
+        self.exportAttributes(outfile, level, already_processed, namespace_, name_='resource')
+        if self.hasContent_():
+            outfile.write('>%s' % (eol_, ))
+            self.exportChildren(outfile, level + 1, namespace_='', name_='resource', pretty_print=pretty_print)
+            showIndent(outfile, level, pretty_print)
+            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
+        else:
+            outfile.write('/>%s' % (eol_, ))
+    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='resource'):
+        unique_counter = 0
+        for name, value in self.anyAttributes_.items():
+            xsinamespaceprefix = 'xsi'
+            xsinamespace1 = 'http://www.w3.org/2001/XMLSchema-instance'
+            xsinamespace2 = '{%s}' % (xsinamespace1, )
+            if name.startswith(xsinamespace2):
+                name1 = name[len(xsinamespace2):]
+                name2 = '%s:%s' % (xsinamespaceprefix, name1, )
+                if name2 not in already_processed:
+                    already_processed.add(name2)
+                    outfile.write(' %s=%s' % (name2, quote_attrib(value), ))
+            else:
+                mo = re_.match(Namespace_extract_pat_, name)
+                if mo is not None:
+                    namespace, name = mo.group(1, 2)
+                    if name not in already_processed:
+                        already_processed.add(name)
+                        if namespace == 'http://www.w3.org/XML/1998/namespace':
+                            outfile.write(' %s=%s' % (
+                                name, quote_attrib(value), ))
+                        else:
+                            unique_counter += 1
+                            outfile.write(' xmlns:yyy%d="%s"' % (
+                                unique_counter, namespace, ))
+                            outfile.write(' yyy%d:%s=%s' % (
+                                unique_counter, name, quote_attrib(value), ))
+                else:
+                    if name not in already_processed:
+                        already_processed.add(name)
+                        outfile.write(' %s=%s' % (
+                            name, quote_attrib(value), ))
+        if self.uri is not None and 'uri' not in already_processed:
+            already_processed.add('uri')
+            outfile.write(' uri=%s' % (self.gds_format_string(quote_attrib(self.uri).encode(ExternalEncoding), input_name='uri'), ))
+    def exportChildren(self, outfile, level, namespace_='', name_='resource', fromsubclass_=False, pretty_print=True):
+        if pretty_print:
+            eol_ = '\n'
+        else:
+            eol_ = ''
+        for name_ in self.name:
+            name_.export(outfile, level, namespace_, name_='name', pretty_print=pretty_print)
+        for instance_ in self.instance:
+            instance_.export(outfile, level, namespace_, name_='instance', pretty_print=pretty_print)
+    def exportLiteral(self, outfile, level, name_='resource'):
+        level += 1
+        already_processed = set()
+        self.exportLiteralAttributes(outfile, level, already_processed, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
+        if self.uri is not None and 'uri' not in already_processed:
+            already_processed.add('uri')
+            showIndent(outfile, level)
+            outfile.write('uri="%s",\n' % (self.uri,))
+        for name, value in self.anyAttributes_.items():
+            showIndent(outfile, level)
+            outfile.write('%s="%s",\n' % (name, value,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('name=[\n')
+        level += 1
+        for name_ in self.name:
+            showIndent(outfile, level)
+            outfile.write('model_.name(\n')
+            name_.exportLiteral(outfile, level)
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        level -= 1
+        showIndent(outfile, level)
+        outfile.write('],\n')
+        showIndent(outfile, level)
+        outfile.write('instance=[\n')
+        level += 1
+        for instance_ in self.instance:
+            showIndent(outfile, level)
+            outfile.write('model_.instance(\n')
+            instance_.exportLiteral(outfile, level)
+            showIndent(outfile, level)
+            outfile.write('),\n')
+        level -= 1
+        showIndent(outfile, level)
+        outfile.write('],\n')
+    def build(self, node):
+        already_processed = set()
+        self.buildAttributes(node, node.attrib, already_processed)
+        for child in node:
+            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+            self.buildChildren(child, node, nodeName_)
+        return self
+    def buildAttributes(self, node, attrs, already_processed):
+        value = find_attr_value_('uri', node)
+        if value is not None and 'uri' not in already_processed:
+            already_processed.add('uri')
+            self.uri = value
+        self.anyAttributes_ = {}
+        for name, value in attrs.items():
+            if name not in already_processed:
+                self.anyAttributes_[name] = value
+    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
+        if nodeName_ == 'name':
+            obj_ = name.factory()
+            obj_.build(child_)
+            self.name.append(obj_)
+            obj_.original_tagname_ = 'name'
+        elif nodeName_ == 'instance':
+            obj_ = instance.factory()
+            obj_.build(child_)
+            self.instance.append(obj_)
+            obj_.original_tagname_ = 'instance'
+# end class resource
 
-    id = property(__id.value, __id.set, None, None)
 
-    # Attribute state uses Python identifier state
-    __state = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, u'state'), 'state', '__urnietfparamsxmlnsrlmi_CTD_ANON_3_state', STD_ANON, required=True)
-    __state._DeclarationLocation = pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 43, 6)
-    __state._UseLocation = pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 43, 6)
+class instance(GeneratedsSuper):
+    subclass = None
+    superclass = None
+    def __init__(self, reason=None, state=None, id=None, cid=None, anytypeobjs_=None):
+        self.original_tagname_ = None
+        self.reason = _cast(None, reason)
+        self.state = _cast(None, state)
+        self.id = _cast(None, id)
+        self.cid = _cast(None, cid)
+        if anytypeobjs_ is None:
+            self.anytypeobjs_ = []
+        else:
+            self.anytypeobjs_ = anytypeobjs_
+        self.anyAttributes_ = {}
+    def factory(*args_, **kwargs_):
+        if instance.subclass:
+            return instance.subclass(*args_, **kwargs_)
+        else:
+            return instance(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_anytypeobjs_(self): return self.anytypeobjs_
+    def set_anytypeobjs_(self, anytypeobjs_): self.anytypeobjs_ = anytypeobjs_
+    def add_anytypeobjs_(self, value): self.anytypeobjs_.append(value)
+    def insert_anytypeobjs_(self, index, value): self._anytypeobjs_[index] = value
+    def get_reason(self): return self.reason
+    def set_reason(self, reason): self.reason = reason
+    def get_state(self): return self.state
+    def set_state(self, state): self.state = state
+    def get_id(self): return self.id
+    def set_id(self, id): self.id = id
+    def get_cid(self): return self.cid
+    def set_cid(self, cid): self.cid = cid
+    def get_anyAttributes_(self): return self.anyAttributes_
+    def set_anyAttributes_(self, anyAttributes_): self.anyAttributes_ = anyAttributes_
+    def hasContent_(self):
+        if (
+            self.anytypeobjs_
+        ):
+            return True
+        else:
+            return False
+    def export(self, outfile, level, namespace_='', name_='instance', namespacedef_='', pretty_print=True):
+        if pretty_print:
+            eol_ = '\n'
+        else:
+            eol_ = ''
+        if self.original_tagname_ is not None:
+            name_ = self.original_tagname_
+        showIndent(outfile, level, pretty_print)
+        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+        already_processed = set()
+        self.exportAttributes(outfile, level, already_processed, namespace_, name_='instance')
+        if self.hasContent_():
+            outfile.write('>%s' % (eol_, ))
+            self.exportChildren(outfile, level + 1, namespace_='', name_='instance', pretty_print=pretty_print)
+            showIndent(outfile, level, pretty_print)
+            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
+        else:
+            outfile.write('/>%s' % (eol_, ))
+    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='instance'):
+        unique_counter = 0
+        for name, value in self.anyAttributes_.items():
+            xsinamespaceprefix = 'xsi'
+            xsinamespace1 = 'http://www.w3.org/2001/XMLSchema-instance'
+            xsinamespace2 = '{%s}' % (xsinamespace1, )
+            if name.startswith(xsinamespace2):
+                name1 = name[len(xsinamespace2):]
+                name2 = '%s:%s' % (xsinamespaceprefix, name1, )
+                if name2 not in already_processed:
+                    already_processed.add(name2)
+                    outfile.write(' %s=%s' % (name2, quote_attrib(value), ))
+            else:
+                mo = re_.match(Namespace_extract_pat_, name)
+                if mo is not None:
+                    namespace, name = mo.group(1, 2)
+                    if name not in already_processed:
+                        already_processed.add(name)
+                        if namespace == 'http://www.w3.org/XML/1998/namespace':
+                            outfile.write(' %s=%s' % (
+                                name, quote_attrib(value), ))
+                        else:
+                            unique_counter += 1
+                            outfile.write(' xmlns:yyy%d="%s"' % (
+                                unique_counter, namespace, ))
+                            outfile.write(' yyy%d:%s=%s' % (
+                                unique_counter, name, quote_attrib(value), ))
+                else:
+                    if name not in already_processed:
+                        already_processed.add(name)
+                        outfile.write(' %s=%s' % (
+                            name, quote_attrib(value), ))
+        if self.reason is not None and 'reason' not in already_processed:
+            already_processed.add('reason')
+            outfile.write(' reason=%s' % (self.gds_format_string(quote_attrib(self.reason).encode(ExternalEncoding), input_name='reason'), ))
+        if self.state is not None and 'state' not in already_processed:
+            already_processed.add('state')
+            outfile.write(' state=%s' % (self.gds_format_string(quote_attrib(self.state).encode(ExternalEncoding), input_name='state'), ))
+        if self.id is not None and 'id' not in already_processed:
+            already_processed.add('id')
+            outfile.write(' id=%s' % (self.gds_format_string(quote_attrib(self.id).encode(ExternalEncoding), input_name='id'), ))
+        if self.cid is not None and 'cid' not in already_processed:
+            already_processed.add('cid')
+            outfile.write(' cid=%s' % (self.gds_format_string(quote_attrib(self.cid).encode(ExternalEncoding), input_name='cid'), ))
+    def exportChildren(self, outfile, level, namespace_='', name_='instance', fromsubclass_=False, pretty_print=True):
+        if pretty_print:
+            eol_ = '\n'
+        else:
+            eol_ = ''
+        for obj_ in self.anytypeobjs_:
+            obj_.export(outfile, level, namespace_, pretty_print=pretty_print)
+    def exportLiteral(self, outfile, level, name_='instance'):
+        level += 1
+        already_processed = set()
+        self.exportLiteralAttributes(outfile, level, already_processed, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
+        if self.reason is not None and 'reason' not in already_processed:
+            already_processed.add('reason')
+            showIndent(outfile, level)
+            outfile.write('reason="%s",\n' % (self.reason,))
+        if self.state is not None and 'state' not in already_processed:
+            already_processed.add('state')
+            showIndent(outfile, level)
+            outfile.write('state="%s",\n' % (self.state,))
+        if self.id is not None and 'id' not in already_processed:
+            already_processed.add('id')
+            showIndent(outfile, level)
+            outfile.write('id="%s",\n' % (self.id,))
+        if self.cid is not None and 'cid' not in already_processed:
+            already_processed.add('cid')
+            showIndent(outfile, level)
+            outfile.write('cid="%s",\n' % (self.cid,))
+        for name, value in self.anyAttributes_.items():
+            showIndent(outfile, level)
+            outfile.write('%s="%s",\n' % (name, value,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        showIndent(outfile, level)
+        outfile.write('anytypeobjs_=[\n')
+        level += 1
+        for anytypeobjs_ in self.anytypeobjs_:
+            anytypeobjs_.exportLiteral(outfile, level)
+        level -= 1
+        showIndent(outfile, level)
+        outfile.write('],\n')
+    def build(self, node):
+        already_processed = set()
+        self.buildAttributes(node, node.attrib, already_processed)
+        for child in node:
+            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+            self.buildChildren(child, node, nodeName_)
+        return self
+    def buildAttributes(self, node, attrs, already_processed):
+        value = find_attr_value_('reason', node)
+        if value is not None and 'reason' not in already_processed:
+            already_processed.add('reason')
+            self.reason = value
+        value = find_attr_value_('state', node)
+        if value is not None and 'state' not in already_processed:
+            already_processed.add('state')
+            self.state = value
+        value = find_attr_value_('id', node)
+        if value is not None and 'id' not in already_processed:
+            already_processed.add('id')
+            self.id = value
+        value = find_attr_value_('cid', node)
+        if value is not None and 'cid' not in already_processed:
+            already_processed.add('cid')
+            self.cid = value
+        self.anyAttributes_ = {}
+        for name, value in attrs.items():
+            if name not in already_processed:
+                self.anyAttributes_[name] = value
+    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
+        obj_ = self.gds_build_any(child_, 'instance')
+        if obj_ is not None:
+            self.add_anytypeobjs_(obj_)
+# end class instance
 
-    state = property(__state.value, __state.set, None, None)
 
-    # Attribute reason uses Python identifier reason
-    __reason = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, u'reason'), 'reason', '__urnietfparamsxmlnsrlmi_CTD_ANON_3_reason', pyxb.binding.datatypes.string)
-    __reason._DeclarationLocation = pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 52, 6)
-    __reason._UseLocation = pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 52, 6)
+class name(GeneratedsSuper):
+    subclass = None
+    superclass = None
+    def __init__(self, lang=None, valueOf_=None):
+        self.original_tagname_ = None
+        self.lang = _cast(None, lang)
+        self.valueOf_ = valueOf_
+    def factory(*args_, **kwargs_):
+        if name.subclass:
+            return name.subclass(*args_, **kwargs_)
+        else:
+            return name(*args_, **kwargs_)
+    factory = staticmethod(factory)
+    def get_lang(self): return self.lang
+    def set_lang(self, lang): self.lang = lang
+    def get_valueOf_(self): return self.valueOf_
+    def set_valueOf_(self, valueOf_): self.valueOf_ = valueOf_
+    def hasContent_(self):
+        if (
+            self.valueOf_
+        ):
+            return True
+        else:
+            return False
+    def export(self, outfile, level, namespace_='', name_='name', namespacedef_='', pretty_print=True):
+        if pretty_print:
+            eol_ = '\n'
+        else:
+            eol_ = ''
+        if self.original_tagname_ is not None:
+            name_ = self.original_tagname_
+        showIndent(outfile, level, pretty_print)
+        outfile.write('<%s%s%s' % (namespace_, name_, namespacedef_ and ' ' + namespacedef_ or '', ))
+        already_processed = set()
+        self.exportAttributes(outfile, level, already_processed, namespace_, name_='name')
+        if self.hasContent_():
+            outfile.write('>')
+            outfile.write(str(self.valueOf_).encode(ExternalEncoding))
+            self.exportChildren(outfile, level + 1, namespace_='', name_='name', pretty_print=pretty_print)
+            outfile.write('</%s%s>%s' % (namespace_, name_, eol_))
+        else:
+            outfile.write('/>%s' % (eol_, ))
+    def exportAttributes(self, outfile, level, already_processed, namespace_='', name_='name'):
+        if self.lang is not None and 'lang' not in already_processed:
+            already_processed.add('lang')
+            outfile.write(' lang=%s' % (self.gds_format_string(quote_attrib(self.lang).encode(ExternalEncoding), input_name='lang'), ))
+    def exportChildren(self, outfile, level, namespace_='', name_='name', fromsubclass_=False, pretty_print=True):
+        pass
+    def exportLiteral(self, outfile, level, name_='name'):
+        level += 1
+        already_processed = set()
+        self.exportLiteralAttributes(outfile, level, already_processed, name_)
+        if self.hasContent_():
+            self.exportLiteralChildren(outfile, level, name_)
+        showIndent(outfile, level)
+        outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
+    def exportLiteralAttributes(self, outfile, level, already_processed, name_):
+        if self.lang is not None and 'lang' not in already_processed:
+            already_processed.add('lang')
+            showIndent(outfile, level)
+            outfile.write('lang="%s",\n' % (self.lang,))
+    def exportLiteralChildren(self, outfile, level, name_):
+        pass
+    def build(self, node):
+        already_processed = set()
+        self.buildAttributes(node, node.attrib, already_processed)
+        self.valueOf_ = get_all_text_(node)
+        for child in node:
+            nodeName_ = Tag_pattern_.match(child.tag).groups()[-1]
+            self.buildChildren(child, node, nodeName_)
+        return self
+    def buildAttributes(self, node, attrs, already_processed):
+        value = find_attr_value_('lang', node)
+        if value is not None and 'lang' not in already_processed:
+            already_processed.add('lang')
+            self.lang = value
+    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
+        pass
+# end class name
 
-    reason = property(__reason.value, __reason.set, None, None)
 
-    # Attribute cid uses Python identifier cid
-    __cid = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, u'cid'), 'cid', '__urnietfparamsxmlnsrlmi_CTD_ANON_3_cid', pyxb.binding.datatypes.string)
-    __cid._DeclarationLocation = pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 54, 6)
-    __cid._UseLocation = pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 54, 6)
+GDSClassesMapping = {
+}
 
-    cid = property(__cid.value, __cid.set, None, None)
 
-    _AttributeWildcard = pyxb.binding.content.Wildcard(process_contents=pyxb.binding.content.Wildcard.PC_lax, namespace_constraint=pyxb.binding.content.Wildcard.NC_any)
-    _HasWildcardElement = True
-    _ElementMap.update({
-    })
-    _AttributeMap.update({
-        __id.name(): __id,
-        __state.name(): __state,
-        __reason.name(): __reason,
-        __cid.name(): __cid
-    })
+USAGE_TEXT = """
+Usage: python <Parser>.py [ -s ] <in_xml_file>
+"""
 
 
-list = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'list'), CTD_ANON, location=pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 7, 2))
-Namespace.addCategoryObject('elementBinding', list.name().localName(), list)
+def usage():
+    print(USAGE_TEXT)
+    sys.exit(1)
 
-resource = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'resource'), CTD_ANON_, location=pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 24, 2))
-Namespace.addCategoryObject('elementBinding', resource.name().localName(), resource)
 
-name = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'name'), CTD_ANON_2, location=pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 58, 2))
-Namespace.addCategoryObject('elementBinding', name.name().localName(), name)
+def get_root_tag(node):
+    tag = Tag_pattern_.match(node.tag).groups()[-1]
+    rootClass = GDSClassesMapping.get(tag)
+    if rootClass is None:
+        rootClass = globals().get(tag)
+    return tag, rootClass
 
-instance = pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'instance'), CTD_ANON_3, location=pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 36, 2))
-Namespace.addCategoryObject('elementBinding', instance.name().localName(), instance)
 
-CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'resource'), CTD_ANON_, scope=CTD_ANON, location=pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 24, 2)))
+def parse(inFileName, silence=False):
+    parser = None
+    doc = parsexml_(inFileName, parser)
+    rootNode = doc.getroot()
+    rootTag, rootClass = get_root_tag(rootNode)
+    if rootClass is None:
+        rootTag = 'list'
+        rootClass = list
+    rootObj = rootClass.factory()
+    rootObj.build(rootNode)
+    # Enable Python to collect the space used by the DOM.
+    doc = None
+    if not silence:
+        sys.stdout.write('<?xml version="1.0" ?>\n')
+        rootObj.export(
+            sys.stdout, 0, name_=rootTag,
+            namespacedef_='',
+            pretty_print=True)
+    return rootObj
 
-CTD_ANON._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'name'), CTD_ANON_2, scope=CTD_ANON, location=pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 58, 2)))
 
+def parseEtree(inFileName, silence=False):
+    parser = None
+    doc = parsexml_(inFileName, parser)
+    rootNode = doc.getroot()
+    rootTag, rootClass = get_root_tag(rootNode)
+    if rootClass is None:
+        rootTag = 'list'
+        rootClass = list
+    rootObj = rootClass.factory()
+    rootObj.build(rootNode)
+    # Enable Python to collect the space used by the DOM.
+    doc = None
+    mapping = {}
+    rootElement = rootObj.to_etree(None, name_=rootTag, mapping_=mapping)
+    reverse_mapping = rootObj.gds_reverse_node_mapping(mapping)
+    if not silence:
+        content = etree_.tostring(
+            rootElement, pretty_print=True,
+            xml_declaration=True, encoding="utf-8")
+        sys.stdout.write(content)
+        sys.stdout.write('\n')
+    return rootObj, rootElement, mapping, reverse_mapping
 
-def _BuildAutomaton():
-    # Remove this helper function from the namespace after it is invoked
-    global _BuildAutomaton
-    del _BuildAutomaton
-    import pyxb.utils.fac as fac
 
-    counters = set()
-    cc_0 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 10, 8))
-    counters.add(cc_0)
-    cc_1 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 12, 8))
-    counters.add(cc_1)
-    states = []
-    final_update = set()
-    final_update.add(fac.UpdateInstruction(cc_0, False))
-    symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'name')), pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 10, 8))
-    st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False)
-    states.append(st_0)
-    final_update = set()
-    final_update.add(fac.UpdateInstruction(cc_1, False))
-    symbol = pyxb.binding.content.ElementUse(CTD_ANON._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'resource')), pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 12, 8))
-    st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False)
-    states.append(st_1)
-    transitions = []
-    transitions.append(fac.Transition(st_0, [fac.UpdateInstruction(cc_0, True)]))
-    transitions.append(fac.Transition(st_1, [fac.UpdateInstruction(cc_0, False)]))
-    st_0._set_transitionSet(transitions)
-    transitions = []
-    transitions.append(fac.Transition(st_1, [fac.UpdateInstruction(cc_1, True)]))
-    st_1._set_transitionSet(transitions)
-    return fac.Automaton(states, counters, True, containing_state=None)
-CTD_ANON._Automaton = _BuildAutomaton()
+def parseString(inString, silence=False):
+    from StringIO import StringIO
+    parser = None
+    doc = parsexml_(StringIO(inString), parser)
+    rootNode = doc.getroot()
+    rootTag, rootClass = get_root_tag(rootNode)
+    if rootClass is None:
+        rootTag = 'list'
+        rootClass = list
+    rootObj = rootClass.factory()
+    rootObj.build(rootNode)
+    # Enable Python to collect the space used by the DOM.
+    doc = None
+    if not silence:
+        sys.stdout.write('<?xml version="1.0" ?>\n')
+        rootObj.export(
+            sys.stdout, 0, name_=rootTag,
+            namespacedef_='')
+    return rootObj
 
-CTD_ANON_._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'instance'), CTD_ANON_3, scope=CTD_ANON_, location=pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 36, 2)))
 
-CTD_ANON_._AddElement(pyxb.binding.basis.element(pyxb.namespace.ExpandedName(Namespace, u'name'), CTD_ANON_2, scope=CTD_ANON_, location=pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 58, 2)))
+def parseLiteral(inFileName, silence=False):
+    parser = None
+    doc = parsexml_(inFileName, parser)
+    rootNode = doc.getroot()
+    rootTag, rootClass = get_root_tag(rootNode)
+    if rootClass is None:
+        rootTag = 'list'
+        rootClass = list
+    rootObj = rootClass.factory()
+    rootObj.build(rootNode)
+    # Enable Python to collect the space used by the DOM.
+    doc = None
+    if not silence:
+        sys.stdout.write('#from rlmi import *\n\n')
+        sys.stdout.write('import rlmi as model_\n\n')
+        sys.stdout.write('rootObj = model_.rootClass(\n')
+        rootObj.exportLiteral(sys.stdout, 0, name_=rootTag)
+        sys.stdout.write(')\n')
+    return rootObj
 
 
-def _BuildAutomaton_():
-    # Remove this helper function from the namespace after it is invoked
-    global _BuildAutomaton_
-    del _BuildAutomaton_
-    import pyxb.utils.fac as fac
+def main():
+    args = sys.argv[1:]
+    if len(args) == 1:
+        parse(args[0])
+    else:
+        usage()
 
-    counters = set()
-    cc_0 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 27, 8))
-    counters.add(cc_0)
-    cc_1 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 29, 8))
-    counters.add(cc_1)
-    states = []
-    final_update = set()
-    final_update.add(fac.UpdateInstruction(cc_0, False))
-    symbol = pyxb.binding.content.ElementUse(CTD_ANON_._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'name')), pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 27, 8))
-    st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False)
-    states.append(st_0)
-    final_update = set()
-    final_update.add(fac.UpdateInstruction(cc_1, False))
-    symbol = pyxb.binding.content.ElementUse(CTD_ANON_._UseForTag(pyxb.namespace.ExpandedName(Namespace, u'instance')), pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 29, 8))
-    st_1 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False)
-    states.append(st_1)
-    transitions = []
-    transitions.append(fac.Transition(st_0, [fac.UpdateInstruction(cc_0, True)]))
-    transitions.append(fac.Transition(st_1, [fac.UpdateInstruction(cc_0, False)]))
-    st_0._set_transitionSet(transitions)
-    transitions = []
-    transitions.append(fac.Transition(st_1, [fac.UpdateInstruction(cc_1, True)]))
-    st_1._set_transitionSet(transitions)
-    return fac.Automaton(states, counters, True, containing_state=None)
-CTD_ANON_._Automaton = _BuildAutomaton_()
 
+if __name__ == '__main__':
+    #import pdb; pdb.set_trace()
+    main()
 
-def _BuildAutomaton_2():
-    # Remove this helper function from the namespace after it is invoked
-    global _BuildAutomaton_2
-    del _BuildAutomaton_2
-    import pyxb.utils.fac as fac
 
-    counters = set()
-    cc_0 = fac.CounterCondition(min=0L, max=None, metadata=pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 39, 8))
-    counters.add(cc_0)
-    states = []
-    final_update = set()
-    final_update.add(fac.UpdateInstruction(cc_0, False))
-    symbol = pyxb.binding.content.WildcardUse(pyxb.binding.content.Wildcard(process_contents=pyxb.binding.content.Wildcard.PC_lax, namespace_constraint=pyxb.binding.content.Wildcard.NC_any), pyxb.utils.utility.Location('/usr/src/asterisk/trunk/shit.xsd', 39, 8))
-    st_0 = fac.State(symbol, is_initial=True, final_update=final_update, is_unordered_catenation=False)
-    states.append(st_0)
-    transitions = []
-    transitions.append(fac.Transition(st_0, [fac.UpdateInstruction(cc_0, True)]))
-    st_0._set_transitionSet(transitions)
-    return fac.Automaton(states, counters, True, containing_state=None)
-CTD_ANON_3._Automaton = _BuildAutomaton_2()
+__all__ = [
+    "instance",
+    "list",
+    "name",
+    "resource"
+]
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/basic/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/basic/test-config.yaml
index 89f2e39..2deddcb 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/basic/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/basic/test-config.yaml
@@ -20,7 +20,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
         - asterisk: 'res_pjsip_mwi'
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/multiple_resources_single_change/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/multiple_resources_single_change/test-config.yaml
index e554b29..83bf82f 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/multiple_resources_single_change/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/multiple_resources_single_change/test-config.yaml
@@ -14,7 +14,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
         - asterisk: 'res_pjsip_mwi'
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/resubscription_interruption/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/resubscription_interruption/test-config.yaml
index 081667a..dfb7949 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/resubscription_interruption/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/resubscription_interruption/test-config.yaml
@@ -16,7 +16,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
         - asterisk: 'res_pjsip_mwi'
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/single_resource_multiple_changes/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/single_resource_multiple_changes/test-config.yaml
index 7e8f211..1a7bed0 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/single_resource_multiple_changes/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/single_resource_multiple_changes/test-config.yaml
@@ -14,7 +14,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
         - asterisk: 'res_pjsip_mwi'
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/termination_interruption/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/termination_interruption/test-config.yaml
index 9a254c1..b0cc651 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/termination_interruption/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/batched/termination_interruption/test-config.yaml
@@ -16,7 +16,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
         - asterisk: 'res_pjsip_mwi'
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/full_state/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/full_state/test-config.yaml
index caf7f58..c066da5 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/full_state/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/full_state/test-config.yaml
@@ -15,7 +15,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
         - asterisk: 'res_mwi_external'
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/initial_notify/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/initial_notify/test-config.yaml
index bd59926..694ad41 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/initial_notify/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/initial_notify/test-config.yaml
@@ -29,7 +29,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
         - asterisk: 'res_mwi_external'
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/partial_state/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/partial_state/test-config.yaml
index e651900..3ba717d 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/partial_state/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/partial_state/test-config.yaml
@@ -15,7 +15,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
         - asterisk: 'res_mwi_external'
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/resubscribe_full_state/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/resubscribe_full_state/test-config.yaml
index 6142f35..49bfadd 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/resubscribe_full_state/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/resubscribe_full_state/test-config.yaml
@@ -16,7 +16,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
         - asterisk: 'res_mwi_external'
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/termination_full_state/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/termination_full_state/test-config.yaml
index 4268c20..6a41e17 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/termination_full_state/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/mwi/termination_full_state/test-config.yaml
@@ -16,7 +16,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/basic/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/basic/test-config.yaml
index 8d4c4c1..e10c845 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/basic/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/basic/test-config.yaml
@@ -20,7 +20,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/multiple_resources_single_change/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/multiple_resources_single_change/test-config.yaml
index 5a98b5b..58d275d 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/multiple_resources_single_change/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/multiple_resources_single_change/test-config.yaml
@@ -14,7 +14,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/resubscription_interruption/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/resubscription_interruption/test-config.yaml
index 25b9ce2..30d9b48 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/resubscription_interruption/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/resubscription_interruption/test-config.yaml
@@ -16,7 +16,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/single_resource_multiple_changes/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/single_resource_multiple_changes/test-config.yaml
index 124b278..642b378 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/single_resource_multiple_changes/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/single_resource_multiple_changes/test-config.yaml
@@ -14,7 +14,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/termination_interruption/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/termination_interruption/test-config.yaml
index 4df3af2..a4220d6 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/termination_interruption/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/batched/termination_interruption/test-config.yaml
@@ -16,7 +16,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/full_state/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/full_state/test-config.yaml
index c0442cb..9d32a89 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/full_state/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/full_state/test-config.yaml
@@ -15,7 +15,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/initial_notify/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/initial_notify/test-config.yaml
index c41c293..a4df4c9 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/initial_notify/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/initial_notify/test-config.yaml
@@ -28,7 +28,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/partial_state/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/partial_state/test-config.yaml
index 9b34a06..0b09c6b 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/partial_state/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/partial_state/test-config.yaml
@@ -16,7 +16,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/resubscribe_full_state/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/resubscribe_full_state/test-config.yaml
index 48a544b..cd942c8 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/resubscribe_full_state/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/resubscribe_full_state/test-config.yaml
@@ -16,7 +16,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/termination_full_state/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/termination_full_state/test-config.yaml
index e457690..6ebcba8 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/termination_full_state/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/nominal/presence/termination_full_state/test-config.yaml
@@ -17,7 +17,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/off_nominal/mwi/no_list_resources_exist/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/off_nominal/mwi/no_list_resources_exist/test-config.yaml
index 1dd531f..55caeb7 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/off_nominal/mwi/no_list_resources_exist/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/off_nominal/mwi/no_list_resources_exist/test-config.yaml
@@ -11,7 +11,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
         - asterisk: 'res_mwi_external'
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/off_nominal/mwi/resource_duplication/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/off_nominal/mwi/resource_duplication/test-config.yaml
index c346fd3..967e065 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/off_nominal/mwi/resource_duplication/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/off_nominal/mwi/resource_duplication/test-config.yaml
@@ -11,7 +11,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
         - asterisk: 'res_mwi_external'
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/off_nominal/mwi/some_list_resources_exist/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/off_nominal/mwi/some_list_resources_exist/test-config.yaml
index 106f29e..2f14b57 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/off_nominal/mwi/some_list_resources_exist/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/off_nominal/mwi/some_list_resources_exist/test-config.yaml
@@ -12,7 +12,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
         - asterisk: 'res_mwi_external'
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/off_nominal/presence/resource_duplication/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/off_nominal/presence/resource_duplication/test-config.yaml
index 5670543..024e3ce 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/off_nominal/presence/resource_duplication/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/off_nominal/presence/resource_duplication/test-config.yaml
@@ -11,7 +11,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists/off_nominal/presence/some_list_resources_exist/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists/off_nominal/presence/some_list_resources_exist/test-config.yaml
index caa2c20..80b3294 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists/off_nominal/presence/some_list_resources_exist/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists/off_nominal/presence/some_list_resources_exist/test-config.yaml
@@ -12,7 +12,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/batched/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/batched/test-config.yaml
index b034787..a2b40bf 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/batched/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/batched/test-config.yaml
@@ -16,7 +16,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/full_state_alice/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/full_state_alice/test-config.yaml
index a6a1b8e..65a031e 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/full_state_alice/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/full_state_alice/test-config.yaml
@@ -15,7 +15,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
         - asterisk: 'res_mwi_external'
diff --git a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/full_state_carol/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/full_state_carol/test-config.yaml
index 67cf9d0..6d73d45 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/full_state_carol/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/full_state_carol/test-config.yaml
@@ -15,7 +15,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
         - asterisk: 'res_mwi_external'
diff --git a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/initial_notify/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/initial_notify/test-config.yaml
index b93d177..ecb178a 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/initial_notify/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/initial_notify/test-config.yaml
@@ -30,7 +30,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
         - asterisk: 'res_mwi_external'
diff --git a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/partial_state_alice/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/partial_state_alice/test-config.yaml
index 51b8057..22bc0c2 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/partial_state_alice/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/partial_state_alice/test-config.yaml
@@ -15,7 +15,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
         - asterisk: 'res_mwi_external'
diff --git a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/partial_state_carol/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/partial_state_carol/test-config.yaml
index 5e08865..85ec420 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/partial_state_carol/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/partial_state_carol/test-config.yaml
@@ -15,7 +15,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
         - asterisk: 'res_mwi_external'
diff --git a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/resubscribe_full_state/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/resubscribe_full_state/test-config.yaml
index 6a04294..db704b4 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/resubscribe_full_state/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/resubscribe_full_state/test-config.yaml
@@ -16,7 +16,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
         - asterisk: 'res_mwi_external'
diff --git a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/termination_full_state/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/termination_full_state/test-config.yaml
index c48365d..2a54f24 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/termination_full_state/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/mwi/termination_full_state/test-config.yaml
@@ -17,7 +17,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
         - asterisk: 'res_mwi_external'
diff --git a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/batched/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/batched/test-config.yaml
index 9b21d48..c5884dc 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/batched/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/batched/test-config.yaml
@@ -16,7 +16,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/full_state_alice/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/full_state_alice/test-config.yaml
index c16a6c9..424e9ee 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/full_state_alice/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/full_state_alice/test-config.yaml
@@ -15,7 +15,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/full_state_carol/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/full_state_carol/test-config.yaml
index c0b0539..89594b9 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/full_state_carol/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/full_state_carol/test-config.yaml
@@ -15,7 +15,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/initial_notify/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/initial_notify/test-config.yaml
index fe43db5..ae1730c 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/initial_notify/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/initial_notify/test-config.yaml
@@ -29,7 +29,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/listception_initial_notify/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/listception_initial_notify/test-config.yaml
index 2e331ae..a188564 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/listception_initial_notify/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/listception_initial_notify/test-config.yaml
@@ -10,7 +10,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/partial_state_alice/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/partial_state_alice/test-config.yaml
index cfa552e..9772f8e 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/partial_state_alice/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/partial_state_alice/test-config.yaml
@@ -16,7 +16,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/partial_state_carol/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/partial_state_carol/test-config.yaml
index ebd8f55..f3a4c40 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/partial_state_carol/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/partial_state_carol/test-config.yaml
@@ -16,7 +16,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/resubscribe_full_state/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/resubscribe_full_state/test-config.yaml
index bdab4e3..47cb6ca 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/resubscribe_full_state/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/resubscribe_full_state/test-config.yaml
@@ -16,7 +16,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/termination_full_state/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/termination_full_state/test-config.yaml
index f3388fe..8754c7d 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/termination_full_state/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/nominal/presence/termination_full_state/test-config.yaml
@@ -17,7 +17,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/mwi/resource_duplication/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/mwi/resource_duplication/test-config.yaml
index f6b4fa9..ad46a48 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/mwi/resource_duplication/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/mwi/resource_duplication/test-config.yaml
@@ -32,7 +32,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
         - asterisk: 'res_mwi_external'
diff --git a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/mwi/shared_name_w_list_support/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/mwi/shared_name_w_list_support/test-config.yaml
index 61aa6e0..40c6b41 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/mwi/shared_name_w_list_support/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/mwi/shared_name_w_list_support/test-config.yaml
@@ -31,7 +31,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
         - asterisk: 'res_mwi_external'
diff --git a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/mwi/shared_name_wo_list_support/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/mwi/shared_name_wo_list_support/test-config.yaml
index 8ec70a8..700936f 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/mwi/shared_name_wo_list_support/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/mwi/shared_name_wo_list_support/test-config.yaml
@@ -15,7 +15,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
         - asterisk: 'res_mwi_external'
diff --git a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/presence/resource_duplication/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/presence/resource_duplication/test-config.yaml
index 86b5046..81cf5b7 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/presence/resource_duplication/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/presence/resource_duplication/test-config.yaml
@@ -33,7 +33,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/presence/shared_name_w_list_support/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/presence/shared_name_w_list_support/test-config.yaml
index c3589f6..d1a65b1 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/presence/shared_name_w_list_support/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/presence/shared_name_w_list_support/test-config.yaml
@@ -29,7 +29,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/presence/shared_name_wo_list_support/test-config.yaml b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/presence/shared_name_wo_list_support/test-config.yaml
index 4adfd45..8689be9 100644
--- a/tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/presence/shared_name_wo_list_support/test-config.yaml
+++ b/tests/channels/pjsip/subscriptions/rls/lists_of_lists/off_nominal/presence/shared_name_wo_list_support/test-config.yaml
@@ -14,7 +14,7 @@
         - python: 'twisted'
         - python: 'starpy'
         - python: 'yappcap'
-        - python: 'pyxb'
+        - python: 'lxml'
         - asterisk: 'res_pjsip'
         - asterisk: 'res_pjsip_pubsub'
     tags:
diff --git a/tests/channels/pjsip/subscriptions/rls/rls_integrity.py b/tests/channels/pjsip/subscriptions/rls/rls_integrity.py
index 7f0f0d6..5d44f05 100755
--- a/tests/channels/pjsip/subscriptions/rls/rls_integrity.py
+++ b/tests/channels/pjsip/subscriptions/rls/rls_integrity.py
@@ -139,20 +139,21 @@
         element in the list.
 
         Arguments:
-        list_elem The XML <list> element in the RLMI body, as parsed by pyxb
+        list_elem The XML <list> element in the RLMI body, as parsed by lxml
         resources The expected resources dictionary relevant to this RLMI body
         """
 
-        if list_elem.version != self.version:
+        if list_elem.get_version() != self.version:
             self.fail_test("Unexpected RLMI version %d" % list_elem.version)
             return False
 
-        if list_elem.fullState != self.full_state:
+        if list_elem.get_fullState() != self.full_state:
             self.fail_test("Unexpected fullState value %s" %
                            str(list_elem.fullState))
             return False
 
-        if len(list_elem.name) != 1:
+        name = list_elem.get_name()
+        if len(name) != 1:
             self.fail_test("Unexpected number of names (%d) in RLMI list" %
                            len(list_elem.name))
             return False
@@ -162,7 +163,7 @@
                            len(list_elem.resource))
             return False
 
-        if list_elem.name[0].value() != list_name:
+        if name[0].get_valueOf_() != list_name:
             self.fail_test("Unexpected list name: %s" %
                            list_elem.name[0].value())
             return False
@@ -180,7 +181,7 @@
 
         Arguments:
         rlmi_resource The XML <resource> element in the RLMI <list>, as parsed
-        by pyxb
+        by lxml
         resources The expected resources dictionary relevant to this RLMI
             resource
         """
@@ -188,7 +189,8 @@
             self.fail_test("Resource is missing a URI")
             return False
 
-        if len(rlmi_resource.name) != 1:
+        name = rlmi_resource.get_name()
+        if len(name) != 1:
             self.fail_test("Unexpected number of names (%d) in resource" %
                            len(rlmi_resource.name))
             return False
@@ -198,8 +200,8 @@
                            len(rlmi_resource.instance))
             return False
 
-        name = rlmi_resource.name[0].value()
-        if name not in resources:
+        name_sought = name[0].valueOf_
+        if name_sought not in resources:
             self.fail_test("Unexpected resource name %s" % name)
             return False
 
@@ -214,7 +216,7 @@
             self.fail_test("Resource instance has no cid")
             return False
 
-        if instance.state != resources[name]['state']:
+        if instance.state != resources[name_sought]['state']:
             self.fail_test("Unexpected instance state %s" % instance.state)
             return False
 
@@ -271,6 +273,7 @@
         True if the mwi_part matched the expectations in resources
         False if the mwi_part did not match the expectations in resources
         """
+
         if not mwi_part.content_id:
             self.fail_test("MWI part does not have a Content-ID")
             return False
@@ -282,10 +285,9 @@
         my_name = None
         my_uri = None
 
-        # Yeargh, who the heck am I anyway?
         for resource in rlmi.body.list_elem.resource:
             if resource.instance[0].cid == mwi_part.content_id:
-                my_name = resource.name[0].value()
+                my_name = resource.name[0].valueOf_
                 my_uri = resource.uri
                 break
 
@@ -346,7 +348,7 @@
         for part in multi_part.body.parts:
             if part.body.packet_type == 'RLMI':
                 rlmi = part
-                name = part.body.list_elem.name[0].value()
+                name = part.body.list_elem.name[0].valueOf_
                 uri = part.body.list_elem.uri
 
         self.resource_cids[uri] = multi_part.content_id

-- 
To view, visit https://gerrit.asterisk.org/650
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I17583e5da602853e2e1814df8c712a59c4bbb288
Gerrit-PatchSet: 1
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Owner: Jonathan Rose <jrose at digium.com>
Gerrit-Reviewer: Jonathan Rose <jrose at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Mark Michelson <mmichelson at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>



More information about the asterisk-commits mailing list