You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xmlgraphics.apache.org by bu...@apache.org on 2008/02/21 20:09:05 UTC

DO NOT REPLY [Bug 44466] New: - XMLGraphics does not accept SAXSource'd images anymore after the latest image loaders changes [w-patch]

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44466>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44466

           Summary: XMLGraphics does not accept SAXSource'd images anymore
                    after the latest image loaders changes [w-patch]
           Product: XMLGraphicsCommons
           Version: Trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: Utilities
        AssignedTo: general@xmlgraphics.apache.org
        ReportedBy: ono@java.pl
                CC: ono@java.pl


XMLmind XMLEditor is using custom URI resolver for FOPFactory, for all resolved URIs it is returning 
SAXSource rather than StreamSource.
Before 1.3 and latest FOP changes, images were loaded properly, but with latest trunk of FOP I started 
getting: [FOP Error] No ImagePreloader for ... and then Cannot open image (because URI was cached as 
wrong).

After hours of digging I found out that URI resolver of XMLmind is returning always SAXSource, while src/java/org/apache/xmlgraphics/image/loader/impl/AbstractImageSessionContext.java @ newSource 
expects StreamSource. Also image loaders work only with ImageSource, that was created only from 
StreamSource, with generic Source they fail.

I'm attaching patch for AbstractImageSessionContext.java that checks also for SAXSource and allows 
using its inputSource's byte stream.

This makes XMLmind FOP addon again usable with latest FOP trunk.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
Apache XML Graphics Project URL: http://xmlgraphics.apache.org/
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 44466] - XMLGraphics does not accept SAXSource'd images anymore after the latest image loaders changes [w-patch]

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44466>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44466


max@berger.name changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




------- Additional Comments From max@berger.name  2008-02-21 23:28 -------
Adam,

just to verify: Does xmleditor ALWAYS resolve to a SAXSource? I can understand
this on  xml-formatted images (such as SVG and MathML), but also for PNG, JPEG,
etc.? 

Because if that is the case then the real question is if this should be changed
in xmleditor rather than xmlgraphics: a SAXSource for JPEG images makes no
sense, where as support for SVG / MathML could be greatly simplified if the SAX
source is used directly. 

Max

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
Apache XML Graphics Project URL: http://xmlgraphics.apache.org/
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 44466] - XMLGraphics does not accept SAXSource'd images anymore after the latest image loaders changes [w-patch]

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44466>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44466





------- Additional Comments From ono@java.pl  2008-02-22 01:14 -------
Yes XMLMind is ALWAYS resolving to SAXSource, this is done because of some good reason stated in the 
source code :) I've forwarded this bug report to them.

However I can understand this some regression in here anyhow, because with FOP 0.94 and XMLGraphics 
1.2 it was working fine even with this SAXSource, but now it doesn't. So IMHO now matter how the 
underlaying code is written XMLGraphics shouldn't break with new release something that was working 
OK. (Also I think sthing is wrong with Java StreamSource & SAXSource inheritance, I'm not regular Java 
programmer though)

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
Apache XML Graphics Project URL: http://xmlgraphics.apache.org/
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


DO NOT REPLY [Bug 44466] - XMLGraphics does not accept SAXSource'd images anymore after the latest image loaders changes [w-patch]

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44466>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44466





------- Additional Comments From ono@java.pl  2008-02-21 11:10 -------
Created an attachment (id=21575)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=21575&action=view)
Patch that detects if source is SAXSource and uses its stream.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
Apache XML Graphics Project URL: http://xmlgraphics.apache.org/
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org