[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:27:53 EDT 2007
https://bugzilla.novell.com/show_bug.cgi?id=332246#c4
--- Comment #4 from Atsushi Enomoto <atsushi at ximian.com> 2007-10-10 08:27:53 MST ---
Couple of updates and sort of conclusion: there is likely issue in
odf-converter's XmlWriter implementation.
1) I have made a fix in XmlTextWriter.Close() that hid the actual issue, so now
the error should look different (and much deeper in the transformation stack).
It is like:
EXCEPTION: finally clause 1 of
CleverAge.OdfConverter.OdfConverterLib.AbstractConverter:Transform
(string,string)
[ERROR][t00001.ods] Conversion failed - Error during conversion
[DEBUG][t00001.ods] This XmlWriter does not accept Attribute at this state
Attribute.( at System.Xml.XmlTextWriter.WriteStartAttribute (System.String
prefix, System.String localName, System.String namespaceUri) [0x00266] in
C:\cygwin\home\atsushi\svn\mcs\class\System.XML\System.Xml\XmlTextWriter2.cs:878
at CleverAge.OdfConverter.OdfZipUtils.ZipArchiveWriter.WriteStartAttribute
(System.String prefix, System.String localName, System.String ns) [0x00076] in
C:\cygwin\home\atsushi\tests\xml\xslt\332246\odf-converter-1.0.6\source\Common\OdfZipUtils\ZipArchiveWriter.cs:308
..
2) If you enable a commented line that calls "ShowLocationInTrace" in
XslCompiledTransform.cs, you'll find that the related stylesheet element is at
cell.xsl (1821,16).
3) I tried the following run (with stdout redirect as it is a bunch of output):
MONO_PATH="../../Spreadsheet/Converter/;../../Presentation/Converter/;../../Word/Converter/;../../Common/OdfZipUtils;../../Common/OdfConverterLib;$MONO_PATH"
mono --debug
--trace=T:System.Xml.XmlTextWriter,T:System.Xml.Xsl.NoOperationDebugger,T:Mono.Xml.Xsl.XmlWriterEmitter,OdfConverterLib,Spreadsheet
OdfConverterTest.exe /ODS2XLSX /I t00001.ods /O t00001.xlsx /LEVEL 1
Here is what I found from the output: the transformation process somehow called
WriteStartAttribute(), WriteString() and then WriteStartAttribute(), without
calling WriteEndAttribute(). No matter how Mono's internal behavior differs
from .NET, such an implementation is bogus and should be fixed.
The actual --trace output is (excerpt):
. ENTER: Mono.Xml.Xsl.XmlWriterEmitter:WriteAttributeString
(string,string,string,string)(this:0391A600[Mono.Xml.Xsl.XmlWriterEmitter
OdfConverterTest.exe], [STRING:00BAADB0:],
[STRING:036F5240:style-number-change-post], [STRING:00BAADB0:],
[STRING:03966C90:ce1], )
. . ENTER:
CleverAge.OdfConverter.Spreadsheet.OoxCommentsPostProcessor:WriteStartAttribute
(string,string,string)(this:038EEED8[CleverAge.OdfConverter.Spreadsheet.OoxCommentsPostProcessor
OdfConverterTest.exe], [STRING:00BAADB0:],
[STRING:036F5240:style-number-change-post], [STRING:00BAADB0:], )
. . . ENTER:
CleverAge.OdfConverter.Spreadsheet.OoxDrawingsPostProcessor:WriteStartAttribute
(string,string,string)(this:0392D1C0[CleverAge.OdfConverter.Spreadsheet.OoxDrawingsPostProcessor
OdfConverterTest.exe], [STRING:00BAADB0:],
[STRING:036F5240:style-number-change-post], [STRING:00BAADB0:], )
. . . . ENTER:
CleverAge.OdfConverter.Spreadsheet.OoxHeaderFooterPostProcessor:WriteStartAttribute
(string,string,string)(this:0392D1E0[CleverAge.OdfConverter.Spreadsheet.OoxHeaderFooterPostProcessor
OdfConverterTest.exe], [STRING:00BAADB0:],
[STRING:036F5240:style-number-change-post], [STRING:00BAADB0:], )
. . . . . ENTER:
CleverAge.OdfConverter.Spreadsheet.OOXStyleCellPostProcessor:WriteStartAttribute
(string,string,string)(this:039C51E0[CleverAge.OdfConverter.Spreadsheet.OOXStyleCellPostProcessor
OdfConverterTest.exe], [STRING:00BAADB0:],
[STRING:036F5240:style-number-change-post], [STRING:00BAADB0:], )
. . . . . . ENTER:
CleverAge.OdfConverter.Spreadsheet.OoxMaximumCellTextPostProcessor:WriteStartAttribute
(string,string,string)(this:03D38000[CleverAge.OdfConverter.Spreadsheet.OoxMaximumCellTextPostProcessor
OdfConverterTest.exe], [STRING:00BAADB0:], [STRING:00BAAD90:s],
[STRING:00BAADB0:], )
. . . . . . . ENTER:
CleverAge.OdfConverter.Spreadsheet.OoxPhysicalPathPostProcessor:WriteStartAttribute
(string,string,string)(this:03953B28[CleverAge.OdfConverter.Spreadsheet.OoxPhysicalPathPostProcessor
OdfConverterTest.exe], [STRING:00BAADB0:], [STRING:00BAAD90:s],
[STRING:00BAADB0:], )
. . . . . . . . ENTER:
CleverAge.OdfConverter.Spreadsheet.OoxPivotCachePostProcessor:WriteStartAttribute
(string,string,string)(this:00BA02A0[CleverAge.OdfConverter.Spreadsheet.OoxPivotCachePostProcessor
OdfConverterTest.exe], [STRING:00BAADB0:], [STRING:00BAAD90:s],
[STRING:00BAADB0:], )
. . . . . . . . . ENTER: System.Xml.XmlTextWriter:WriteStartAttribute
(string,string,string)(this:0332B540[System.Xml.XmlTextWriter
OdfConverterTest.exe], [STRING:00BAADB0:], [STRING:00BAAD90:s],
[STRING:00BAADB0:], )
. . . . . . . . . LEAVE: System.Xml.XmlTextWriter:WriteStartAttribute
(string,string,string)
. . . . . . . . LEAVE:
CleverAge.OdfConverter.Spreadsheet.OoxPivotCachePostProcessor:WriteStartAttribute
(string,string,string)
. . . . . . . LEAVE:
CleverAge.OdfConverter.Spreadsheet.OoxPhysicalPathPostProcessor:WriteStartAttribute
(string,string,string)
. . . . . . LEAVE:
CleverAge.OdfConverter.Spreadsheet.OoxMaximumCellTextPostProcessor:WriteStartAttribute
(string,string,string)
. . . . . LEAVE:
CleverAge.OdfConverter.Spreadsheet.OOXStyleCellPostProcessor:WriteStartAttribute
(string,string,string)
. . . . LEAVE:
CleverAge.OdfConverter.Spreadsheet.OoxHeaderFooterPostProcessor:WriteStartAttribute
(string,string,string)
. . . LEAVE:
CleverAge.OdfConverter.Spreadsheet.OoxDrawingsPostProcessor:WriteStartAttribute
(string,string,string)
. . LEAVE:
CleverAge.OdfConverter.Spreadsheet.OoxCommentsPostProcessor:WriteStartAttribute
(string,string,string)
. . ENTER:
CleverAge.OdfConverter.Spreadsheet.OoxCommentsPostProcessor:WriteString
(string)(this:038EEED8[CleverAge.OdfConverter.Spreadsheet.OoxCommentsPostProcessor
OdfConverterTest.exe], [STRING:03966C90:ce1], )
. . . ENTER:
CleverAge.OdfConverter.Spreadsheet.OoxDrawingsPostProcessor:WriteString
(string)(this:0392D1C0[CleverAge.OdfConverter.Spreadsheet.OoxDrawingsPostProcessor
OdfConverterTest.exe], [STRING:03966C90:ce1], )
. . . . ENTER:
CleverAge.OdfConverter.Spreadsheet.OoxHeaderFooterPostProcessor:WriteString
(string)(this:0392D1E0[CleverAge.OdfConverter.Spreadsheet.OoxHeaderFooterPostProcessor
OdfConverterTest.exe], [STRING:03966C90:ce1], )
. . . . . ENTER:
CleverAge.OdfConverter.Spreadsheet.OOXStyleCellPostProcessor:WriteString
(string)(this:039C51E0[CleverAge.OdfConverter.Spreadsheet.OOXStyleCellPostProcessor
OdfConverterTest.exe], [STRING:03966C90:ce1], )
. . . . . . ENTER:
CleverAge.OdfConverter.Spreadsheet.OoxMaximumCellTextPostProcessor:WriteString
(string)(this:03D38000[CleverAge.OdfConverter.Spreadsheet.OoxMaximumCellTextPostProcessor
OdfConverterTest.exe], [STRING:03945B00:1], )
. . . . . . . ENTER:
CleverAge.OdfConverter.Spreadsheet.OoxPhysicalPathPostProcessor:WriteString
(string)(this:03953B28[CleverAge.OdfConverter.Spreadsheet.OoxPhysicalPathPostProcessor
OdfConverterTest.exe], [STRING:03945B00:1], )
. . . . . . . . ENTER:
CleverAge.OdfConverter.Spreadsheet.OoxPivotCachePostProcessor:WriteString
(string)(this:00BA02A0[CleverAge.OdfConverter.Spreadsheet.OoxPivotCachePostProcessor
OdfConverterTest.exe], [STRING:03945B00:1], )
. . . . . . . . . ENTER: System.Xml.XmlTextWriter:WriteString
(string)(this:0332B540[System.Xml.XmlTextWriter OdfConverterTest.exe],
[STRING:03945B00:1], )
. . . . . . . . . . ENTER: System.Xml.XmlTextWriter:ShiftStateContent
(string,bool)(this:0332B540[System.Xml.XmlTextWriter OdfConverterTest.exe],
[STRING:039BBAF8:Text], 1, )
. . . . . . . . . . LEAVE: System.Xml.XmlTextWriter:ShiftStateContent
(string,bool)
. . . . . . . . . . ENTER: System.Xml.XmlTextWriter:WriteEscapedString
(string,bool)(this:0332B540[System.Xml.XmlTextWriter OdfConverterTest.exe],
[STRING:03945B00:1], 1, )
. . . . . . . . . . . ENTER: System.Xml.XmlTextWriter:WriteCheckedString
(string)(this:0332B540[System.Xml.XmlTextWriter OdfConverterTest.exe],
[STRING:03945B00:1], )
. . . . . . . . . . . LEAVE: System.Xml.XmlTextWriter:WriteCheckedString
(string)
. . . . . . . . . . LEAVE: System.Xml.XmlTextWriter:WriteEscapedString
(string,bool)
. . . . . . . . . LEAVE: System.Xml.XmlTextWriter:WriteString (string)
. . . . . . . . LEAVE:
CleverAge.OdfConverter.Spreadsheet.OoxPivotCachePostProcessor:WriteString
(string)
. . . . . . . LEAVE:
CleverAge.OdfConverter.Spreadsheet.OoxPhysicalPathPostProcessor:WriteString
(string)
. . . . . . LEAVE:
CleverAge.OdfConverter.Spreadsheet.OoxMaximumCellTextPostProcessor:WriteString
(string)
. . . . . LEAVE:
CleverAge.OdfConverter.Spreadsheet.OOXStyleCellPostProcessor:WriteString
(string)
. . . . LEAVE:
CleverAge.OdfConverter.Spreadsheet.OoxHeaderFooterPostProcessor:WriteString
(string)
. . . LEAVE:
CleverAge.OdfConverter.Spreadsheet.OoxDrawingsPostProcessor:WriteString
(string)
. . LEAVE:
CleverAge.OdfConverter.Spreadsheet.OoxCommentsPostProcessor:WriteString
(string)
. . ENTER:
CleverAge.OdfConverter.Spreadsheet.OoxCommentsPostProcessor:WriteEndAttribute
()(this:038EEED8[CleverAge.OdfConverter.Spreadsheet.OoxCommentsPostProcessor
OdfConverterTest.exe], )
. . . ENTER:
CleverAge.OdfConverter.Spreadsheet.OoxDrawingsPostProcessor:WriteEndAttribute
()(this:0392D1C0[CleverAge.OdfConverter.Spreadsheet.OoxDrawingsPostProcessor
OdfConverterTest.exe], )
. . . . ENTER:
CleverAge.OdfConverter.Spreadsheet.OoxHeaderFooterPostProcessor:WriteEndAttribute
()(this:0392D1E0[CleverAge.OdfConverter.Spreadsheet.OoxHeaderFooterPostProcessor
OdfConverterTest.exe], )
. . . . . ENTER:
CleverAge.OdfConverter.Spreadsheet.OOXStyleCellPostProcessor:WriteEndAttribute
()(this:039C51E0[CleverAge.OdfConverter.Spreadsheet.OOXStyleCellPostProcessor
OdfConverterTest.exe], )
. . . . . LEAVE:
CleverAge.OdfConverter.Spreadsheet.OOXStyleCellPostProcessor:WriteEndAttribute
()
. . . . LEAVE:
CleverAge.OdfConverter.Spreadsheet.OoxHeaderFooterPostProcessor:WriteEndAttribute
()
. . . LEAVE:
CleverAge.OdfConverter.Spreadsheet.OoxDrawingsPostProcessor:WriteEndAttribute
()
. . LEAVE:
CleverAge.OdfConverter.Spreadsheet.OoxCommentsPostProcessor:WriteEndAttribute
()
. LEAVE: Mono.Xml.Xsl.XmlWriterEmitter:WriteAttributeString
(string,string,string,string)
. ENTER: Mono.Xml.Xsl.XmlWriterEmitter:WriteAttributeString
(string,string,string,string)(this:0391A600[Mono.Xml.Xsl.XmlWriterEmitter
OdfConverterTest.exe], [STRING:00BAADB0:], [STRING:033BC120:t],
[STRING:00BAADB0:], [STRING:033BC110:s], )
. . ENTER:
CleverAge.OdfConverter.Spreadsheet.OoxCommentsPostProcessor:WriteStartAttribute
(string,string,string)(this:038EEED8[CleverAge.OdfConverter.Spreadsheet.OoxCommentsPostProcessor
OdfConverterTest.exe], [STRING:00BAADB0:], [STRING:033BC120:t],
[STRING:00BAADB0:], )
. . . ENTER:
CleverAge.OdfConverter.Spreadsheet.OoxDrawingsPostProcessor:WriteStartAttribute
(string,string,string)(this:0392D1C0[CleverAge.OdfConverter.Spreadsheet.OoxDrawingsPostProcessor
OdfConverterTest.exe], [STRING:00BAADB0:], [STRING:033BC120:t],
[STRING:00BAADB0:], )
. . . . ENTER:
CleverAge.OdfConverter.Spreadsheet.OoxHeaderFooterPostProcessor:WriteStartAttribute
(string,string,string)(this:0392D1E0[CleverAge.OdfConverter.Spreadsheet.OoxHeaderFooterPostProcessor
OdfConverterTest.exe], [STRING:00BAADB0:], [STRING:033BC120:t],
[STRING:00BAADB0:], )
. . . . . ENTER:
CleverAge.OdfConverter.Spreadsheet.OOXStyleCellPostProcessor:WriteStartAttribute
(string,string,string)(this:039C51E0[CleverAge.OdfConverter.Spreadsheet.OOXStyleCellPostProcessor
OdfConverterTest.exe], [STRING:00BAADB0:], [STRING:033BC120:t],
[STRING:00BAADB0:], )
. . . . . . ENTER:
CleverAge.OdfConverter.Spreadsheet.OoxMaximumCellTextPostProcessor:WriteStartAttribute
(string,string,string)(this:03D38000[CleverAge.OdfConverter.Spreadsheet.OoxMaximumCellTextPostProcessor
OdfConverterTest.exe], [STRING:00BAADB0:], [STRING:033BC120:t],
[STRING:00BAADB0:], )
. . . . . . . ENTER:
CleverAge.OdfConverter.Spreadsheet.OoxPhysicalPathPostProcessor:WriteStartAttribute
(string,string,string)(this:03953B28[CleverAge.OdfConverter.Spreadsheet.OoxPhysicalPathPostProcessor
OdfConverterTest.exe], [STRING:00BAADB0:], [STRING:033BC120:t],
[STRING:00BAADB0:], )
. . . . . . . . ENTER:
CleverAge.OdfConverter.Spreadsheet.OoxPivotCachePostProcessor:WriteStartAttribute
(string,string,string)(this:00BA02A0[CleverAge.OdfConverter.Spreadsheet.OoxPivotCachePostProcessor
OdfConverterTest.exe], [STRING:00BAADB0:], [STRING:033BC120:t],
[STRING:00BAADB0:], )
. . . . . . . . . ENTER: System.Xml.XmlTextWriter:WriteStartAttribute
(string,string,string)(this:0332B540[System.Xml.XmlTextWriter
OdfConverterTest.exe], [STRING:00BAADB0:], [STRING:033BC120:t],
[STRING:00BAADB0:], )
. . . . . . . . . . ENTER: System.Xml.XmlTextWriter:StateError
(string)(this:0332B540[System.Xml.XmlTextWriter OdfConverterTest.exe],
[STRING:03949E60:Attribute], )
. . . . . . . . . . . ENTER: System.Xml.XmlTextWriter:InvalidOperation
(string)(this:0332B540[System.Xml.XmlTextWriter OdfConverterTest.exe],
[STRING:0391DCC0:This XmlWriter does not accept Attribute at this state
Attribute.], )
. . . . . . . . . . . LEAVE: System.Xml.XmlTextWriter:InvalidOperation
(string)[System.InvalidOperationException:03B9E5E8]
. . . . . . . . . . LEAVE: System.Xml.XmlTextWriter:StateError
(string)[System.InvalidOperationException:03B9E5E8]
EXCEPTION handling: InvalidOperationException
EXCEPTION: finally clause 0 of
CleverAge.OdfConverter.OdfConverterLib.AbstractConverter:_Transform
(string,string)
As this trace shows, OOXStyleCellPostProcessor is likely the culprit. Here Mono
simply calls XmlWriter.WriteAttributeString() which I believe does not cause
mismatch invocation of WriteStartAttribute() and WriteEndAttribute(). Things
are all happening inside Spreadsheet.dll.
--
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