Пример #1
0
def create_element(entity, text=None, attrib=None, ns='https://service.swisspost.ch/apache/yellowcube/YellowCube_ART_REQUEST_Artikelstamm.xsd'):
    element = old_create_element(entity, text, attrib, ns)
    if entity in _element_to_check:
        validation_errors = validate_xml('art', element, print_error=False)
        if validation_errors:
            f = _element_to_check[entity]
            t, a = f(text, attrib)
            logger.debug("Changing element {0} values {1}, {2} into: {3}, {4}".format(entity, text, attrib, t, a))
            element = old_create_element(entity, t, a, ns)
    return element
Пример #2
0
def create_element(
    entity,
    text=None,
    attrib=None,
    ns='https://service.swisspost.ch/apache/yellowcube/YellowCube_WAB_REQUEST_Warenausgangsbestellung.xsd'
):
    return old_create_element(entity, text, attrib, ns)
def create_element(
    entity,
    text=None,
    attrib=None,
    ns='https://service.swisspost.ch/apache/yellowcube/YellowCube_WBL_REQUEST_SupplierOrders.xsd'
):
    return old_create_element(entity, text, attrib, ns)