Hi,
I have encountered trouble using XML::Compile's schema parsing with null
values in certain fields.
I am using an XML schema that defines its own simple type as follows:
<simpleType name="ID">
<restriction base="xsd:string">
<length value="18"/>
<pattern value="[a-zA-Z0-9]{18}"/>
</restriction>
</simpleType>
Various fields use this type, for example:
<element name="roleId" type="tns:ID" nillable="true"/>
However, XML::Compile does not cope with the following:
<roleId xsi:nil="true"/>
It throws the following error:
error: string `' does not match pattern (?-xism:^(?:[a-zA-Z0-9]{18})$) at
{urn:enterprise.soap.sforce.com}loginResponse/result/userInfo/roleId#facet
It looks like XML::Compile applies the pattern even for nill values,
despite the schema specifying it tolerates them. I lack a detailed
understanding of WSDL and SOAP, though, so I apologise if I have
misunderstood something.
Thanks,
Tom Hukins