G
Guest
Hello
Bug description: calling XmlTextWriter.WriteString with a one-character long argument could have no effect (nothing is written)
Workaround: use WriteRaw or insert a white space before
Circumstances: I could not reproduce in a standalone program. In my complete application, the attached XML should be generated, but instead of
<crimitive c:type="decimal">6</crimitive
I ge
<crimitive c:type="decimal" />
The complete XML is
<o:MatrixVersionXml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:c="uri:adastra.criteria" xmlns="uri:cetelem.otis"><oarameters><o:Comment /><o:ResponsiblePerson /><o:SendDate>2004-03-18T10:33:52.1434992+01:00</o:SendDate><o:ControlGroupSizeDefinitionMethod>Absolute</o:ControlGroupSizeDefinitionMethod><o:ControlGroupSize>1000</o:ControlGroupSize><o:ResultSetSizeDefinitionMethod>Unlimited</o:ResultSetSizeDefinitionMethod><o:ResultSetSize>2147483647</o:ResultSetSize><o:ResultSetOptimizationCriteria /></oarameters><o:CriteriaGroups><o:CriteriaGroup operator="And" o:name="Pozitivní" o:loanCaseType="ClassicAccount"><o:Criteria><o:Criterion o:name="KOD_BLOKACE_M_ID"><c:CriterionValue operator="Equal"><crimitive><crimitive c:type="string">999</crimitive></crimitive></c:CriterionValue></o:Criterion><o:Criterion o:name="F_AKT_VYSE_MES_SPLATKY"><c:CriterionValue operator="Equal"><crimitive><crimitive c:type="decimal">6</crimitive></crimitive></c:CriterionValue></o:Criterion></o:Criteria></o:CriteriaGroup><o:CriteriaGroup operator="AndNot" o:name="Negativní" o:loanCaseType="ClassicAccount"><o:Criteria /></o:CriteriaGroup></o:CriteriaGroups></o:MatrixVersionXml
The element <crimitive> is generated by the following code
public void WriteXml(XmlWriter writer
writer.WriteStartElement( CriteriaNamespace.PreferredPrefix, "Primitive", CriteriaNamespace.Namespace )
if ( this.Value != null
string type = XmlConvertExt.GetXsiType( this.Value.GetType() )
writer.WriteAttributeString( CriteriaNamespace.PreferredPrefix, "type", CriteriaNamespace.Namespace, type )
writer.WriteString( XmlConvertExt.ToString( this.Value, type ) )
writer.WriteEndElement()
Looks like a bug in the XmlTextWriter, isn't it
Gael Fraiteu
gael dot fraiteur at adastracorp dot com
Bug description: calling XmlTextWriter.WriteString with a one-character long argument could have no effect (nothing is written)
Workaround: use WriteRaw or insert a white space before
Circumstances: I could not reproduce in a standalone program. In my complete application, the attached XML should be generated, but instead of
<crimitive c:type="decimal">6</crimitive
I ge
<crimitive c:type="decimal" />
The complete XML is
<o:MatrixVersionXml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:c="uri:adastra.criteria" xmlns="uri:cetelem.otis"><oarameters><o:Comment /><o:ResponsiblePerson /><o:SendDate>2004-03-18T10:33:52.1434992+01:00</o:SendDate><o:ControlGroupSizeDefinitionMethod>Absolute</o:ControlGroupSizeDefinitionMethod><o:ControlGroupSize>1000</o:ControlGroupSize><o:ResultSetSizeDefinitionMethod>Unlimited</o:ResultSetSizeDefinitionMethod><o:ResultSetSize>2147483647</o:ResultSetSize><o:ResultSetOptimizationCriteria /></oarameters><o:CriteriaGroups><o:CriteriaGroup operator="And" o:name="Pozitivní" o:loanCaseType="ClassicAccount"><o:Criteria><o:Criterion o:name="KOD_BLOKACE_M_ID"><c:CriterionValue operator="Equal"><crimitive><crimitive c:type="string">999</crimitive></crimitive></c:CriterionValue></o:Criterion><o:Criterion o:name="F_AKT_VYSE_MES_SPLATKY"><c:CriterionValue operator="Equal"><crimitive><crimitive c:type="decimal">6</crimitive></crimitive></c:CriterionValue></o:Criterion></o:Criteria></o:CriteriaGroup><o:CriteriaGroup operator="AndNot" o:name="Negativní" o:loanCaseType="ClassicAccount"><o:Criteria /></o:CriteriaGroup></o:CriteriaGroups></o:MatrixVersionXml
The element <crimitive> is generated by the following code
public void WriteXml(XmlWriter writer
writer.WriteStartElement( CriteriaNamespace.PreferredPrefix, "Primitive", CriteriaNamespace.Namespace )
if ( this.Value != null
string type = XmlConvertExt.GetXsiType( this.Value.GetType() )
writer.WriteAttributeString( CriteriaNamespace.PreferredPrefix, "type", CriteriaNamespace.Namespace, type )
writer.WriteString( XmlConvertExt.ToString( this.Value, type ) )
writer.WriteEndElement()
Looks like a bug in the XmlTextWriter, isn't it
Gael Fraiteu
gael dot fraiteur at adastracorp dot com