Re: (Jay) RE: RE: Batik Extension/FOP problem

2003-09-24 Thread Thomas DeWeese
Jay Chiu wrote:
Glen,

The reason that the svg portion does not work in Batik Squiggle
is because of the namespace. The embedded svg needs svg:
prefix and probably batik: prefix for flowText elements. 

Attached please find a svg file that works in squiggle. I tried
three different ways to embed it into a fo file. But all
failed.
The third example is the closest to being correct but you
didn't define the batik namespace prefix you need to add:
xmlns:batik=http://xml.apache.org/batik/ext;
On the 'svg' element where you define the 'svg', and 'xlink'
namespace prefixes.
   Have you tried splitting up the 'averylongrunnonword...'?
This might be causing FOP problems since it isn't in it's dictionary.
Here are the fop result:
(1) embedding_flowtext.fo, with not svg:/batik: prefix
FOP output:
[INFO] 1.0dev
[WARNING] Unknown formatting object ^svg
[WARNING] Unknown formatting object ^title
[WARNING] Unknown formatting object ^g
[WARNING] Unknown formatting object ^text
Process terminated with exit code 0
(2) embedding_flowtext1.fo with svg: prefix, without batik:
prefix and embedding_flowtext2.txt with both svg: and batik:
prefix
FOP output:
[INFO] 1.0dev
[ERROR] findHyphenPoss: problem!
[ERROR] findHyphenPoss: problem!
[ERROR] findHyphenPoss: problem!
[ERROR] findHyphenPoss: problem!
[ERROR] findHyphenPoss: problem!
[ERROR] findHyphenPoss: problem!
[ERROR] findHyphenPoss: problem!
[ERROR] findHyphenPoss: problem!
[ERROR] findHyphenPoss: problem!
FOP program keeps print out this error. Never stop.
Can you please tell me how to embed the svg into the fo file?

Thanks a lot.

Jay

 On Sun, 23 Sep 2003, Glen Mazza ([EMAIL PROTECTED]) wrote:
Jay,
I took your FO file and stripped out everything but
the SVG portion (i.e., everything within
fo:instream-foreign-object), and renamed the file
test.svg.
Next, I ran Batik's Squiggle SVG browser on this
test.svg--I got the same undesired result within
Squiggle--a yellow rectangle--as you got in the PDF
document.  So the problem does not appear to be with
FOP--at least on this issue--but with either your SVG
or with Batik.
FOP uses Batik for SVG--if your SVG portion is not
working with Batik/Squiggle, it won't work with FOP. 
Batik is another library, another team--I don't handle
it.

In this debugging, what I need next from you is an SVG
file using Batik extension elements that runs fine in
Squiggle, but when put within FOP
fo:instream-foreign-object, won't run.  If you can
do that, then we can resume debugging within FOP.  If
you *can't* get there--i.e., Squiggle isn't doing
anything with those extension elements--then you may
need to start directing some questions to the Batik
user list to find out what the problem is.
Thanks,
Glen

Jay,

I added in a new Batik extension element mapping in
our main trunk code--this should help you.  It is not
perfect--I noticed a hyphenation warning during
running your sample fo document; also I ran one of the
samples in the Batik directory (I embedded gears.svg
into an FO document)--it *appears* to work, but
several issues may appear on our side or Batik's that
we will need to fix.
Please test it out--wait 6 hours for a nightly
snapshot to appear (see our Download link on the main
FOP page)--any problems you find, please add to
Bugzilla, so we can get them fixed.  (You'll find a
Bugs link on the main FOP page.)
Thanks,
Glen
--- Jay Chiu [EMAIL PROTECTED] wrote:

Attached please find a sample fo file with embedded
svg object.
You may also take a look at the batik samples,
xml-batik/samples/extensions/flow/flowtext.svg


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design
software

http://sitebuilder.yahoo.com





Get your own 800 number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag


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





Re: (Jay) RE: RE: Batik Extension/FOP problem

2003-09-23 Thread Glen Mazza
Quite possibly.  FOP does not appear ready for your
needs at this time.

Glen

