You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by di...@apache.org on 2006/08/07 08:30:03 UTC

svn commit: r429252 - /webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl

Author: dims
Date: Sun Aug  6 23:30:03 2006
New Revision: 429252

URL: http://svn.apache.org/viewvc?rev=429252&view=rev
Log:
if the array consists of primitives, then just write them

Modified:
    webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl

Modified: webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl?rev=429252&r1=429251&r2=429252&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl (original)
+++ webservices/axis2/trunk/java/modules/adb-codegen/src/org/apache/axis2/schema/template/ADBBeanTemplate.xsl Sun Aug  6 23:30:03 2006
@@ -584,12 +584,17 @@
 
 
 
-                              if (<xsl:value-of select="$varName"/>[i]==null){
-                                  // write the nil attribute
-                                  writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","true",xmlWriter);
-                              }else{
+                            <xsl:if test="not(@primitive)">
+                                if (<xsl:value-of select="$varName"/>[i]==null){
+                                    // write the nil attribute
+                                    writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","true",xmlWriter);
+                                }else{
+                                   xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(<xsl:value-of select="$varName"/>[i]));
+                                }
+                            </xsl:if>
+                            <xsl:if test="@primitive">
                                  xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(<xsl:value-of select="$varName"/>[i]));
-                              }
+                            </xsl:if>
                               xmlWriter.writeEndElement();
                             }
                             <!--we've opened a bracket for the nulls - fix it here-->



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org