Re: XML Editor

2004-10-28 Thread Phillip Rhodes
http://www.xmlforge.org

It's an online editor of xml,xsl with transformations.
Also PDF generation with FOP.

Open source.  It's a web app.

-Disclosure-
I am the author.



--- Mark Donnelly
[EMAIL PROTECTED] wrote:

 Does anyone know of a good, free XML editor that
 does XSLT transforms and
 preserves unicode characters?
 
 Im currently using XRay but it seems to corrupt my
 unicode values upon
 translation.
 
 I put in the correct unicode characters for non
 breaking space but after
 translation, when I put it through FOP I get an
 error message telling me
 that there is an unrecognised unicode character.
 
 snip
 fo:block /fo:block
 
 Produces the following error:
 
 [ERROR] Invalid byte 1 of 1-byte UTF-8 sequence.
 org.apache.fop.apps.FOPException: Invalid byte 1 of
 1-byte UTF-8 sequence.
 at
 org.apache.fop.apps.Driver.render(Driver.java:507)
 at

org.apache.fop.apps.CommandLineStarter.run(CommandLineStarter.java:10
 6)
 at org.apache.fop.apps.Fop.main(Fop.java:62)
 
 -
 

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



new contrib, long request filter

2004-05-06 Thread Phillip Rhodes
Hi everyone,
I have been using FOP for a couple of years, and while it worked for me, my 
documents would take a long time to render and I would wonder if my request 
actually went through.  Plus, my users would get aggravated.  Anyway, I did 
some of the tricks one can do and rewrote my program to check if it was 
done.

Anyway to make a long story short, I wrote a filter that will provide a 
status page to the user WITHOUT having to write or modify a line of 
code.  I can put the servlet filter in front of any request that runs long 
without modifying anything.  So you can put it in front of struts, in front 
of fop servlet, a jsp, etc...

I configured a specific webapp of FOP that uses this filter and you can 
run it.  Notice that I said configured since I did not actually have to 
write this, I just configured FOPServlet(came with distribution) and 
web.xml to show you that I did not have to write or modify code.

One of the features that it has is to calculate the average time for the 
request and use that to predicate the status bar.
All the code is in CVS, and there is a snap shot of it.  It's LGPL.

Just wanted to share.
http://rhoderunner.com/longrequest/
BTW, for now it's on a test server that has an automated build system (pull 
from cvs, deploy to tomcat) so it may not be up 100% of the time.  If at 
first you don't succeed, try try again!




I 


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


FOP and user load?

2003-06-04 Thread Phillip Rhodes
Hi.
I am trying to figure out how many users can simultaneously generate a PDF 
document with FOP.

Average document is 20 pages long, with 20 images that are generated via 
servlet.

Can anyone give me some ball park numbers or ideas on how to figure this 
out?  How should I factor in available CPU and memory into the equation?


Thanks so much!

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


horizontal rule in table?

2003-05-28 Thread Phillip Rhodes
Hi fop'ers,
I have horizontal rules that span across the entire length of the 
page.  They appear as separators between rows in a table.  They are called 
tablerule in my xml doc.
tr
   tdCancer/tdtd12/td
/tr
tablerule /
tr
   tdHeart Disease/tdtd30/td
/tr

The problem is that my tablerule element does not have the number of 
columns that I want it to span.  I would like it to span the entire 
table.  However the transformation that I wrote wants a 
number-columns-spanned attribute.  I set it to the max possible, but this 
feels kind of a hack.
Can someone recommend a good solution to outputting a horizontal rule 
within a table without having to re-write or change the xml?  Changing the 
xml would be very difficult.
Thanks!

Here is my xsl for the tablerule element:
xsl:template match=tablerule
  fo:table-row
fo:table-cell border-bottom-width=0.5mm border-bottom-style=solid 
number-columns-spanned=10
  fo:block space-before=5ptxsl:text /xsl:text
  /fo:block
/fo:table-cell
  /fo:table-row
  fo:table-row
fo:table-cell number-columns-spanned=10
  fo:block space-before=5pt
xsl:text /xsl:text
  /fo:block
/fo:table-cell
  /fo:table-row
/xsl:template

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


image scaling memory leak?

2003-04-04 Thread Phillip Rhodes
I know the FAQ discusses this...
It took me a couple of days to figure this out, but the image scaling that 
I am doing in FOP is crashing my application.
All my images are returned via a servlet... If I turn the servlet engine 
off, no images are returned and FOP runs like a champ... (although my 
reports have no images)

If I do not do image scaling, my images look very bad  If I do image 
scaling, I can only handle about 20 reports (20 images each), before crashing.
All of my images are dynamic, returned as a PNG from a servlet with jFreeChart.