--- Jay Chiu [EMAIL PROTECTED] wrote:
 
 I have not seen the error [ERROR] findHyphenPoss:
 problem! in
 previous FOP versions. Could it be some recent
 change causing
 this problem?
 
 Thanks.
 
 Jay 
 
 
 
 
 Get your own 800 number
 Voicemail, fax, email, and a lot more
 http://www.ureach.com/reg/tag
 
 
  On Sat, 13 Sep 2003, Glen Mazza
 ([EMAIL PROTECTED]) wrote:
 
  Jay,
  
  I added in a new Batik extension element mapping
 in
  our main trunk code--this should help you.  It is
 not
  perfect--I noticed a hyphenation warning during
  running your sample fo document; also I ran one of
 the
  samples in the Batik directory (I embedded
 gears.svg
  into an FO document)--it *appears* to work, but
  several issues may appear on our side or Batik's
 that
  we will need to fix.
  
  Please test it out--wait 6 hours for a nightly
  snapshot to appear (see our Download link on the
 main
  FOP page)--any problems you find, please add to
  Bugzilla, so we can get them fixed.  (You'll find
 a
  Bugs link on the main FOP page.)
  
  Thanks,
  Glen
  
  
  --- Jay Chiu [EMAIL PROTECTED] wrote:
   Attached please find a sample fo file with
 embedded
   svg object.
   You may also take a look at the batik samples,
   xml-batik/samples/extensions/flow/flowtext.svg

  
  
  __
  Do you Yahoo!?
  Yahoo! SiteBuilder - Free, easy-to-use web site
 design
 software
  http://sitebuilder.yahoo.com
  
  
 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


Re: Re: (Jay) RE: RE: Batik Extension/FOP problem

2003-09-21 Thread Glen Mazza
I think I got the same result you did.  I'll look into
the problem.

Glen

--- Jay Chiu [EMAIL PROTECTED] wrote:
 I got the hanging problem when I used command
 fop.bat xx.fo
 xx.pdf. However FOP does NOT hang, when I run it in
 IntelliJ.
 Probably it relates to the JDK classpath.
 
 But it seems the Batik extension still not working.
 I tried the
 attached .fo file. The generated pdf file does not
 have flowText
 sections. Can you give me your fo test file? 
 
 Thank you very much.
 
 Jay 
 
 
 
 
 
 Get your own 800 number
 Voicemail, fax, email, and a lot more
 http://www.ureach.com/reg/tag
 
 
  On Sat, 20 Sep 2003, Glen Mazza
 ([EMAIL PROTECTED]) wrote:
 
  Jay,
  
  Thanks for checking and sorry for the
 delay--Isabel
  took away my electricity for two days.
  
  Like Andreas, I didn't see the hanging you
 mentioned.
  Also, your error message was the hyphenation
 issue I
  mentioned below--those will occur, which I'm sadly
 not
  trained to fix right now--I'm on other issues at
 this
  moment.
  
  But thanks for mentioning them--Again, add
 problems
  you find to Bugzilla with a specific and as
 simplified
  example as possible--we'll get to them, it just
 may
  not be as soon as desired.
  
  Glen
  
  
  --- Jay Chiu [EMAIL PROTECTED] wrote:
   Glen, 
   
   Thank you for help. But the fop of cvs snapshot
   hangs on
   processing fo file.
   
   I tried today's packages, 20030919221605 and
   20030919041528,
   untar'ed and ran build.bat to create fop.jar
 file on
   XP machine.
   Then I ran fop.bat on fo files to generate pdf.
 But
   it always
   hangs. It prints out [ERROR] findHyphenPoss:
   problem! on
   processing examples/fo/embedding.fo and
   examples\fo\advanced\giro.fo.  
   
   Can you please check?
   
   Thanks a lot.
   
   Jay
   
   
   
   
   Get your own 800 number
   Voicemail, fax, email, and a lot more
   http://www.ureach.com/reg/tag
   
   
    On Sat, 13 Sep 2003, Glen Mazza
   ([EMAIL PROTECTED]) wrote:
   
Jay,

I added in a new Batik extension element
 mapping
   in
our main trunk code--this should help you.  It
 is
   not
perfect--I noticed a hyphenation warning
 during
running your sample fo document; also I ran
 one of
   the
samples in the Batik directory (I embedded
   gears.svg
into an FO document)--it *appears* to work,
 but
several issues may appear on our side or
 Batik's
   that
we will need to fix.

Please test it out--wait 6 hours for a nightly
snapshot to appear (see our Download link on
 the
   main
FOP page)--any problems you find, please add
 to
Bugzilla, so we can get them fixed.  (You'll
 find
   a
Bugs link on the main FOP page.)

Thanks,
Glen


--- Jay Chiu [EMAIL PROTECTED] wrote:
 Attached please find a sample fo file with
   embedded
 svg object.
 You may also take a look at the batik
 samples,

 xml-batik/samples/extensions/flow/flowtext.svg
  


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web
 site
   design
   software
