Hello,

I have created a .mdo with a required int attribute of "count", and I built
with the goals "java" and "xpp3-writer".

Here is the snippet from my .mdo file for the attribute.

 <field xml.attribute="true">
   <version>1.0.0</version>
   <name>count</name>
   <required>true</required>
   <type>int</type>
 </field>

The java objects are all created correctly; however, if I put a zero into
the count field, it is not outputted in the
XML.  It does output if I use a non-zero value.  I can see in the generated
file OutputXpp3Writer.java that it is checking for zero before it writes
the attribute.  I assume this is done to determine if a value has been
written into that field.

  if ( tag.getCount() != 0 )
  {
    ... output attribute ...
  }


Is there something else I should put in the .mdo to force this attribute to
write each time?  I have put in a temporary hack of making that attribute a
String and used Integer.toString(...) in my code, but I don't think this is
a good long term solution as the XML schema would be incorrect.  Is there a
better work around?

Thanks,
-Nate


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to