To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=97170
                 Issue #|97170
                 Summary|A short XSLT stylesheet replacing a long XSLT styleshe
                        |et ends up not well-formed
               Component|xml
                 Version|OOo 3.0
                Platform|PC
                     URL|
              OS/Version|Windows XP
                  Status|UNCONFIRMED
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P2
            Subcomponent|external filters
             Assigned to|jsi
             Reported by|gkholman





------- Additional comments from gkhol...@openoffice.org Fri Dec 12 02:07:29 
+0000 2008 -------
When a revision to an XML Filter is installed, and the replacement XSLT 
stylesheet is shorter than the XSLT stylesheet being replaced, the file length 
of the end result remains that of the longer, thus putting information after 
the shorter stylesheet's document element, thus making the XSLT stylesheet not 
well-formed, thus causing the filter to fail.

The only work around is to go into the installation directory and remove the 
XSLT stylesheet by hand and then install the new shorter stylesheet.

Below is a transcript showing this.  Before the transcript begins, the XML 
filter named "Ken Test Length" with the longer stylesheet is already installed:

C:\Documents and Settings\G. Ken Holman\Application Data\OpenOffice.org\3
\user\xslt>cd "Ken Test Length"

C:\Documents and Settings\G. Ken Holman\Application Data\OpenOffice.org\3
\user\xslt\Ken Test Length>dir
 Volume in drive C has no label.
 Volume Serial Number is 4434-D020

 Directory of C:\Documents and Settings\G. Ken Holman\Application Data\OpenOffic
e.org\3\user\xslt\Ken Test Length

2008-12-11  20:38    <DIR>          .
2008-12-11  20:38    <DIR>          ..
2008-12-11  20:38               723 ken-test.xsl
               1 File(s)            723 bytes
               2 Dir(s)   4,933,181,440 bytes free

C:\Documents and Settings\G. Ken Holman\Application Data\OpenOffice.org\3
\user\xslt\Ken Test Length>xml -w ken-test.xsl
No validation errors.

C:\Documents and Settings\G. Ken Holman\Application Data\OpenOffice.org\3
\user\xslt\Ken Test Length>rem

C:\Documents and Settings\G. Ken Holman\Application Data\OpenOffice.org\3
\user\xslt\Ken Test Length>rem Now install the short XSLT

C:\Documents and Settings\G. Ken Holman\Application Data\OpenOffice.org\3
\user\xslt\Ken Test Length>rem

C:\Documents and Settings\G. Ken Holman\Application Data\OpenOffice.org\3
\user\xslt\Ken Test Length>dir
 Volume in drive C has no label.
 Volume Serial Number is 4434-D020

 Directory of C:\Documents and Settings\G. Ken Holman\Application Data\OpenOffic
e.org\3\user\xslt\Ken Test Length

2008-12-11  20:38    <DIR>          .
2008-12-11  20:38    <DIR>          ..
2008-12-11  20:39               723 ken-test.xsl
               1 File(s)            723 bytes
               2 Dir(s)   4,933,181,440 bytes free

C:\Documents and Settings\G. Ken Holman\Application Data\OpenOffice.org\3
\user\xslt\Ken Test Length>xml -w ken-test.xsl
Attempting well-formed, namespace-aware parse
Fatal error:file:///C:/Documents%20and%20Settings/G.%20Ken%20Holman/Application%
20Data/OpenOffice.org/3/user/xslt/Ken%20Test%20Length/ken-test.xsl:18:1:Content
is not allowed in trailing section.
SAX Exception: org.xml.sax.SAXParseException: Content is not allowed in trailing
 section.
Parse failed with 1 error and no warnings.

C:\Documents and Settings\G. Ken Holman\Application Data\OpenOffice.org\3
\user\xslt\Ken Test Length>



I don't yet see where on this issue report to add attachments ... I have two 
attachments.  Ken-Test-Length-Long.jar is an XML Filter with a long 
stylesheet.  Ken-Test-Length-Short.jar is an XML FIlter with a short 
stylesheet.  

To reproduce the error, first use the XML Filter "Open Package" to open Ken-
Test-Length-Long.jar and install it.  Create a new spreadsheet and export using 
the "Ken Test Length" file type to create a text file.

Next, use the XML Filter "Open Package" to open Ken-Test-Length-Short.jar and 
install it.  You will get no errors on installation, but looking in the 
directory you'll see (as in the above transcript) that the file length has not 
changed to be the shorter length.

If you try to check the well-formedness of the stylesheet (as in the above 
transcript) you'll see that the file is not well formed.  The shorter file has 
overwritten the longer file but the file length is still the longer file length.

I'll check after submission regarding how to add the two attachments.

Please let me know if you have any questions:  gkhol...@cranesoftwrights.com

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@xml.openoffice.org
For additional commands, e-mail: issues-h...@xml.openoffice.org


---------------------------------------------------------------------
To unsubscribe, e-mail: allbugs-unsubscr...@openoffice.org
For additional commands, e-mail: allbugs-h...@openoffice.org

Reply via email to