http://sitebuilder.yahoo.com


   
  
  
  __
  Do you Yahoo!?
  Yahoo! SiteBuilder - Free, easy-to-use web site
 design
 software
  http://sitebuilder.yahoo.com
  
  
 

 ATTACHMENT part 2 application/octet-stream 


 ATTACHMENT part 3 application/pdf 



__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


RE: (Jay) RE: RE: Batik Extension/FOP problem

2003-09-20 Thread Andreas L. Delmelle
 -Original Message-
 From: Jay Chiu [mailto:[EMAIL PROTECTED]

 Thank you for help. But the fop of cvs snapshot hangs on
 processing fo file.

 I tried today's packages, 20030919221605 and 20030919041528,
 untar'ed and ran build.bat to create fop.jar file on XP machine.
 Then I ran fop.bat on fo files to generate pdf. But it always
 hangs. It prints out [ERROR] findHyphenPoss: problem! on
 processing examples/fo/embedding.fo and
 examples\fo\advanced\giro.fo.


Jay,

I've just been running the same test ( examples/fo/advanced/giro.fo ) and
received the same 'hyphenation errors'. ( on Mac OS X ) It didn't hang,
however ( gave me an exception on a non-existing tiff - just removed the ref
from the fo, parsed again and the operation finished ). Also, I've noticed
that the logger-output from the dev-version is not completely finished ( so
it would appear to hang at a certain point, but if you leave it running, it
will finish... )

Glen,

Could you shed some more light on this issue?


Thanks.

Greetz,

Andreas



Re: (Jay) RE: RE: Batik Extension/FOP problem

2003-09-20 Thread J.Pietschmann
Andreas L. Delmelle wrote:
I've just been running the same test ( examples/fo/advanced/giro.fo ) and
received the same 'hyphenation errors'.
That's a known problem of the HEAD code. Are you sure you want
to use this?
J.Pietschmann



Re: (Jay) RE: RE: Batik Extension/FOP problem

2003-09-20 Thread Glen Mazza
If he's using the transcoder, he has no other choice
(fortunately)--that's the only place where they are
supported.

Glen

--- J.Pietschmann [EMAIL PROTECTED] wrote:
 Andreas L. Delmelle wrote:
  I've just been running the same test (
 examples/fo/advanced/giro.fo ) and
  received the same 'hyphenation errors'.
 
 That's a known problem of the HEAD code. Are you
 sure you want
 to use this?
 
 J.Pietschmann
 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


Re: (Jay) RE: RE: Batik Extension/FOP problem

2003-09-20 Thread Glen Mazza
Jay,

Thanks for checking and sorry for the delay--Isabel
took away my electricity for two days.

Like Andreas, I didn't see the hanging you mentioned.
Also, your error message was the hyphenation issue I
mentioned below--those will occur, which I'm sadly not
trained to fix right now--I'm on other issues at this
moment.

But thanks for mentioning them--Again, add problems
you find to Bugzilla with a specific and as simplified
example as possible--we'll get to them, it just may
not be as soon as desired.

Glen


--- Jay Chiu [EMAIL PROTECTED] wrote:
 Glen, 
 
 Thank you for help. But the fop of cvs snapshot
 hangs on
 processing fo file.
 
 I tried today's packages, 20030919221605 and
 20030919041528,
 untar'ed and ran build.bat to create fop.jar file on
 XP machine.
 Then I ran fop.bat on fo files to generate pdf. But
 it always
 hangs. It prints out [ERROR] findHyphenPoss:
 problem! on
 processing examples/fo/embedding.fo and
 examples\fo\advanced\giro.fo.  
 
 Can you please check?
 
 Thanks a lot.
 
 Jay
 
 
 
 
 Get your own 800 number
 Voicemail, fax, email, and a lot more
 http://www.ureach.com/reg/tag
 
 
  On Sat, 13 Sep 2003, Glen Mazza
 ([EMAIL PROTECTED]) wrote:
 
  Jay,
  
  I added in a new Batik extension element mapping
 in
  our main trunk code--this should help you.  It is
 not
  perfect--I noticed a hyphenation warning during
  running your sample fo document; also I ran one of
 the
  samples in the Batik directory (I embedded
 gears.svg
  into an FO document)--it *appears* to work, but
  several issues may appear on our side or Batik's
 that
  we will need to fix.
  
  Please test it out--wait 6 hours for a nightly
  snapshot to appear (see our Download link on the
 main
  FOP page)--any problems you find, please add to
  Bugzilla, so we can get them fixed.  (You'll find
 a
  Bugs link on the main FOP page.)
  
  Thanks,
  Glen
  
  
  --- Jay Chiu [EMAIL PROTECTED] wrote:
   Attached please find a sample fo file with
 embedded
   svg object.
   You may also take a look at the batik samples,
   xml-batik/samples/extensions/flow/flowtext.svg

  
  
  __
  Do you Yahoo!?
  Yahoo! SiteBuilder - Free, easy-to-use web site
 design
 software
  http://sitebuilder.yahoo.com
  
  
 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


