<xsl:template name="inner-struct">
+ <xsl:variable name="nillable">
+ <xsl:choose>
+ <xsl:when test="local-name(.)='choice'">true</xsl:when>
+ <xsl:otherwise>false</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
<xsl:for-each select="elem">
<xsl:variable name="type">
<xsl:choose>
<xsl:otherwise>1</xsl:otherwise>
</xsl:choose>
</xsl:variable>
- <xsd:element name="{@name}" type="{$type}" minOccurs="{$min}" maxOccurs="{$max}"/>
+ <xsd:element name="{@name}" type="{$type}" minOccurs="{$min}" maxOccurs="{$max}" nillable="{$nillable}"/>
</xsl:for-each>
<!--
<xsd:complexType name="{@name}List">