Re: Please help, even if it's just a reply that it can't be done

2002-01-31 Thread Joerg Pietschmann

Scott Moore [EMAIL PROTECTED] wrote:
 I cross-posted this several days ago and didn't get a single reply.

Before i get to the meat, a net.cop note: Use meaningful subjects,
don't mention crossposting (even if it is justified in the first place),
don't bother the gurus in the dev lists, there are user lists.

 Is the problem in my XSL-FO?
 Is the problem in my SVG?
 Is the problem with Batik?
 Is the problem with FOP?

Well, ultimately the problem is caused by a somewhat unlucky choice
of the SVG standards group...

 An I/O error occured while processing the URI
 'file:D:/Projects/Dev/#PurpleToWhite' specified on the element circle

The url(#PurpleToWhite) in your circle element is a relative URL
which was resolved to the absolute URL in the error message above,
which, as it apparently represents a directory, is not a good source
for SVG gradients.
The reason why you got the absolute URL above depends on how you
invoked FOP and perhaps a few other circumstances. In any case it has
to point to a valid SVG file (or at least XML). This may be somewhat
problematic as you probably generate the SVG inline in the FO tree.

You could try
1. Have a separate SVG file and use it with fo:external-graphics
2. Have a separate SVG which contains only the gradient (and perhaps
   other SVG stuff you want to reference) and point an absolute URL
   to it:
 fill=url(file:///c:/refstuff/grad.svg#PurpleToWhite)
3. Same as above but use a relative URL
 fill=url(grad.svg#PurpleToWhite)
   This may be easier to deploy. Put the file in D:/Projects/Dev.
4. Let the URL refer to some location where the gradient could be
   retrieved, for example if the SVG code is embedded in your XSL,
   try fill=url(my.xsl#PurpleToWhite). Don't know whether this
   works, or whether this is even supposed to work.
Expect a performance hit in all cases.

Ultimately, both FOP and especially Batik should be fixed to make
your code work as expected, but this will not only take some time
but also some efford by a standard committee in order to make the
semantics of this kind of references in embedded SVG clearer.

HTH
J.Pietschmann

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




RE: Please help, even if it's just a reply that it can't be done

2002-01-31 Thread Joerg Pietschmann

Scott Moore [EMAIL PROTECTED] wrote:
 Sorry about the subject line, but my previous subject SVG Problem with FOP
 got no replies.
I read it but had real work to do.

 However, it still can't locate the
 gradient definition.  It gives the following error An I/O error occured
 while processing the URL 'file:C:/Projects/Dev/Gradient.svg#PurpleToWhite'

Try an absolute URL, with emphasis to the triple slash, as this is
the correct form for file URLs.
  file:///C:/Projects/Dev/Gradient.svg#PurpleToWhite
Check the location carefully. If this succeeds, you could try
to set the baseDir configuration parameter to
file:///C:/Projects/Dev/, search the FOP doc for how to do
this (presumably in the userconfig.xml).

 The exception generated by Batik now identifies the correct file, but still
 can't seem to locate the gradient definition.

The I/O-Error seems to indicate the generic problem of not
getting some or all of the content of the file. Changing the
content wont fix this. You may have to experiment a bit.
For example, try access a small GIF from this directory
as fo:external-graphic. If FOP gets an error with the GIF
file, it's the directory or the URL syntax or something 
more general. If the GIF shows up, it's your SVG file, perhaps
you should check well-formedness or SVG-validity or whatever.
I really can't help much further, you'll have to solve the
problem for yourself.

HTH
J.Pietschmann

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]