RE: (Jay) RE: RE: Batik Extension/FOP problem

2003-09-14 Thread Andreas L. Delmelle
 -Original Message-
 From: Glen Mazza [mailto:[EMAIL PROTECTED]

 I added in a new Batik extension element mapping in
 our main trunk code--this should help you.  It is not

Glen,

I'm just being curious: did my remarks turn out to be helpful here? (I just
want to check to what extent I'm beginning to understand the internals of
the application...)


 Please test it out--wait 6 hours for a nightly
 snapshot to appear (see our Download link on the main

Have done so. Well, not the Batik extension element mapping in particular,
but I had been embedding the maintenance version up to now. Switched it to
1.0dev and basic functionality seems to be A-OK.
I've run into a few cases though where the maintenance version did its work
just fine, but 1.0dev seems to be 'unfinished' - as mostly happens with
nightly builds, I guess.
I'm not sure which of these problems are already being worked on, and as I
most certainly do not want to end up 'spamming' fop-dev with a bunch of
pseudo-bugs, I'll just name a few here. If there's little insects crawling
around in here you think I'd better report to Bugzilla, just let me know :

1. links ( internal  external ) don't work: neither in my own documents,
nor in the newlinktest.fo example that comes with FOP
2. background-color [? this might be working fine: I defined a bg-c for a
table-body - now seems to disappear; works if I add them to table-cell
instead of table-body - so could be that it now actually is working
correctly by 'covering' the background of body with that of the cell... I
still need to check the spec  run a few tests to see whether this behaviour
is compliant: CSS seems to silently presuppose that if no bg-c is explicitly
defined, table-cell would inherit the value of its parent - in this case
table-row, but as none was specified there either, one would expect it to be
the color of table-body... ]
3. break-before  -after seem to have no effect


Read you later.

Greetz,


Andreas



RE: (Jay) RE: RE: Batik Extension/FOP problem

2003-09-14 Thread Glen Mazza
--- Andreas L. Delmelle [EMAIL PROTECTED]
wrote:
 I'm just being curious: did my remarks turn out to
 be helpful here? (I just
 want to check to what extent I'm beginning to
 understand the internals of
 the application...)
 

I was happy to see you going through the source code. 
Also welcome to the FOP-DEV list.

Main issue is that we could not just switch from
SVGDOMImplementation to ExtendedSVGDOMImplementation
as Thomas (I believe) had thought.  The latter is not
really a superclass of the former--they're different
sets of elements with different namespaces.  (To that
end, the superclass-subclass relationship of these two
classes in the Batik code does not seem correct to
me.)  So I just added in one more ElementMapping
subclass in the fo.extensions.svg package for the
Batik Extension elements.

 I'm not sure which of these problems are already
 being worked on, and as I
 most certainly do not want to end up 'spamming'
 fop-dev with a bunch of
 pseudo-bugs

Don't kill yourself here--the majority of 1.0 is still
unimplemented.  I was strictly more concerned about
the Batik extensions working for this particular
point.  (For sanity retention, I try to narrow my
concerns to one or two topics for each week.)

 CSS seems to silently presuppose that
 if no bg-c is explicitly
 defined, table-cell would inherit the value of its
 parent - in this case
 table-row, but as none was specified there either,
 one would expect it to be
 the color of table-body... ]

Well, not everything is inherited in the XSL FO
standard--http://www.w3.org/TR/xsl/slice7.html#background-color
says bg-c is not inherited (but evidently can be if
inherit is chosen as a value, so I'm not sure how
FOP should handle this.)

Glen

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


(Jay) RE: RE: Batik Extension/FOP problem

2003-09-13 Thread Glen Mazza
Jay,

