Hi Jick,
Sorry to be a pain but blame M$…their dot net framework code is complaining that it wants to see the nillable attribute otherwise it goes nuts…something to do with how it serializes the objects…
I have hacked the code for xsdElementAttribute to be as follows as a work around. Can you ask your engineers to let me know if there is a more elegant solution?
$attribute.t_prepare($args.get(“property”))##
===== Output =====
#if( $attribute.isComposite() )
$stacks.getStack(“composite”).push($class)##
#set($class = $attribute.getType())
$stacks.getStack(“referenceAttribute”).push($referenceAttribute)##
#set($referenceAttribute = $attribute)
#parse("$template-dir/XsdClassSelection.vm")
#set($referenceAttribute = $stacks.getStack(“referenceAttribute”).pop())##
#set($class = $stacks.getStack(“composite”).pop())##
#else
$indenter.getIndentation()<xs:element ##
#if( $attribute.getType().isElement() )
ref##
#else
name="$attribute.getName()" type##
#end
="$attribute.t_getTypePrefix()$attribute.t_getTypePrefixPostfix()$attribute.t_getTypeName()" minOccurs="$attribute.t_getMinOccurs()" maxOccurs="$attribute.t_getMaxOccurs()"##
#if( $attribute.hasDefaultValue() )
${space}default="$attribute.getDefaultValue()"
#end
#if ($attribute.getType().isElement() !=true)
#if ($attribute.t_getMinOccurs()==“0”)
$space nillable=“true”##
#else
$space nillable=“false”##
#end
#end
>##
$indenter.push($indentation)##
$attribute.t_getDocumentation($indenter.getIndentation())
$indenter.pop()##
$indenter.getIndentation()</xs:element>
#end