Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

WSDL.xsd

Help
-]-[
2006-05-12
2013-04-15
  • -]-[
    -]-[
    2006-05-12

    I recently tried to process the wsdl.xsd, but it choked with error

    {error,{"1 - Unexpected event, expected end-tag",
            {startElement,"http://www.w3.org/2001/XMLSchema",
                          "anyAttribute",
                          "xs",
                          [{attribute,"processContents",
                                      "processContents",
                                      [],
                                      "lax"},
                           {attribute,"namespace","namespace",[],"##other"}]}}}

    The offending entry seems to be

      <xs:complexType name="tExtensibleAttributesDocumented" abstract="true" >
        <xs:complexContent>
          <xs:extension base="wsdl:tDocumented" >
            <xs:annotation>
              <xs:documentation>
              This type is extended by component types to allow attributes from other namespaces to be added.
              </xs:documentation>
            </xs:annotation>
            <xs:anyAttribute namespace="##other" processContents="lax" />   
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>

    Not sure what is wrong here.  Any help?

     
    • Willem de Jong
      Willem de Jong
      2006-05-15

      To make Erlsom accept anyAttribute (as used in wsdl.xsd), you have to change the following:

      In erlsom_parseXsd.erl: replace lines 238 – 254 (old):

      %% as part of a complexType
      %% -record(extensionTypeC, {base, annotation, model, attributes}).
             #type{nm = extensionTypeC,
               els = [#el{alts = [#alt{tag = 'xs:annotation', tp = 'annotationType'}],
                              mn = 0,
                              mx = 1,
                              nr = 2},
                          #el{alts = [#alt{tag = 'xs:sequence', tp = 'sequenceType'}],
                              mn = 0,
                              mx = 1,
                              nr = 3},
                          #el{alts = [#alt{tag = 'xs:attribute', tp = 'localAttributeType'}],
                              mn = 0,
                              mx = unbound,
                              nr = 4}],
               atts = [#att{nm = base, nr = 1, opt = false, tp = qname}],
                   nr = 5},

      by (new):
      %% as part of a complexType
      %% -record(extensionTypeC, {base, annotation, model, attributes, anyAttributes}).
             #type{nm = extensionTypeC,
               els = [#el{alts = [#alt{tag = 'xs:annotation', tp = 'annotationType'}],
                              mn = 0,
                              mx = 1,
                              nr = 2},
                          #el{alts = [#alt{tag = 'xs:sequence', tp = 'sequenceType'}],
                              mn = 0,
                              mx = 1,
                              nr = 3},
                          #el{alts = [#alt{tag = 'xs:attribute', tp = 'localAttributeType'}],
                              mn = 0,
                              mx = unbound,
                              nr = 4},
                          #el{alts = [#alt{tag = 'xs:anyAttribute', tp = 'anyAttributeType'}],
                              mn = 0,
                              mx = unbound,
                              nr = 5}],
               atts = [#att{nm = base, nr = 1, opt = false, tp = qname}],
                   nr = 6},

      In erslom_compile.hrl: replace line 48:
      -record(extensionTypeC, {base, annotation, model, attributes}).

      by:
      -record(extensionTypeC, {base, annotation, model, attributes, anyAttributes}).

      I'll include those changes in a next release.

      Unfortunately this won't be enough to make erlsom accept wsdl.xsd: there are more unsupported features. I'll put them on my to-do list...

      Regards,
      Willem