I added in a new Batik extension element mapping in
our main trunk code--this should help you.  It is not
perfect--I noticed a hyphenation warning during
running your sample fo document; also I ran one of the
samples in the Batik directory (I embedded gears.svg
into an FO document)--it *appears* to work, but
several issues may appear on our side or Batik's that
we will need to fix.

Please test it out--wait 6 hours for a nightly
snapshot to appear (see our Download link on the main
FOP page)--any problems you find, please add to
Bugzilla, so we can get them fixed.  (You'll find a
Bugs link on the main FOP page.)

Thanks,
Glen


--- Jay Chiu [EMAIL PROTECTED] wrote:
 Attached please find a sample fo file with embedded
 svg object.
 You may also take a look at the batik samples,
 xml-batik/samples/extensions/flow/flowtext.svg
  


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


Re: Batik Extension/FOP problem

2003-09-09 Thread Thomas DeWeese
Glen Mazza wrote:
Thomas,

Two concerns on making this change in our production
version: 

1.) We do not have plans anytime soon for making a new
release of maintenance--so, if I made the change, the
new pdftranscoder.jar could be based only on a nightly
build--is that OK with you?
  I think that would be fine.

2.) I checked out xml-batik and ran ant dist-zip--it
created many jar files, but no single batik.jar file
that FOP currently relies on:
http://cvs.apache.org/viewcvs.cgi/xml-fop/lib/batik.jar

How do I obtain a single batik.jar for me to compile
the changed application against?  What does an
official batik.jar include?
  I don't know for certain but I suspect that this
is all the classes from the source tree and files from
the resource tree in batik (you could trim a little
- get rid of interactive stuff but it would be small).
  Currently we always distribute the 'many' jar files
we provide a convenience batik.jar that just references
all the other jar files.
  The simplest way to get the jar would be to clean the
compile tree.  Run 'build compile' then jar classes and
'resources'.



Re: Batik Extension/FOP problem

2003-09-08 Thread Glen Mazza
Thomas,

Two concerns on making this change in our production
version: 

1.) We do not have plans anytime soon for making a new
release of maintenance--so, if I made the change, the
new pdftranscoder.jar could be based only on a nightly
build--is that OK with you?

2.) I checked out xml-batik and ran ant dist-zip--it
created many jar files, but no single batik.jar file
that FOP currently relies on:

http://cvs.apache.org/viewcvs.cgi/xml-fop/lib/batik.jar

How do I obtain a single batik.jar for me to compile
the changed application against?  What does an
official batik.jar include?

Thanks,
Glen

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


Re: RE: Batik Extension/FOP problem

2003-09-07 Thread Jay Chiu
1. This is an alternative way I try to solve the FOP absolute
positoned block-container issue.

2. The FOP version is fop-0.20.5 with batik jar and tried with
batik version 1.5.

3. As we have sent back and forth the question and answers so
many times, can someone doing the SVG for FOP please take a look
at my batik extension code and help me solve the problem? I hope
someone know the details of both FOP and SVG may help me.
I am affraid that FOP does not contain Batik extension because
FOP developor did not feel it is easy to add. 

Thanks a lot.

Jay



  Jihai Qiu wrote:
   The CCS engine for the document is set in
   BridgeContext.initializeDocument(), which is called by
   org.apache.batik.bridge.GVTBuilder.build(). But it seems
there is no way
   to set CCS engine from FOP classes(such as BatikElement).
(I do
  not want to
   modify Batik source code).
  
  
  It also appears that you are trying to map just the
flowText element.
  
   For the svg elements, FOP extension maps svg to
SVGElement
  and all other
   tags to SVGObj. I am using the same approach for batik
extensions:
   flowText to BatikElement and all other tags to BatikObj.
BatikElement
   creates the root document for batik namespace.
 
  You can't really render an SVG document as a bunch of
  disconnected pieces.
 
 
 If this *is* related to the 'absolute positioned
block-container' issue, I
 think the SVG approach,  in this case, might be complicating
matters
 unnecessarily (though I must admit, it might seem the only
viable
 alternative right now, apart from somehow 'preprocessing' your
fo to make it
 contain 'exact' coordinates where needed...)
 
   The SVG specification is pretty clear that SVG elements
must have a
   parent SVG element
   It seems Batik requires each child of SVG element must be
SVG
  element( or
   belongs to same document).
   svg Batik DOM element is created through
SVGDOMImplmentation, while
   flowText Batik DOM element is created through
   ExtensibleSVGOMImplementation. I have to have a different
root document
   for all the batik extension elements, otherwise the system
