Can anyone help with this irksome erlsom problem?

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Can anyone help with this irksome erlsom problem?

Alan Evans-2

Hello Erlang experts,

I'm having  a problem trying to parse some XML using the excellent erlsom tool, I don't know if it's me, erlsom, XML, XSD or something else that's giving me issues.

The XML I'm trying to parse looks like this and the problem I have is with the xsi:type attribute on the Value element, oh and by the way, I can't change the XML as it coming from a 3rd party.

<soap:Envelope xmlns:cwmp="urn:dslforum-org:cwmp-1-0"
<cwmp:ID soap:mustUnderstand="1">1410271757429_7070_2008420083</cwmp:ID>
<ParameterList soap-enc:arrayType="cwmp:ParameterValueStruct[1]">
<Value xsi:type="xsd:string"></Value>

The error I get is:

34> erlsom:scan_file(Xml, ModelIn).
{error,[{exception,{error,"Type not found in hierarchy: in:ValueElement"}},

The XSD I'm using is here:
It is based of the the standard TR069 XSD but I had to modify it to make the Value element a complexType in order to add the attribute.

Value was defined as

  <xs:element name="Value" type="xs:anySimpleType"/>

and is now defined as

  <xs:complexType name="ValueElement">
      <xs:extension base="xs:anySimpleType">
        <xs:attribute name="xsi:type" type="xs:string">

A session showing the problem is here:

Many thanks for reading this far.




erlang-questions mailing list
[hidden email]