File: structure.tt

package info (click to toggle)
libsoap-wsdl-perl 3.004-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,600 kB
  • sloc: perl: 8,433; xml: 1,769; java: 19; makefile: 15
file content (30 lines) | stat: -rw-r--r-- 1,132 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
[%- IF (name = element.get_type);
    type_name = element.expand(name);
    IF (type_name.0 == 'http://www.w3.org/2001/XMLSchema'); -%]
 $some_value, # [% type_name.1 %]
[%-
        RETURN;
    ELSIF (type = definitions.first_types.find_type( type_name ));
        IF (type.isa('SOAP::WSDL::XSD::ComplexType') );
            INCLUDE complexType/POD/structure.tt(complexType = type);
            RETURN;
        ELSE;
            INCLUDE simpleType/POD/structure.tt(simpleType = type);
        END;
        RETURN;
    END;
    THROW NOT_FOUND, "no type found for {${type_name.0}}${type_name.1}";
ELSIF (ref = element.get_ref);
    ref_element = definitions.first_types.find_element( element.expand( ref ) );
    INCLUDE element/POD/structure.tt(element = ref_element);
    RETURN;
ELSIF (type = element.first_simpleType);
    INCLUDE simpleType/POD/structure.tt(simpleType = type);
    RETURN;
ELSIF (type = element.first_complexType);
    INCLUDE complexType/POD/structure.tt(complexType = type);
ELSE;
    THROW NOT_FOUND, "no type found for ${element.get_name}";
%]
    NO TYPE FOUND FOR ELEMENT [% element.get_name %]
[% END -%]