uses
   SVGDOMImplementation to create generic DOM element.
 
 It sounds like you want to make a small change so FOP
uses the
  ExensibleSVGDOMImplementation instead of
SVGDOMImplementation for all
  the elements.
 
  I think you really want to try and fix the existing SVG
element
   mapping stuff in FOP.
   How to do this? I stuck in this problem now and do not
know
  what to do the
   next. Can someone please help me implement this batik
extension in FOP?
 
 I don't think you can really fix this without making
changes in FOP.
  It looks like you might be able to just change the init
method in
  SVGElement.
 
 
 Just to be on the safe side: in the meantime, we still don't
know which
 version(s) of batik/fop are being used here... ;)
 
 but apart from that, if the ExtensibleSVGDOMImplementation
behaves
 completely the same way... this might be worth a little patch.
The
 svg-embedding example coming with FOP works if you make this
change. ( to
 FOP 0.20.5 release )
 
 Greetz,
 
 Andreas Delmelle
 
 

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



Get your own 800 number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag

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



RE: RE: Batik Extension/FOP problem

2003-09-07 Thread Glen Mazza
Jay,

Please type this up in Bugzilla so we don't forget it.
(http://xml.apache.org/fop/bugs.html)--Also include
this sample as an attachment to the bug.  No time
guarantees can be given, however.

In the meantime, Thomas, I don't think I can just
switch our SVGElementMapping implementation from
SVGDOMImplementation to ExtensibleSVGDOMImplementation

because the namespaces are different.  I'll need to
add another ElementMapping to production and
development.  

*But*, as you can see in our SVGElementMapping
implementation, we rely on a constant
SVGDOMImplementation.SVG_NAMESPACE_URI.  

File below:
http://cvs.apache.org/viewcvs.cgi/xml-fop/src/java/org/apache/fop/fo/extensions/svg/SVGElementMapping.java?rev=1.1content-type=text/vnd.viewcvs-markup

To facilitate this change, could you create a
similar--of whatever name--namespace constant in your
ExtensibleSVGDOMImplementation class--probably it
should be http://xml.apache.org/batik/ext;.

Thanks,
Glen


--- Jay Chiu [EMAIL PROTECTED] wrote:
 Attached please find a sample fo file with embedded
 svg object.
 You may also take a look at the batik samples,
 xml-batik/samples/extensions/flow/flowtext.svg
  
 FOP does support the base SVG 1.1 funcationality as
 Batik
 supports. But SVG 1.1 does not support more flexible
 text
 feature, such as text can not wrap onto multiple
 lines. 

--- Thomas DeWeese [EMAIL PROTECTED] wrote:
 I have to have a
 different root document
  for all the batik extension elements, otherwise
 the system uses
  SVGDOMImplementation to create generic DOM
 element.
 
It sounds like you want to make a small change so
 FOP uses the
 ExensibleSVGDOMImplementation instead of
 SVGDOMImplementation for all
 the elements.
 


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: Batik Extension/FOP problem

2003-09-07 Thread Thomas DeWeese
Hi Glen,

   So there already is such a constant:

batik.extension.svg.BatikExtConstants.BATIK_EXT_NAMESPACE_URI.

   I shouldn't add this to ExtensibleSVGDOMImplementation as
it is exactly that extensible.  The set of Namespaces it
supports is determined at run time based on the Service Provider
Interface.  I could add methods to query what namespaces have
been registered with it but registration is actually on a
per-element basis (namespace + localName) - so it might have
one or two elemets borrowed from other namespaces.  This isn't
that big an issue at this point since the only extensions
I am aware of are the Batik ones which are all in the above
namespace.
   Do you want to add an interface for getting the list of
namespaces that it has elements registered under (just SVG,
Batik for right now)?
Glen Mazza wrote:
Jay,

Please type this up in Bugzilla so we don't forget it.
(http://xml.apache.org/fop/bugs.html)--Also include
this sample as an attachment to the bug.  No time
guarantees can be given, however.
In the meantime, Thomas, I don't think I can just
switch our SVGElementMapping implementation from
SVGDOMImplementation to ExtensibleSVGDOMImplementation
because the namespaces are different.  I'll need to
add another ElementMapping to production and
development.  

*But*, as you can see in our SVGElementMapping
implementation, we rely on a constant
SVGDOMImplementation.SVG_NAMESPACE_URI.  

File below:
http://cvs.apache.org/viewcvs.cgi/xml-fop/src/java/org/apache/fop/fo/extensions/svg/SVGElementMapping.java?rev=1.1content-type=text/vnd.viewcvs-markup
To facilitate this change, could you create a
similar--of whatever name--namespace constant in your
ExtensibleSVGDOMImplementation class--probably it
should be http://xml.apache.org/batik/ext;.
Thanks,
Glen
--- Jay Chiu [EMAIL PROTECTED] wrote:

Attached please find a sample fo file with embedded
svg object.
You may also take a look at the batik samples,
xml-batik/samples/extensions/flow/flowtext.svg
FOP does support the base SVG 1.1 funcationality as
Batik
supports. But SVG 1.1 does not support more flexible
text
feature, such as text can not wrap onto multiple
lines. 


--- Thomas DeWeese [EMAIL PROTECTED] wrote:

I have to have a
different root document
for all the batik extension elements, otherwise
the system uses

SVGDOMImplementation to create generic DOM
element.

  It sounds like you want to make a small change so
FOP uses the
ExensibleSVGDOMImplementation instead of
SVGDOMImplementation for all
the elements.


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com





Re: Batik Extension/FOP problem

2003-09-07 Thread Thomas DeWeese
Jihai Qiu wrote:
The CCS engine for the document is set in
BridgeContext.initializeDocument(), which is called by
org.apache.batik.bridge.GVTBuilder.build(). But it seems there is no way
to set CCS engine from FOP classes(such as BatikElement). (I do not want to
modify Batik source code).

It also appears that you are trying to map just the flowText element.
For the svg elements, FOP extension maps svg to SVGElement and all other
tags to SVGObj. I am using the same approach for batik extensions:
flowText to BatikElement and all other tags to BatikObj. BatikElement
creates the root document for batik namespace.
   You can't really render an SVG document as a bunch of disconnected pieces.

The SVG specification is pretty clear that SVG elements must have a
parent SVG element
It seems Batik requires each child of SVG element must be SVG element( or
belongs to same document).
svg Batik DOM element is created through SVGDOMImplmentation, while
flowText Batik DOM element is created through
ExtensibleSVGOMImplementation. I have to have a different root document
for all the batik extension elements, otherwise the system uses
SVGDOMImplementation to create generic DOM element.
  It sounds like you want to make a small change so FOP uses the
ExensibleSVGDOMImplementation instead of SVGDOMImplementation for all
the elements.
I think you really want to try and fix the existing SVG element
mapping stuff in FOP.
How to do this? I stuck in this problem now and do not know what to do the
next. Can someone please help me implement this batik extension in FOP?
  I don't think you can really fix this without making changes in FOP.
It looks like you might be able to just change the init method in
SVGElement.
Thanks a lot.

Jay

On Fri, 5 Sep 2003, Thomas DeWeese wrote:


Hi Jay,

   Well the problem you are having is because you haven't setup the
CSS engine for Batik.  This is normally done by the batik.bridge.BridgeContext
class in Batik.  However, it also appears that you are trying to map just the
flowText element - The SVG specification is pretty clear that
SVG elements must have a parent SVG element - of course you can
try and do it without this but I think it's a mistake.
   I think you really want to try and 'fix' the existing
SVG element mapping stuff in FOP rather than try and reproduce
this work.
Jay Chiu wrote:

I solved the element class mapping issue, but still get
exception at
org.apache.batik.bridge.CSSUtilities.convertDisplay() because
getComputedStyle(e, SVGCSSEngine.DISPLAY_INDEX) returns null on
flowTextElement. If I set the method to return true, then I get
exception at
org.apache.batik.bridge.CSSUtilities.convertVisibility() for the
same reason.
I have added the attached three files:
(1) BaticElement.java
(2) BatikElementMapping.java
(3) BatikObj.java
and registered BatikElementMapping class with fop.
Because flowTextElement needs its own document object for using
ExtensibleSVGDOMImplementation to create child elements, I have
to add addGraphic() into the BatikElement.java file.
Also org.apache.batik.dom.AbstractParentNode does not allow
adding child with different document object, I have to comment
out
if (n.getOwnerDocument() != getCurrentDocument())
in checkAndRemove() method.
Pleae help me check what is wrong here. Probably you have add
the batik extension into next release of FOP.
Thanks.

Jay



 On Fri, 5 Sep 2003, Andreas L. Delmelle
([EMAIL PROTECTED]) wrote:


From: Jay Chiu [mailto:[EMAIL PROTECTED]
I got the same exception as what Swapan got. I think the
problem
Difficult to tell... ( also because I haven't used Batik
directly )


Does this happen with other graphic formats too? What versions
(FOP  Batik)


are you using? Is FOP being run from the command-line - using
the supplied


shell script to set its classpath - or embedded?

Check http://xml.apache.org/fop/graphics.html#batik to find
out why I think


these questions are important.

Hope this helps ( you both )

Greetz,

Andreas Delmelle


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




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





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


RE: Batik Extension/FOP problem

2003-03-07 Thread Thomas E Deweese
 SG == Swapan Golla [EMAIL PROTECTED] writes:

SG I am trying to use batik extensions through FOP. I added
SG BatikElementMapping and BatikObj objects into my FOP src and then
SG registered them in the driver class but I am still getting some
SG exceptions. Can anybody help me out ? 

I don't know, The error you are getting is indicative of passing a
non Batik DOM node into Batik.  Is it possible that you are
mis-mapping the elements from FOP?  the batik:flowText element needs
to become a bati.extension.svg.FlowTextElement the others need to be
mapped likewise.  Just mapping them to generic elements won't work.

SG I am trying to embed the flowText.svg ( provided by batik
SG distribution ) into a simple fo document and then trying to
SG convert into a pdf.

SG Swapan.


SG [ERROR] svg graphic could not be built: null
SG java.lang.ClassCastException at
SG org.apache.batik.bridge.CSSUtilities.getComputedStyle(CSSUtilities.java:96)
SG at
SG org.apache.batik.bridge.CSSUtilities.convertDisplay(CSSUtilities.java:509)
SG at
SG org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:176)
SG at
SG org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:148)
SG at
SG org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:188)
SG at
SG org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:148)
SG at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:76) at
SG org.apache.fop.render.pdf.PDFRenderer.renderSVGDocument(PDFRenderer.java:513)
SG at
SG org.apache.fop.render.pdf.PDFRenderer.renderSVGArea(PDFRenderer.java:472)
SG at org.apache.fop.svg.SVGArea.render(SVGArea.java:58) at
SG org.apache.fop.render.pdf.PDFRenderer.renderForeignObjectArea(PDFRenderer.java:456)
SG at
SG org.apache.fop.layout.inline.ForeignObjectArea.render(ForeignObjectArea.java:46)
SG at
SG 
org.apache.fop.render.AbstractRenderer.renderAreaContainer(AbstractRenderer.java:408)
SG at org.apache.fop.layout.ColumnArea.render(ColumnArea.java:29) at
SG 
org.apache.fop.render.AbstractRenderer.renderSpanArea(AbstractRenderer.java:57).