Even if I start out with a huge memory setting for my JVM, I will 
eventually run out.

Any ideas on how I can proceed?  Is this FOP only, or all fo processors?
Thanks!

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


svg does not scale or respect other blocks space.

2003-04-04 Thread Phillip Rhodes
I can very easily swap image formats in my program.  I did some testing 
with svg, jpg and png.

1)	jpg and png will not overwrite other blocks.  With SVG, the image will 
overlay over text.  It seems not to respect other fo:blocks, even if I put 
the external graphic into a fo block.

2) 	the svg does not get scaled to the width that I specify.  PNG and JPG 
do get scaled down.

Has anyone else encounted these problems?  Let me know.
Thanks.

fo:block
   fo:external-graphic 
content-width=13cm width=13cm 
src=url('http://localhost:8080/hra/chart?val=xamp;title=Health+Scoreamp;showLegend=trueamp;series=June+2002amp;chartValues=11amp;chartValues=46amp;chartValues=80amp;chartValues=1amp;chartValues=1amp;chartValues=84amp;chartValues=31amp;chartValues=30amp;preexisting=0amp;preexisting=0amp;preexisting=0amp;preexisting=0amp;preexisting=0amp;preexisting=0amp;preexisting=0amp;preexisting=0amp;categories=Canceramp;categories=Heart+Diseaseamp;categories=Diabetesamp;categories=Emphysemaamp;categories=Cirrhosisamp;categories=Arthritisamp;categories=Overallamp;categories=Self-assessed+Healthamp;chartType=1amp;pdf=1amp;format=svg') 
/

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


how can i wrap text that is not being wrapped?

2003-03-28 Thread Phillip Rhodes
I have some text that does not have any spaces in it.  When FOP renders the 
text, it can not break up the text.  FOP will clip it and give warnings 
about overflows.

It's a trivial example but here is something that will be clipped:  Notice 
the lack of spaces.

/usr/local/jakarta-tomcat-4.1.18/webapps/hra/templates/hra/diabetes\en_US\maj.x.vm
Here is an example of something that will be wrapped.  Notice the space 
between blood cholesterol
/usr/local/jakarta-tomcat-4.1.18/webapps/hra/templates/hra/blood 
cholesterol\en_US\f.x.vm

How can I get text to be wrapped instead of clipped.  I would rather just 
pick any arbitrary character and wrap from there, instead of clipping text.

Less warnings too!;)


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


Re: how to specify XML parser used by fop

2003-03-20 Thread phillip rhodes
If FOP uses jaxp, it would take whatever is the default parser.  You can set
this property on the command line

We should definitely be using jaxp.

Here is some docs I found on how to do this.
SAX Parser Configuration
The SAX Plugability classes allow an application programmer to provide an
implementation of the org.xml.sax.DefaultHandler API to a SAXParser
implementation and parse XML documents. In order to obtain a SAXParser
instance, an application programmer first obtains an instance of a
SAXParserFactory. The SAXParserFactory instance is obtained via the static
newInstance method of the SAXParserFactory class. This method uses the
following ordered lookup procedure to determine the SAXParserFactory
implementation class to load:

Use the javax.xml.parsers.SAXParserFactory system property

Use the properties file lib/jaxp.properties in the JRE directory. This
configuration file is in standard java.util.Properties format and contains
the fully qualified name of the implementation class with the key being the
system property defined above.

Use the Services API (as detailed in the JAR specification), if available,
to determine the classname. The Services API will look for the classname in
the file META-INF/services/javax.xml.parsers.SAXParserFactory in jars
available to the runtime.

Platform default SAXParserFactory instance.





