[Mono-bugs] [Bug 332246] Strange problem in Mono's XML and/or XSLT code
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Oct 10 10:35:34 EDT 2007
https://bugzilla.novell.com/show_bug.cgi?id=332246#c5
Atsushi Enomoto <atsushi at ximian.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #5 from Atsushi Enomoto <atsushi at ximian.com> 2007-10-10 08:35:33 MST ---
.. and yes, there was a bug in OOXStyleCellPostProcessor.cs. Look at the
condition with changeCellName == true (the second case in each method):
public override void WriteStartAttribute(string prefix, string
localName, string ns)
{
if ("post-style-name".Equals(localName))
{
this.numberCell = this.numberCell + 1;
this.tableCellNumber = true;
}
else if ("style-number-change-post".Equals(localName))
{
this.nextWriter.WriteStartAttribute(prefix, "s", ns);
this.changeCellName = true;
}
else
{
this.nextWriter.WriteStartAttribute(prefix, localName, ns);
}
}
public override void WriteString(string text)
{
if (this.tableCellNumber)
{
if (!styleCellNumber.ContainsKey(text))
{
styleCellNumber.Add(text, this.numberCell);
}
}
else if (this.changeCellName)
{
this.nextWriter.WriteString(styleCellNumber[text].ToString());
}
else
{
this.nextWriter.WriteString(text);
}
}
public override void WriteEndAttribute()
{
if (this.tableCellNumber)
{
this.tableCellNumber = false;
}
else if (this.changeCellName)
{
this.changeCellName = false;
}
else
{
this.nextWriter.WriteEndAttribute();
}
}
Add
this.nextWriter.WriteEndAttribute();
in the second condition in WriteEndAttribute(). And the issue should go away.
I have no idea why .NET allows such behavior, but Mono behavior is correct I
believe.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list