SG __ Do you Yahoo!?
SG Yahoo! Tax Center - forms, calculators, tips, more
SG http://taxes.yahoo.com/

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




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



Re: Batik Extension/FOP problem

2003-03-06 Thread Keiron Liddle
 Hi All,
I am trying to use batik extensions through
 FOP. I added BatikElementMapping and BatikObj objects
 into my FOP src and then registered them in the driver
 class but I am still getting some exceptions. Can
 anybody help me out ? I am trying to embed the
 flowText.svg ( provided by batik distribution ) into a
 simple fo document and then trying to convert into a
 pdf.

As the exception is happening in batik it may be a version problem.
Have you tried with the latest FOP rc.

 Swapan.
 
 [ERROR] svg graphic could not be built: null
 java.lang.ClassCastException
 at
 org.apache.batik.bridge.CSSUtilities.getComputedStyle(CSSUtilities.java:96)


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



Re: Batik Extension/FOP problem

2003-03-06 Thread Swapan Golla
Yes. I am using the 0.20.5rc2. May be for the batik
extensions to work through FOP, I need to tweak some
batik code also??

Swapan.



--- Keiron Liddle [EMAIL PROTECTED] wrote:
  Hi All,
 I am trying to use batik extensions through
  FOP. I added BatikElementMapping and BatikObj
 objects
  into my FOP src and then registered them in the
 driver
  class but I am still getting some exceptions. Can
  anybody help me out ? I am trying to embed the
  flowText.svg ( provided by batik distribution )
 into a
  simple fo document and then trying to convert into
 a
  pdf.
 
 As the exception is happening in batik it may be a
 version problem.
 Have you tried with the latest FOP rc.
 
  Swapan.
  
  [ERROR] svg graphic could not be built: null
  java.lang.ClassCastException
  at
 

org.apache.batik.bridge.CSSUtilities.getComputedStyle(CSSUtilities.java:96)
 
 

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


__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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