Issue 31809  —   structToXml/schema crashes when schema includes <any> or <anyAttribute> element

Status:   Planned for resolution in 10.3.01

Solution available in patch(es):      10.3.01.003    9.7.05.003

Description:

 Summary:
 In case an XML-schema includes an <any> or <anyAttribut> element then this can
 cause a crash when trying to convert it to XML using structToXML/schema.

 Environment:
 +Uniface:
 * Version 9.5.01 - E104 (and higher)

 +Operating System:
 * OS independent

 +Database:
 * DBMS independent

 Symptoms:
 An XML-schema includes an <any> or <anyAttribute> element. If the struct is
 converted to XML using StructToXML/schema then this will cause a crash.

 Conider the following:

 family.xsd:

 <?xml version="1.0" encoding="utf-8"?>
 <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified"
 xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <xs:element name="persons">
     <xs:complexType>
       <xs:sequence>
         <xs:element maxOccurs="unbounded" name="person">
           <xs:complexType>
             <xs:sequence>
               <xs:element name="firstname" type="xs:string" />
               <xs:element name="lastname" type="xs:string" />
               <xs:any processContents="lax" minOccurs="0"/>
             </xs:sequence>
            <xs:anyAttribute  processContents="lax"/>
           </xs:complexType>
         </xs:element>
       </xs:sequence>
     </xs:complexType>
   </xs:element>
 </xs:schema>

 vStruct:

 []
   [persons]
     [person]
       [$tags]
       [firstname] = "Jane"
         [$tags]
           [xmlTypeNamespace] = http://www.w3.org/2001/XMLSchema
       [lastname] = "Refsnes"
         [$tags]
           [xmlTypeNamespace] = http://www.w3.org/2001/XMLSchema
     [person]
       [eyecolor] = "blue"
         [$tags]
           [xmlClass] = attribute
       [firstname] = "Stale"
         [$tags]
           [xmlTypeNamespace] = http://www.w3.org/2001/XMLSchema
       [lastname] = "Refsnes"
         [$tags]
           [xmlTypeNamespace] = http://www.w3.org/2001/XMLSchema

 Executing the following statement will cause a crash:

 structtoxml/schema vXml, vStruct, "family.xsd"

Workaround:

 There is no known workaround for this problem.

Notes: