Gregory wrote:
I have other problems though:
1- If I trancode the same document, I get an output
file with a broken href/image picture not the real
image. The display of the file used to build the
document is fine in a browser (Firefox).
2- If I add xml:base="http://xml.apache.org" to the
svg root element the transcoder generates an empty
file. The svg source file displays correctly in
Firefox.
xml:base should be the absolute URL of the
Document you are setting it on (assuming the document
has proper relative references to it's resources
normally). The url's you give as examples do not
look like such URL's. Also when you set the xml:base
attribute you need to take care to use the
setAttributeNS call with the proper xml Namespace
(http://www.w3.org/XML/1998/namespace).
For the base uri I set in the svg source or with
setURI(), I have tried also "/http://xml.apache.org/"
or "/http://xml.apache.org/my-doc" but with the same
results.
Neither of these is a valid url, I suspect the second is
coming close to what you want 'http://xml.apache.org/myDoc.svg'
1- I have noticed that if the initial heap size is too
low, I can get "broken images" with the transcoder and
the rasteriser. Here I have used a heap size that is
usually fine with this type of documents. I have also
used the rasterizer with the same heap size and the
result is always fine.
I would prefer an Exception to be thrown rather than
a "broken image" pic when the transcoder cannot render
a document (whether because the link is broken or
because of memory problems).
Is it possible?
Yes, but you would need to write some code. Basically
you want to replace the SVGImageElementBridge with a
custom subclass (done by registering it with the BridgeContext)
and replace the 'createBrokenImageNode' call with one that
throws an error). It might be nice if this were exposed to the
UserAgent class.
2- The rastizer seems to works always fine whether I
use absolute url link, xml:base + relative url link or
xml:base + absolute url link.
This is a pretty clear indication that your use of
xml:base and or setURI is wrong as the rasterizer is
just a wrapper around the Transcoder classes.
I badly need to solve this problem so your help is
really appreciated.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]