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]




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

2002-01-31 Thread Scott Moore

Sorry about the subject line, but my previous subject "SVG Problem with FOP"
got no replies.  I only just recently learned about the FOP User list; up
till now it hasn't been well advertised.

Your reply was very informative (thank you very much) and from your list of
possible solutions, I've tried #3.  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'" 

The exception generated by Batik now identifies the correct file, but still
can't seem to locate the gradient definition.  In the Gradient.svg file I
copied the following:

http://www.w3.org/2000/svg";>
  

  


  

  


I've also tried

http://www.w3.org/2000/svg";>

  


  




I've also tried removing  and  (in a desperate search for a
solution).  Nothing works.

Is there anything I'm doing that is blatantly wrong?  I'm hoping I just
haven't created my Gradient.svg correctly.

Thanks again,
Scott




-Original Message-
From: Joerg Pietschmann [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 31, 2002 4:55 AM
To: FOP Dev
Subject: Re: Please help, even if it's just a reply that it can't be
done


"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 

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]

-
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:
> 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 

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]




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

2002-01-30 Thread Scott Moore

I cross-posted this several days ago and didn't get a single reply.  If
someone could please let me know what the problem is, I would greatly
appreciate it.  Even if it means that my SVG cannot use  in FOP.

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

I figure it's got to be one of the above.

Thanks very much,
Scott

PS. What version of Batik comes with FOP 0.20.3rc?


- Original Message -
From: Scott Moore
To: FOP User
Sent: Friday, January 25, 2002 10:43 AM
Subject: SVG Problem with FOP


I'm trying to embed the following SVG into my XSL-FO and run it thru
FOP (0.20.3rc).  Although the SVG looks fine using Adobe's SVG viewer and
Batik's viewer, I get an
error (below) from FOP.  Apparently, it doesn't like the url() reference
to the .  How can I get this to work?

Thanks for any help,
Scott


http://www.w3.org/2000/svg  "
preserveAspectRatio="none">
 
  
   


   
  
  
  
  D
 



An I/O error occured while processing the URI
'file:D:/Projects/Dev/#PurpleToWhite' specified on the element 
org.apache.batik.bridge.BridgeException: file:D:/Projects/Dev/:-1
An I/O error occured while processing the URI
'file:D:/Projects/Dev/#PurpleToWhite' specified on the element 
at
org.apache.batik.bridge.BridgeContext.getReferencedElement(Unknown So
urce)
at org.apache.batik.bridge.PaintServer.convertURIPaint(Unknown
Source)
at org.apache.batik.bridge.PaintServer.convertPaint(Unknown
Source)
at org.apache.batik.bridge.PaintServer.convertFillPaint(Unknown
Source)
at
org.apache.batik.bridge.PaintServer.convertFillAndStroke(Unknown Sour
ce)
at
org.apache.batik.bridge.SVGShapeElementBridge.createShapePainter(Unkn
own Source)
at
org.apache.batik.bridge.SVGShapeElementBridge.buildGraphicsNode(Unkno
wn Source)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown
Source)
at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown
Source)
at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown
Source)
at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown
Source)
at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
at
org.apache.fop.render.pdf.PDFRenderer.renderSVGDocument(PDFRenderer.j
ava:413)
at
org.apache.fop.render.pdf.PDFRenderer.renderSVGArea(PDFRenderer.java:
382)
at org.apache.fop.svg.SVGArea.render(SVGArea.java:58)
at
org.apache.fop.render.pdf.PDFRenderer.renderForeignObjectArea(PDFRend
erer.java:366)
at
org.apache.fop.layout.inline.ForeignObjectArea.render(ForeignObjectAr
ea.java:50)
at
org.apache.fop.render.AbstractRenderer.renderLineArea(AbstractRendere
r.java:223)
at org.apache.fop.layout.LineArea.render(LineArea.java:163)
at
org.apache.fop.render.AbstractRenderer.renderBlockArea(AbstractRender
er.java:192)
at org.apache.fop.layout.BlockArea.render(BlockArea.java:82)
at
org.apache.fop.render.AbstractRenderer.renderAreaContainer(AbstractRe
nderer.java:158)
at
org.apache.fop.render.pdf.PDFRenderer.renderPage(PDFRenderer.java:735
)
at
org.apache.fop.render.pdf.PDFRenderer.render(PDFRenderer.java:700)
at
org.apache.fop.apps.StreamRenderer.queuePage(StreamRenderer.java:217)

at org.apache.fop.layout.AreaTree.addPage(AreaTree.java:81)
at
org.apache.fop.fo.pagination.PageSequence.format(PageSequence.java:30
7)
at
org.apache.fop.apps.StreamRenderer.render(StreamRenderer.java:200)
at
org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:182)
at
org.apache.fop.tools.DocumentReader.parse(DocumentReader.java:463)
at org.apache.fop.apps.Driver.render(Driver.java:481)
at org.apache.fop.apps.Driver.render(Driver.java:501)
at org.apache.fop.apps.Driver.run(Driver.java:552)






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