Changeset 21
Author: alfred.sawatzky
(2011/07/21 01:05) 10 months ago
fix problem with incorrect "mandatory?" value for certain case fields in HTML report. There are a few different ways that a 'mandatory' value can be defined. See method case_field.mandatory? for details. It is possible that no sw_gis!case_field_mandatory? exists for a field type. In that case, if the field_type='physical', it is implied to be mandatory. If the sw_gis!case_field_mandatory? DOES exist, then we use the explicit value for mandatory.
select="/mclib_xsl_report/featureMember[@typeName='sw_gis!case_field_mandatory?']/FeatureCollection[@typeName='sw_gis!case_field_mandatory?']/featureMember/Feature[@typeName='sw_gis!case_field_mandatory?' and @identifier=$id]/property[@typeName='mandatory?']"/>select="/mclib_xsl_report/featureMember[@typeName='sw_gis!case_field_mandatory?']/FeatureCollection[@typeName='sw_gis!case_field_mandatory?']/featureMember/Feature[@typeName='sw_gis!case_field_mandatory?' and @identifier=$id]/property[@typeName='mandatory?']"/><xsl:when test="string-length($mandatory)=0">False</xsl:when><!-- There are a few different ways that a 'mandatory' value can be defined. --><xsl:otherwise><!-- See method case_field.mandatory? for details. --><xsl:value-of select="$mandatory"/><!-- It is possible that no sw_gis!case_field_mandatory? exists for a field type. --></xsl:otherwise><!-- In that case, if the field_type='physical', it is implied to be mandatory. --><!-- If the sw_gis!case_field_mandatory? DOES exist, then we use the explicit value for mandatory. --><xsl:when test="string-length($mandatory)=0 and $field_type='physical'">True</xsl:when><xsl:when test="string-length($mandatory)=0">False</xsl:when><xsl:otherwise><xsl:value-of select="$mandatory"/></xsl:otherwise><xsl:call-template name="show_mandatory"><xsl:with-param name="id"><xsl:value-of select=".//swldy:relationshipProperty[@typeName='mandatory?_rec']/Feature[@typeName='sw_gis!case_field_mandatory?']/@identifier"/><xsl:with-param name="id"></xsl:with-param></xsl:call-template><xsl:value-of select=".//swldy:relationshipProperty[@typeName='mandatory?_rec']/Feature[@typeName='sw_gis!case_field_mandatory?']/@identifier"/></xsl:with-param><xsl:with-param name="field_type"><xsl:value-of select=".//property[@typeName='type']"/></xsl:with-param></xsl:call-template>