- Original Message -
From: Jason Novotny [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, March 19, 2003 5:11 PM
Subject: how to specify XML parser used by fop


I guess it uses Aelfred by default which I'm having problems with--
 how I can I tell fop to use crimson or whatever else?

Thanks, Jason



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



svg as external graphic does not get scaled?

2003-03-17 Thread phillip rhodes
Using fop-0.20.5rc2
I am using the external-graphic object to includes graphs.  If I use a svg,
it does not get scaled.  My graphs scale fine if I use other image formats.

The SVG does get displayed, but it appears very large.
There is a height and width attribute in the svg.

   fo:external-graphic
src=http://test.rhoderunner.com/hra/chart?val=xamp;categories=March+2003a
mp;chartValues=16amp;chartType=2amp;showLegend=falseamp;title=Diabetesam
p;series=Diabetesamp;pdf=0amp;format=svg content-height=4cm
content-width=12cm height=4cm width=12cm /


Is this something that is not supported?  Thoughts?






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



anchor block to bottom of page? (footnote margin problem)

2003-03-16 Thread phillip rhodes



I am trying to have a fo block be anchored from the 
bottom of the page. 

Basically it's a image, and some text that I want 
to have appear as far done the page as possible, but not to cause a page 
break.

I see people use a footnote for this, but this is 
not working for me.
The margins of the footnote are not the same as the 
calling region (the region that I define my footnote in, which is 
xsl-region-body)

This is not static text. It's just a grouping 
of content that I want as far down as possible on the page.


Can someone point me in the right direction? 

Thanks!




PassiveTEX?

2003-03-14 Thread phillip rhodes
Hi everyone,
I want to know if anyone has used PassiveTEX and switched to FOP?  Or gone
the other way?  I would like to know what brought you to FOP, or turned you
to PassiveTEX.

FOP is wonderful, and I am not disbaraging it whatsoever.
But as a small component in a much larger project, I can't be concerned with
trying to debug a problem with my documents.  I want it to work as
advertised.  I realize that FOP is relatively immature in terms of
developement, whereas latex and other programs have been around for a very
long time.

I would appreciate any thoughts.
Thanks, and best regards.

Phillip


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



Re: fo:external-graphic problem when using HTTPS - EntityResolver?

2002-11-21 Thread Phillip Rhodes
I have a weird and crazy idea that may help you
Why don't you install a local apache server with mod_proxy.
You can configure mod_proxy so that it can tunnel into https from your http 
connection.

1)  It's very fast, all my browsing is through a proxy server
2)  You can secure your local apache so that it would only allow requests 
from localhost
3)  It solves your problem by allowing you to make a request via http to 
get your https resource.

I am sorry if you find my suggestion ridiculous, but sometimes ridiculous 
ideas such as this one can save a lot of heartache and effort.
I guarantee it will work.


At 02:51 PM 11/19/2002 +0200, Johan Åbrandt wrote:
Hi,
I have the following external graphic declaration in a XML file:
fo:external-graphic src=url('{$base-url}/images/logo.jpg') 
height=30pt width=170pt/

I render it to a servlet outputstream using:
Driver driver;
driver = new Driver( new InputSource( reader ), out ); driver.setRenderer( 
Driver.RENDER_PDF );
driver.run();

This works just fine when having the server configured for HTTP but when 
using HTTPS, it fails with error:

Error while creating area : Error with image URL: unknown certificate and 
no base directory is specified

I think this is because I am using a own generated certificate and not a 
real certificate from f ex Verisign. I know that I can either create my 
own SecurityManager (effectively disabling security), or use a real 
certificate. I would however like to circumvent all such hazzles and 
retrieve the image in some other means instead, intially I tried to use a 
custom EntityResolver, but I doesnt seem like it is used for image url 
resolution:

i.e.
driver = new Driver( new InputSource( reader ), out ); driver.setRenderer( 
Driver.RENDER_PDF );

XMLReader xmlReader = XMLReaderFactory.createXMLReader();
xmlReader.setEntityResolver( new CustomEntityResolver() );
driver.setXMLReader( xmlReader );
driver.run();
Does anyone have any tips how to get the EntityResolver approach to work, 
or know any other way to achieve something similar.

Best regards - Johan
--
Johan Åbrandt
Technical Project Manager
(Tekninen projektipäällikkö)
Tel. +358 9 6817 3342
Mobile. +358 40 848 8068
[EMAIL PROTECTED]
Profit Software Oy
Meritullinkatu 11 C
00170 Helsinki, Finland
__
This message and its attachments have been found clean from known viruses 
with three different antivirus programs.
__

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


design help for multiple output formats?

2002-05-29 Thread Phillip Rhodes
Hi.
I have created a html document as a result of an xsl transformation.
All of the content is contained in an xsl file (which is built dynamically 
from a database and programming).   The content (xsl) contains a lot of 
xsl-commands that do variable interpolation for the report content 
(e.g.  Dear xsl:value-of select=/xml/@name/)  A short explanation:  the 
reports are built up sentence by sentence based upon database data and 
calculations.  In addition, each sentence has substitutions in it and 
conditional logic (e.g. pluralization)

My problem is that I want to render the document in pdf, rtf and html 
formats.  While the html one looks good, I can not imagine how I could 
output in the other formats, without duplicating all the content again and 
putting the xsl-fo markup in the content.

What I think I should do is instead of putting anything html-specific in 
my content, to put some other markup.  After I do my initial tranformation, 
I could then run it thorough an html convertor, or a xsl-fo convertor  (to 
transform my markup tags).

Has anyone come up with a generic markup and the corresponding xsl 
convertors?  Is this a good approach?

Thanks.  I appreciate you having read this.  It would be nice to get some 
other perspectives.

Phillip