Re: Using Saxon transformer together with Xalan and XSLTC

2003-06-30 Thread J.Pietschmann
Peter Velychko wrote:
So there is duplicating "xmlns" attributes in XML generated by Xalan.
Could it be that the AElfred parser from the saxon jar kicks in?
IT is known to report namespace attributes differently than Xerces
which may cause hickups in some Xalan versions (unfortunately,
this is a dark corner in the SAX spec).
Try to remove the services entry from the saxon jar and see whether
the problem persists. it this fails, see whether you can import the
XML parser functionality from the servlet container rather than the
webapp lib.
OTOH, it could be the XML parser imported from the servlet container
which causes problems. Try to use the Xerces component instead of the
SAXParser component to exclude this possiblity.
J.Pietschmann

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


Re: Perplexing PDF SVG question

2003-06-23 Thread J.Pietschmann
Irving Salisbury III wrote:

I am using a third partly library that does things like  url( 
#someReference), so I can't get around it.
Why is this not a bug, it seems like something that should be supported, 
and batik even has a bug fix in 1.5b4 (that happens to break the library 
code for me)
Both the SVG and FO spec avoid even talking on how url(#stuff) should
be interpreted if the SVG is embedded in a FO document. Actually,
the whole semantic of embedded content is processor dependent, in
other words we could do what we see fit. Therefore, as I said, this
is spec conformant, read: no bug. I agree that it violates user
assumptions on how the whole mess ought to be resolved. There are a
few hurdles on the way which prevent simple fixes on the FOP side
though.
J.Pietschmann



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


Re: Perplexing PDF SVG question

2003-06-23 Thread J.Pietschmann
Irving Salisbury III wrote:

I have embedded an SVG image into my xsl:fo document.  It renders fine 
when using command line fop.  However, when I put it in a cocoon 
pipeline, I am getting the following error:

ERROR   (2003-06-23) 08:02.42:903   [sitemap.serializer.fo2pdf.fop] 
...
java.lang.NullPointerException
   at java.net.URL.(URL.java:366)
...
   at org.apache.batik.util.ParsedURLData.buildURL(Unknown Source)
You seem to have an internal reference like 
in an inlined SVG. Don't do this, it wont work. And no, strictly
spoken this is not even a bug. Either reference the SVG as external
graphic, or use a full absolute URL to an external URL for the
reference.
J.Pietschmann



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


Re: FOP problems with Unix

2003-06-18 Thread J.Pietschmann
Carmona Perez, David wrote:
But I wonder why some files are processed ok and others don't, or why can I
do it from the command line.
Those without SVG (inline or external images) should be ok.

J.Pietschmann

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


Re: [HELP]XSL to PDF graphics

2003-06-16 Thread J.Pietschmann
Michael Plumb wrote:

I am attempting to convert An XSL:FO and XML file to a PDF output.  I can
currently get the text to work just fine.  But I am unable to get the
graphics I have within my XSL file to convert over as well.  I am left with
a PDF page of Text with holes where the graphics should be.  Could you
please send me the SITEMAP line of code to fix this problem, or tell me
another way to remedy it.  Thank you.
The PDF serializer probably can't find the image files.
You can try absolute file URLs, like
  src="file:///foo/bar/some-image.jpg"
or define a base URL in the config file.
You can find more on the latter in the COcoon docs and the
Wiki.
J.Pietschmann

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


Re: Autoshape --> Rectangle (xsl:number processing error))

2003-06-12 Thread J.Pietschmann
Yan, Charlene wrote:
I'm using xsl:number in the following.  Every time after I add
> from="27" in the tag, it will give me the error below.  Is it
> caused by changing Transform type xslt to xalan in the sitemap?
No.


According to the spec:
  http://www.w3.org/TR/xslt#number
the 'from' attribute takes an XPath pattern as value:
 "The from attribute is a pattern that specifies where counting starts."
You supplied a number, which causes the XSLT processor to barf, naturally.
This is quite independent on whether you use Cocoon or not.
For further help about XSLT, check the XSL list:
  http://www.mulberrytech.com/xsl/xsl-list/
J.Pietschmann

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


Re: xml/xsl transform working, but fails thru cocoon?

2003-06-12 Thread J.Pietschmann
Paul Tomsic wrote:
Hi, we can't seem to make a transformation work when
retrieving the data from a SQL source.
We do get the XML back correctly, but when it's
displayed as PDF, everything is blank.
You don't have a layout master set, but this may be a result
of the snipping, and there is nothing else which is obviously
wrong.
Are there any interesting error messages in the Cocoon logs
or in the stdout/stderr of the servlet container?
You can also temporarily replace the pdf serializer with an
XML serializer, save the generated FO document to disk and
run it through a recent FOP command line.

Perhaps there's something that we're missing w/r/t the
way the namespaces are followed inside cocoon, but
below is our sitemap.xmap, the xml before the
transform and the XSL.
The XML before the transform is only of much interest if you
post the full XSL, otherwise nobody can actually try to
reproduce your problem.
J.Pietschmann

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


Re: Using xsl:if

2003-06-12 Thread J.Pietschmann
Tim Bachta wrote:
I am trying to do an if statement to select a template according to
...
and I want to do :

if(element(parameter-name) == BeginEndDate)
{
do this;
}
else if (element(parameter-name) == Locations)
{
do that;
}
XSLT questions are best sent to the XSL list:
 http://www.mulberrytech.com/xsl/xsl-list/
In either case, I had a few difficulties in deciphering your
problem description, but maybe you want
  

  do this


  do this

  
Perhaps you should buy yourself a good XSLT introduction book,
the XSL FAQ linked from the URL above has a list.
J.Pietschmann

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


Re: Using dynamic SVG with FOP

2003-06-10 Thread J.Pietschmann
Markus Alin wrote:
We are currently building a reporting application featuring PDF
generation with FOP. Within the FOP we call a url generating a jpeg
image by transforming a XML into a SVG and by serializing this into a
jpeg. This works perfectly for static jpegs but by the start of the jpeg
matcher the application does not seem to have a session and therefore no
XML can be generated (we user readDOMSession transformers).
You can try to embed the dynamic SVGs directly into the
FO as fo:instream-foreign-object. Use aggregation or
XInclude to get the data into the pipeline.
J.Pietschmann

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


Re: FOP problems with 2.1m2

2003-06-09 Thread J.Pietschmann
Spectron International, Inc. wrote:
I'm having some problems with FOP in Cocoon 2.1m2. I have a pipeline that
creates the xsl-fo document and then I convert it to PDF. If I save the
xsl-fo and run it directly through FOP it works ok. When run from Cocoon it
gives me the following exception:
15:29:10.698 WARN!! Error for
/msim/pdf/DiscrepancyAnalysis?batDate=2003-06-05&endDate=2003-01-05
java.lang.NoSuchMethodError:
org.apache.batik.bridge.UnitProcessor.createContext(Lorg/apache/batik/bridge
/BridgeContext;Lorg/w3c/dom/Element;)Lorg/apache/batik/util/UnitProcessor$Co


This typically happens if there is a mismatched version of Batik
in the classpath. Unfortunately, some Cocoon distributions are
distributed with a Batik jar which does not match the interfaces
the FOP jar from the same distribution uses. You can fix this by
grabbing a recfent FOP distribution and replace the fop and batik
jars in the Cocoon lib by the FOP and Batik jars from the FOP
distribution. This may have negative impacts on Cocoons SVG
serializer though, so you should not use a PDF generating pipeline
which uses embedded or referenced SVGs and a SVG generating
pipeline at the same time.
J.Pietschmann

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


Re: FOP/HSSFSerializer's and non-english characters

2003-05-29 Thread J.Pietschmann
Yury Mikhienko wrote:
 >   src="org.apache.cocoon.serialization.HSSFSerializer"
>   mime-type="application/vnd.ms-excel">
   KOI8-R
 
XLS is a binary format which *may* use Unicode. I don't think 
is of any use here, and asking for KOI8 encoding is definitely pointless.
J.Pietschmann

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


Re: FOP/HSSFSerializer's and non-english characters

2003-05-29 Thread J.Pietschmann
Yury Mikhienko wrote:
Ok, the PDF serializer works properly (but with .ttf fonts only),
PFM fonts should work too, as well many OpenType fonts (OpenType
extends TrueType).
J.Pietschmann



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


Re: PDF Forms and XSL:FO

2003-04-03 Thread J.Pietschmann
cocoon user wrote:
Is it possible to generate PDF forms (editable fields within PDF) using XSL:FO?
No. Check the spec for details.

J.Pietschmann



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


Re: Only use serializers

2003-04-02 Thread J.Pietschmann
Gunter D' Hondt wrote:
I've got a java webapp where I've got the DOM object with the XML
transformed using XSLT but now I want to be able to serialize it to PDF.
I know Cocoon has FOPSerializer etc but how can I call this serializer
from java code with the only input being a transformer and a DOM object.
Have you already looked at
 http://xml.apache.org/fop/embedding.html
 http://xml.apache.org/fop/faq.html#servlet_with_xslt
J.Pietschmann

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


Re: Problem with indent

2003-04-01 Thread J.Pietschmann
g[R]eK wrote:
Problem is caused by the entites like "ó" because its size is 8 bytes,
but character ó have size 1 or 2 bytes. It is big difference, when ó character
is repeating much times.
I hope, you know what I say?
An "encoding problem" usually refers to mismatches regarding the mapping of
Unicode characters to bytes in the output.
Your problem, that the serializer maps characters to predefined HTML entities,
is somewhat trickier, and there is no standardized way to deal with it.
Cocoon uses an identity XML transformation for serialization, usually performed
by Xalan (default setting). You can have a look into the Xalan docs and search
for extensions to the xsl:output element which might solve your problem, or ask
on the Xalan list. There is also a properties file for the HTML entities, you
can provide a modified version which may cause Xalan to output UTF-8 encoded
bytes or at least character referencces (which are a bit shorter).
J.Pietschmann

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


Re: Problems basic-link in xsl-fo

2003-03-21 Thread J.Pietschmann
Jessica Niewint wrote:
No, for me it is even impossible to build the PDF. So I will rebuild 
cocoon this afternoon. May something is wrong.
It seems that the tag basic-link is non know or accepted by the PDF.
We got also problems to display a gif . And this on to different servers 
with two different cocoon releases. May there is a connections. Since I 
am not a "Cocoon-Specialist" , there could be also something wrong with 
the sitemap.
Unlikely.

For me is only strange that everything work fine, only if I 
try to use the basic-link tag I got the message that the PDF is damaged. 
I really do not have a clue ...
Well, that's common.

The general strategy is to reduce the complexity of the problem:
1. Get your source XML as a file, if you don't have already.
2. Get a FOP binary distribution. Read the docs on how to run the
  command line application and the standalone XSLT transformation
http://xml.apache.org/fop/running.html
3. Run your source XML with your XSLT through Xalan, as described,
  in order to get a FO file. Are there problems at this point?
4. Run FOP on the FO file from the last step. Are there problems?
5. Check the FOP FAQ
  http://xml.apache.org/fop/faq.html
J.Pietschmann

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


Re: Problems basic-link in xsl-fo

2003-03-20 Thread J.Pietschmann
Jessica Niewint wrote:
I tried also http:// but  it gives still the error that the pdf is damaged.
In the error-log of cocoon is empty. If I comment out the basic-link tag 
(and leave the block tag where it is) every thing
works fine.
There was some discussion a while ago that there are problems with
external http links. THe PDF should display fine though, only clicking
the link results in an obscure error message.
Can you generate the PDF with the FOP CLI?
J.Pietschmann



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


Re: Graphics in XSL:FO?

2003-03-20 Thread J.Pietschmann
Colin W. Kingsbury wrote:
I am trying to get cocoon to render an instance to PDF which includes a
graphic reference. I have used the 
src=file:///c:/stuff/foo.jpg/> tag and have my cocoon running in say
c:\tomcat\webapps\cocoon. 

If I run the FO output through Fop on the command line I see my graphic;
if I access it through cocoon URL I get a blank screen result and no
error messages.
Do you get a PDF with some stuff but missing the graphic?
In any case, first check the Cocoon logs and also the tomcat
stdout for errors.
J.Pietschmann



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


Re: Problem with indent

2003-03-13 Thread J.Pietschmann
Joerg Heinicke wrote:
Now remains the question, why the browser isn't doing this. Do you have 
a  tag specifying the encoding 'UTF-8' in your HTML code? If yes, 
is the browser not UTF-8 aware? Or does it prefer the encoding specified 
in the response header and this is different or/and wrong?
I vaguely remember this issue was discussed only a short time ago:
there are three places where a character encoding is specified:
1. The content type HTTP header
2. (optional) the XML declaration (for XHTML)
3. The META tag in the HTML header
Unfortunately, the character encoding may be omitted from the
content type header, and it defaults to ISO-8859-1. This is
usually the authoritative information for all browsers and
overrides the encoding declaration in the META tag, except for
IEx, which usually prefers to second-guess everything.
Ok, back to the original question: The interesting point is that
the letter ł is not in ISO-8859-1 but apparently in ISO-8859-2
(the encoding of this mail message). If this was really delivered
to the browser and not just caused by a clever cut&paste, I'm
really interested how this got out of Cocoon without obvious
configuration changes...
J.Pietschmann

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


Re: form and pdf

2003-03-13 Thread J.Pietschmann
xavier gibouin wrote:
The XSLFO REC does not cover interactive forms. I'd suggest to use
another PDF library which either implements extensions or uses its
own input format to generate PDF with forms.
...
do you know one ?
No. Commonly named names at this point:
- Adobe Acrobat
- iText http://www.lowagie.com/iText/
- PJ http://www.etymon.com/pj/index.html
Whether they have any features you need is something you
have to find out yourself. Also, searching SourceForge and
FreshMeat and perhaps Savannah may turn up more candidates.
J.Pietschmann



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


Re: Problem with indent

2003-03-12 Thread J.Pietschmann
g[R]eK wrote:
   I have some problem with indents in HTML Serializer.
...
I want to use UTF-8, I have this declaration in my sitemap:

1
Try
  yes
UTF-8
This should be the default.

And in output I have some chars encoded as entities. How Can
> I force Cocoon to encode my language (polish) chars
correctly?
What is "correctly? If you mean you don't want to have
HTML entities: you can't (unless you are willing to pull
some tricks which take some time to explain)
Sorry about any mistakes, I speak little english...
Writing long lines is a mistake independent of the native
language...
J.Pietschmann

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


Re: FOP, inline SVG, fonts

2003-03-12 Thread J.Pietschmann
Joerg Heinicke wrote:
Hmm, maybe because we use JBoss + Tomcat + Cocoon. Do you know what 
changed between Fop 0.20.3 and 0.20.4, that prevents my old stuff from 
working? Or is it deep Fop interna?
There were two changes: the switch from using Xerces native to JAXP
for creating the XML parser for reading the config file and feeding
the metrics-file name directly to the InputSource constructor instead
of creating a File first (which means it is interpreted as URL rather
than as filename, making Windows path names like "C:\foo" problematic).
The new 0.20.5 release has some improvements, in particular you can
supply a baseURL for images and a fontBaseURL for font related files.
Documentation may be a bit sparse, you might have to blackmail Jeremias
to get it :-)
If you (or anybody else) are interested into looking at ideas for the
FOP API redesign, look at
 http://nagoya.apache.org/wiki/apachewiki.cgi?FOPAvalonization
Also, it's a Wiki, you *can* edit it to bring in your ideas.
J.Pietschmann

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


Re: form and pdf

2003-03-11 Thread J.Pietschmann
Thomas Hamlin wrote:
You can use FOP, which implements much of the W3C XSL-FO standard and 
comes with Cocoon.  I'm not sure if FOP supports form generation, though.
The XSLFO REC does not cover interactive forms. I'd suggest to use
another PDF library which either implements extensions or uses its
own input format to generate PDF with forms.
J.Pietschmann

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


Re: Namespace Problem with XPath and XSLT

2003-03-04 Thread J.Pietschmann
Guenther Schmidt wrote:
However what did you mean with the "exclude-result-prefix-prefixes" ?
Should be exclude-result-prefixes. Look it up in the spec.

J.Pietschmann



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


Re: Namespace Problem with XPath and XSLT

2003-03-04 Thread J.Pietschmann
Guenther Schmidt wrote:
I've aggregated a document out of a static XML file and the output of the
request generator. The top level element of the request generator output
has its own namespace (unfortunately).
...
Due to the set namespace of the request Top element I have extreme
difficulty finding the proper XPath expression so that a  could be applied.
What would the propper XPath expression be (in regard to the namespace)?
FAQ. You could have been a bit more specific though.
Declare the namespace for your request generator somewhere,
usually this is done on the xsl:stylesheet. The prefix doesn't
matter much, it is not necessary to use the same as in the source
XML. You can add the prefix to the exclude-result-prefix-prefixes
list so that your result document wouldn't be polluted.
 ...
J.Pietschmann

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


Re: entity encoding error within an inline java script

2003-03-03 Thread J.Pietschmann
[EMAIL PROTECTED] wrote:
entity encoding error within an inline java script

Dear all,

I have a stylesheet with inline javascript.
I use CDATA and  as follows to avoid coding
entities:
...


Re: ResourceReader problem

2003-02-25 Thread J.Pietschmann
Sternath Elmar wrote:

...
The error behaviour is that in IE, the HTTP GET request is sent twice.
That's probably the same as the IEx architecture bug
causing this FAQ:
 http://xml.apache.org/fop/faq.html#faq-N104A8
I've wrote numerous speculations about the subject
which can be found in the Cocoon and FOP list archives.
If your URL ends in .pdf, it is possible that you hit the old
problem that the MIME type was not sent properly by Cocoon,
however, I think this bug was fixed some time ago, and you
can easily check whether the MIME type was set.
Can anybody out there tell me why Cocoon behaves different dependent on
browser usage?? Here are the two HTTP GET requests sent by IE
The browser is responsible for issuing the GETs, not Cocoon.

J.Pietschmann

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


Re: XPath problems in Cocoon?

2003-02-24 Thread J.Pietschmann
Anna Afonchenko wrote:
But when I tried to apply this stylesheet using cocoon, I still got the
empty root element That's because strip-space doesn't apply if the input is delivered
through a SAX pipeline (although the spec is a bit ambiguous about
this.
Actually, your expression is ugly. What's wrong with
 select="a[following-sibling::*[1][self::a]]"
This means "select a elements where the following element
(disregarding any text node) is also an a element."
This is not quite equivalent to your expression but will give
the same result for your XML source, and it will work regardless
whether whitespace nodes are stripped.
There's half a zillion other possibilities to express the same
or similar conditions. If you give a description of the effect
you want to achieve, a proper expression can be formulated.
J.Pietschmann

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


Re: XPath problems in Cocoon?

2003-02-20 Thread J.Pietschmann
Anna Afonchenko wrote:

Even if the white spaces are supressed, the algorythm will stay right,
because algorythm should check all a tags that are followed by another a tag,
and the only node between them MAY (not MUST) be white-space only text node.


The problem is here
  select="//a[name(following-sibling::node()[1][not(self::text() and
  ^ You select the following nodes
including all text nodes
 The grab the first.
For these two nodes in the source:
 One  Two
MSXML gets the second  element node, because it strips the text
node with the space between the two  elements. All other
processors see this text node instead of the second  node at this
point and the whole select turns out empty.

Add a
 
to the beginning of your style sheet in order to get the same results
for all processors.
Alternatively, try
 select="//a[following-sibling::a[1][not(normalize-space())]"
but perhaps you even want
 select="//a[following-sibling::a[not(normalize-space())][1]"
instead.

BTW you should ask XSLT questions on the XSLT list:
 http://www.mulberrytech.com/xsl/xsl-list/

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: embedding graphics

2003-02-14 Thread J.Pietschmann
joni santoso wrote:

could you give me the snippets please.


I was just reminded that this works only with text, not with graphics.


do i need to map the images to the sitemap?


No.


btw, is there a dtd/schema for xsl-fo document so that someone can know 
what elements/attributes can be inside an element?

Get a FOP distribution, you'll find both a XSD and a DTD. Also
check the spec
 http://www.w3.org/TR/xsl/
the reference at zvon
 http://zvon.org
and the list of FOP limitations
 http://xml.apache.org/fop

J.Pietschmann



-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Dynamic XSL evaluation

2003-02-13 Thread J.Pietschmann
Idhaya Chandran wrote:

You can use 


That's a bad idea. This is a syntax error.


>From: Yatin Shah [mailto:[EMAIL PROTECTED]]

If the welcome_title was " Hello. Welcome to Acme, Inc. </b>"
Then the embeded HTML code is not interperted as HTML tags.


You should not put HTML snippets into a database. If you
want to extract them with Cocoon and have them delivered
as HTML in the output, you'll have to run them through an
XML parser. Just forget about simple solutions.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: embedding graphics

2003-02-13 Thread J.Pietschmann
joni santoso wrote:

1. I tried to overlap several images (please see the fo file below). I 
want to make images gigi1.jpg and gl.jpg overlapped. However, it seems 
that it is not doable. Is it?

There are at least two possiblities:
- absolutely positioned block-containers
- put the images in two adjacent table cells and make
  the first cell narrow so that the image within overflows
  into the next cell.


(Sorry if this question may actually be 
fit to ask in fop-user but maybe anyone here knows it).
Fop-user would be a better place.


2. I have this fo file that works fine but when I put this onto cocoon 
the pictures don't show up. What's wrong? The images and the fo file are 
in the same directory. However, I don't map any of these images just the 
fo file.

You probably need to set the baseDir for FOP. Look it up
in the documentation for the fo2pdf serializer.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: RESOLVED: PDF Problem

2003-02-11 Thread J.Pietschmann
Ines Robbers wrote:

It's supposed to be 

master-reference="page"   instead of

master-name="page"

Does anyone know more about this?

The easiest way to learn about this was to look into the FOP FAQ:
 http://xml.apache.org/fop/faq.html#faq-N100DE
You should have seen the error message described there in the
Cocoon logs.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: XSL FO

2003-02-06 Thread J.Pietschmann
Tom Place wrote:

I am new to XSL FO and have been working through some tutorials.


Keep in mind that most of the tutorials have been written
before the XSLFO spec went REC status and have not been updated
to the final spec.



java.lang.RuntimeException: Errors in XSLT transformation:
Fatal: org.apache.for.apps.FOPException: 'master-referance' for
'fo:page-sequence matches no 'simple-page-master' or
'page-sequence-master'

...

If anyone can spot the error it would be most appreciated however as I
say this has been copied CLOSELY from a textbook so I'm at a loss


Even recent textbooks have errors. In case of doubt
1. Read the FO spec.
2. Ask on the fop-user list.

It is also recommended to use the FOP CLI for initial development
of the style sheet and deploy to Cocoon only after some debugging.
You'll get better error messages.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Cocoon Competence Center Updates

2003-01-30 Thread J.Pietschmann
Robert Simmons wrote:

No no no... you dont get it. Im a consumer. Im a professional programmer. Im
not some guy hackign in his dorm room between classes. I dotn have TIME to
learn the detailed integrated architecture of every little product I use.
What really broke the proverbial camel's back was that bug beign reclassified
from high priority to normal. Its at that point that final irritation set in.


You could check whether a few bucks could motivate one of those darn
dorm Cocoon hackers to make your specific problem a high priority job
again.
After all, you pay for commercial software and services too...

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: proposal: "The Newbies Competence Center"

2003-01-28 Thread J.Pietschmann
Robert Simmons wrote:

I don't think that the word "newbie" is such a stigma.

Yeah, there are "n00b" and "luser" for this purpose. :-)


... I will state
that id like the documentation to actually be served by cocoon.

This is something the project has not (yet) under its control.


What I would like to see now is a style guide for XML documents that will be
common to all published cocoon info.

That's xdocs.
You might want to take a look at Forrest:
 http://xml.apache.org/forrest


- Original Message -

Mucho old quotes snipped.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: XSP All Nodes Even

2003-01-23 Thread J.Pietschmann
Jacob Arnold wrote:

Whenever I test for even nodes using XSLT on my serialized XSP, all the
nodes are even.


This is a FAQ. Most probably you are counting whitespace nodes.

Either avoid selecting text nodes, for example by explicitely
specifying the element you want to match:
 
or strip the whitespace nodes by adding
 
to the stlye sheet.

Depending on your specific problem you might need to
refine either approach.

For more details consult the XSLT spec
 http://www.w3.org/TR/xslt
the XSL FAQ reachable from here
 http://www.mulberrytech.com/xsl/xsl-list/
or ask on the XSL list.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Different stylesheets called on runtime?

2003-01-23 Thread J.Pietschmann
[EMAIL PROTECTED] wrote:

My XSP, that should choose which XSL to use.:


Another possibility is to use *one* style sheet containing
all the templates and match on the document element to choose
the processing path.
For example, you want to use 2 style sheets:
1.xsl

  
   ...

2.xsl

  
   ...


First, add a mode to all templates to avoid name clashes, and
perhaps prefixes to global variables and parameters:
1.xsl

  
   ...


Make a stylesheet including all of the above and a document
element matching template to choose the further processing
path:
all.xsl:

  
  
  

  
  

  


Your XSP has simply to provide the appropriate document element.
I have absolutely no experience with XSP so I have to guess...

  
  

 int whichXSL;
...
// Now I want to choose the suitable XSL
if( whichXSL == 1)

  
   
  logic to put data here
   
  

else if( whichXSL == 2)

  
   
  logic to put data here
   
  

  ...

You'll have to rearrange your data generation a bit, of course.
If you don't want to do this, use a "marker element"

  
   
  

 int whichXSL;
...
// Now I want to choose the suitable XSL
if( whichXSL == 1)

  

else if( whichXSL == 2)

  


and in the XSL
  

  
  

  
  

  

The "marker element" must be the first child ot the results
element. There are ways to get around this, for example using
namespaces and matching
   

HTH
J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: xsl include doesn't reload changed included document?!?

2003-01-22 Thread J.Pietschmann
Thomas Sandor wrote:

I'm using the following line to include another xml in my XSLT file:


...

The problem is that when I change something in the included document,
nothing happens, by the transformer, it uses the same previous state.


That's a known defect. Either use sitemap aggregation or XInclude.
Search the list archive for details.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Automatically generated linefeed before in the JSPcauses SAXException

2003-01-21 Thread J.Pietschmann
Eduardo Zurita wrote:

The qeq.jsp is a program that connects to remote URL using a
HttpURLConnection object. I do it this way because I need modify some
request properties. This remote URL returns XML data. The JSP simply writes
(out.write) the XML to the output. But SAX doesn't like the output. Always
there is a linefeed causing troubles. The linefeed is located just before
any code I have written. The current error says:


The linefeed probably comes from your JSP. Remember that
everything outside the JSP tags go to the output too.


- Original Message -

Could you please get used to snipping those old quotes?

J.Pietschmann



-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: org.xml.sax.SAXParseException: Content is not allowed in prolog.

2003-01-17 Thread J.Pietschmann
Eduardo Zurita wrote:

2) Why the parser says "Content is not allowed in prolog"?

Because there is something which is not allowed before the
document element (the ). I guess it's the DOCTYPE
declaration going the wrong way. I suggest deleting the DOCTYPE
template from the JSP.
Other possibilities are a linefeed (empty line) before the
 in the JSP or encoding problems.


3) Why in the second pipeline the serialized output includes an 
"encoding=UTF-8"
UTF-8 is the default encoding, just declared again to be sure.

>  and deletes all the defined entities?
The Cocoon XML serializer can't output an internal subset.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: & in url [WAS: file generator error]

2003-01-15 Thread J.Pietschmann
Geoff Howard wrote:

Sorry for being an idiot.  & is valid in the html as delimeter, but the
browser should take it out so that

...

The reason I was confused was because I remembered a problem I encountered
in the past with & as the delimeter in html being passed through, but I
believe the problem there was more complicated - javascript was passing the
& literally IIRC.


You are in dire need to read the HTML and XML specs
at W3C and get rid of the mental baggage of the Tag
Soup approach early browsers imposed on unsuspecting
users.
If you want to have an ampersand in user data transported
in any HTML or XML document, like the Cocoon site map,
you have to escape it as &. Proper HTML and XML parsers
will deliver an ampersand to the application. Those nasty
exceptions introduced in JavaScript embedded in HTML are
actually bugs which sloppy developers who don't even know
where to find specs got used to.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: HTTP 302 error

2003-01-11 Thread J.Pietschmann
Eric BERTHOMIER wrote:

I'm a poor Cocoon's newbie and I've got this error on my log file :

192.168.2.50 - - [10/Jan/2003:15:21:48 1000] "GET /oeuf HTTP/1.1" 302 -

I've found this article about that : 
http://www.nameonthe.net/tomcat302test.jsp but I don't know how resolve 
my problem despite everything.

Look into
  http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
I guess the line above is from your web server, and Cocoon
has some sort of redirection in its sitemap for the above URL.

Anyway, I'm not sure what problem you have, the line does
not necessarily denote an error. You should provide a bit
more context (and enhance your web searching skills).

J.Pietschmann



-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: file generator error

2003-01-10 Thread J.Pietschmann
[EMAIL PROTECTED] wrote:

If I substitute '&' by '&', the sitemap compilation is OK.
But the link doesn't work anymore!

Did it ever work?

I guess the source is HTML rather than XML, I think you
have to tell the sitemap to use a HTML generator. Look
up details in the Cocoon doc, in particular in the section
about generators


-Message d'origine-

In the older days it was considered good netiquette to snip old
unnecessary quotes.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: file generator error

2003-01-09 Thread J.Pietschmann
[EMAIL PROTECTED] wrote:

  
> src="http://www.moreover.com/cgi-local/page?o=xml&c=Virus%20warnings"/>
...

The problem is that I can't compile the sitemap.
Error is:
org.xml.sax.SAXParseException: The reference to entity "c" must end with the ';' delimiter. 

This is a FAQ, ampersands must be escaped in XML. Use
  src="http://www.moreover.com/cgi-local/page?o=xml&c=Virus%20warnings"/>
For details, consult the XML spec.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Cocoon webpage in Arabic

2003-01-08 Thread J.Pietschmann
Jeremy Quinn wrote:

Does utf-8 cover Arabic?

Yes. UTF-8 covers all of Unicode. Look the character codes
up in the Unicode character index
 http://www.unicode.org/charts/charindex.html
You can either use an Unicode-aware editor which allows you
to enter arabic directly, or use character references with
any text or XML editor.


Are there different 'xml:lang' specifiers for different forms of Arabic?

It should not be necesary to specify xml:lang, unless some
application *explicitely* requires it.


Do you have to do anything special in the generated HTML to reverse the 
text-flow?
It's a task for the browser to do the correct thing.
Mozilla/Netscape is known to work. IEx 5.5/6.0 ought to
work too, but I never tried myself. Note that the client
machine needs to have arabic or reasonably complete
Unicode fonts installed, and the browser must know
about them. This can be tricky for Unix platforms.
Win2k, WinXP and recent Linux releases work; WinME,
WinNT don't work out of the box.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: stops to work

2002-12-12 Thread J.Pietschmann
Jessica Niewint wrote:

Thank you all for your help. Yesterday everything works fine ... today 
xsp somehow stops to work ... no image will be shown only the text ... I 
really have any idea what could be wrong
So if you have an ideajust follow it...





http://myserver.it')">
Here image




Serialize the result of the transformation as XML and check whether
there is a fo:external-graphics there. You might have an unexpected
value in $sectioncontent.





Disable-output-escaping does not work in Cocoon. Serach the XSL list
archive for explanation:
 http://www.mulberrytech.com/xsl/xsl-list/
Its unlikely that this has something to do with your problem though.

BTW you should take some days to learn more about the concepts you use,
you seem to be somewhat confused. Also, both your source formatting and
debugging skills could use some polishing. In general, it is unwise to
use complex frameworks like Cocoon at early stages of style sheet
development, often it is much faster to use an IDE and deploy to Coccon
only after the bulk of the work is done.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Problems with

2002-12-11 Thread J.Pietschmann
Jessica Niewint wrote:

The variable $sectioncontent contains a path to an image (Like: 
http://www.myserver.com/xyz.jpg) .
If you point a browser to this address, do you see the image?


Image here
Apart from the problems mentioned elsewhere, content-height
and content-width are not implemented. If you want your image
to have specific measurements, use height and/or width with
absolute measurements (cm, in or pt, not %). If you use both
height and width, your image will be stretched, otherwise
the aspect ratio is conserved. If you omit both height and
width, your image will be rendered with a 72dpi resolution.
This may overflow the available space, which in turn may
cause the image to be dropped (you should see an overflow mark
in the logs).

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: orphans and widows within XSL-FO and Cocoon

2002-12-11 Thread J.Pietschmann
Eddy De Clercq wrote:

I'm testing Cocoon for creating PDF with XSL-FO in
order to investigate the orphan and widow control and till now I can't manage
to achieve this.

Its not implemented yet. The issue is adressed in a redesigned
version, with no target date yet.


I've tried both keep-with-next 
This works on table rows, with some caveats. If you want to use
it for ordinary text, put it in a blind table, as mentioned in the
FOP FAQ.


Which versions of XSL-FO can Cocoon handle and where is a good
reference for it.

Recent Cocoon versions should be able to handle all FOP versions from
0.20.2 on. Just the latest FOP jar into the lib directory. The FOP
documentation can be downloaded with both the FOP source and binary
distribution, as well as read online at
 http://xml.apache.org/fop


--Content-Type: text/html; charsetContent-Transfer-Encoding:

You should not post HTML mail.
J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: dynamic xsl:fo image inclusion

2002-12-03 Thread J.Pietschmann
Joerg Heinicke wrote:

With



I get at least following error message in the error.log:

ERROR   (2002-12-03) 23:06.40:484   [sitemap] (/cocoon/joerg/kal) 
Thread-7/ExternalGraphic: Error while creating area : Error with image 
URL: ..\img\01.jpg (Das System kann den angegebenen Pfad nicht finden) 
and no base directory is specified

(Cocoon 2.1.dev, JDK 1.4.1, FOP 0.20.4)

I get something like "cannot set logger for fo2pdf component" with
a somewhat patched C2.0.2 and a FOP 0.20.5cvs. Maybe I should try
C2.1 again.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: dynamic xsl:fo image inclusion

2002-12-03 Thread J.Pietschmann
Joerg Heinicke wrote:

Have a look into the log files (something like FileNotFoundException) 
and look, how the path is resolved.
FO image source URLs are not resolved and leave no trace in the logs.
It may be necessary to look into the stdout/stderr for the FOP error
message.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: dynamic xsl:fo image inclusion

2002-12-03 Thread J.Pietschmann
Robert Sösemann wrote:

   



   


FOP does not use Cocoons source resolver for finding images.
Your best bet is to use either absolute file URLs:
  
or use a localhost http URL and set up a pipeline for Cocoon to
deliver them. Not exactly the fastest or most secure way (your
images are publicly accessible, unless you restrict access in
the web server to localhost)
  http://localhost/cocoon/fop-img/{$src}"/>
BTW using images inline will not cause line height to be adjusted
or something, check before that your result looks ok.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Question

2002-11-30 Thread J.Pietschmann
Lautaro Brasseur wrote:

I have the following entry in sitemap.xmap:
 
  
   
   
   
  
I want to change the src parameter for the transformator, depending on a 
element that comes from the generator. There is any way to do this 
(without writing a custom transformer)? Can I modify that parameter from 
the generator?

One possiblity is to merge both style sheets. If there are no
template clashes, this is probably all you need.
If there are template clashes, use modes:
 
   ...
 
 
   ...
 
and decide in the root node templede which mode to use:
 
   
 
   
 
 
   
 
   
 

HTH
J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Weird Saxon errors

2002-11-30 Thread J.Pietschmann
SAXESS - Hussayn Dabbous wrote:

Your stylesheet produces plain text as output. This seems to be
a problem for cocoon transformers. I don't know, if this behaviour
is a feature, or a bug. (Maybe the developers can tell us ;-) ?


It's a feature. Plain text is not a valid XML document,
therefore it wont be properly transported through the
SAX pipeline to the next component. Not even if the next
component in the pipeline is a text serializer. I'm not
sure whether this is Saxon specific (a text serializer
uses an XSLT processor too), it might work with Xalan.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: URL Theory & Best Practices

2002-11-30 Thread J.Pietschmann
Kjetil Kjernsmo wrote:

So, I've got this bad feeling that IE is going 
to ignore the content-type header ...
> But I can't for the life of me understand how it can be

standards-compliant...  

Well, IEx does not in general ignore the content-type
header, and it is, more or less, standards compliant,
just in a somewhat special way.
From various rumours and gossip I compiled the following
story: IEx uses a variety of COM components for handling
content. A correct implementation would be to open the
network connection, read the headers including the content
type header, decide which component handles the content,
and then hand over the relevant headers and the open
connection to the component. It seems that handing open
connections to arbitrary COM components is difficult, or
was difficult at the time the architecture of IEx was decided,
therefore the browser component takes a look at the URL,
extracts what it thinks could be a "file extension", then
looks up whatever component is registered for this string
in the Windows registry (note that MIME types are not keys
there) and then hands the URL to the component. Obviously
it's up to the component what happens if the content type
does not match one of the possible types the component can
handle, or whether it even honors the content-type header.
In many cases a mismatch causes the connection to be closed
and another component determined by the content-type gets
the URL. BTW this is the mechanism the Klez virus uses
to get into windows systems. Some components seem to take a
second look at the URL, and sometimes they return errors or
something which causes the browser component to fall back
to the default HTML renderer which then most often draws a
blank. Caching plays a role too. Also, the algorithms for
extracting a "file extension" and perhaps content negotiation
seem to be implemented multiple times and probably in
different ways in various components, or perhaps the
components don't have access to necessary data (like
cookies) all the time.
The user usually doesn't notice anything. Problems arise
if the URL points to dynamic content where a second GET
can cause different stuff to be retrieved, in particular if
the content was'n completely read or wasn't cached for other
reasons (like SSL).
Disclaimer: most of the above is second hand knowledge.

HTH
J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Serializer for d-o-e?

2002-11-08 Thread J.Pietschmann
Lenz, Evan wrote:

I understand why Cocoon disables the use of disable-output-escaping in XSLT.
However, in my current project, which involves parsing XML results from
Google containing escaped (and non-well-formed) HTML, I need to find a way
to disable output escaping for certain sections of text, perhaps based on
the presence of a special attribute or PI that I can generate when
necessary. Does Cocoon provide a way of parameterizing an existing
serializer to do this? Has anyone implemented such a serializer? I would
think that such a customization of an existing XML serializer should be
pretty simple, but the Cocoon serialization framework is so abstract that
I'm having trouble finding the right code to extend or modify.


The answer is quite simple: you can't. D-o-e only works if the
XSLT processor serializes the result itself, the information
which text nodes are supposed to be d-o-e'd on output is not
transported through the SAX pipelines Cocoon uses for plumbing
it's components.
One work around would be to do the opposite: emulate serializing
in XSLT and use a text serializer, with some magic so that the
client gets a content-type=text/html.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Poor performance of document() in XSL [Was: Re: simpel cocoonquestion]

2002-11-06 Thread J.Pietschmann
Stephen Ng wrote:

The Cocoon developers recommend to use aggregation or 
xinclude because of SoC (XSLT is for transforming, not for 
aggregating content).

Sure, but I have a big lookup table in an xml file--it seems much more
natural to reference the lookup table from xslt using document rather
than to jam it into my content stream


I don't mind this, slug it out with the list gurus.
I personally like document() too for certain purposes, one
being lookup tables, another one being importing boilerplate
determined dynamically by input XML data. In Cocoon, the
latter requires a three stage pipeline: transformation into
an intermediate XML with XIncludes, the XInclude step, the
final transformation.
Unfortunately, the cache issue and the 2.0.2 problem with
getting null resolvers which may or may be not fully fixed
in 2.0.3 prevents using document() for many sensible
applications.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Poor performance of document() in XSL [Was: Re: simpel cocoonquestion]

2002-11-05 Thread J.Pietschmann
Ilya A. Kriveshko wrote:

SAXESS - Hussayn Dabbous wrote:

But you also could do it directly within the xslt context:
You can use the document() function in your XSLT-file.


There are drawbacks. One of them is that Cocoon currently
(2.0.3) does not check XML sources referenced via document()
for changes. You'll get the cached result even if document()
sources change until you invalidate the main input source
for the transformation step (or the style sheet).

Q: It was said 2.1 will fix this. Is this still true?


In the past I have encountered a nasty performance problem with document().

This is a Xalan peculiarity. It acesses the source every time
a document() call is encountered, even though the XSLT spec
requires that always the same XML tree is returned (and Xalan
adheres to it). There is a bug pending (#2425).

Saxon does not have this problem. I don't know about XSLTC.
Has someone already tried?


I say,
document() is good for rapid prototyping, but is a poor choice for final
deployment for performance reasons. Use aggregation instead.


The Cocoon developers recommend to use aggregation or xinclude
because of SoC (XSLT is for transforming, not for aggregating
content). I'd add the cache issue. The performance problem
is easily dealt with.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Pulling XML data out of database

2002-11-05 Thread J.Pietschmann
Robert Ellis Parrott wrote:

I want to pull a valid XML text out of a database using SQLTransformer if
possible.

Problem (1) everything is escaped away to >, <, and 

Problem (2) the resulting text won't really be valid, since it would
include a second .

How do people do this?


You allocate an XML parser, feed it the string, and either
get a DOM document or feed the parser's SAX events directly
into the output stream. You'll probably need a custom
transformer or generator for this task.

J.Pietschmann



-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Creating PDF with graphics

2002-10-24 Thread J.Pietschmann
[EMAIL PROTECTED] wrote:


java.lang.NoClassDefFoundError: org/apache/batik/dom/svg/DefaultSVGContext


There were Cocoon versions which included a Batik version
incompatible with the distributed FOP version. Get the
most recent FOP release (0.20.4) and replace both the fop.jar
and batik.jar form Cocoon with the jars from the FOP distro.
This may impede your ability to use the svg2png and svg2jpeg
serializers though, so keep a backup of the batik.jar from
Cocoon.


Furthermore, it is often easier to develop with the FOP
command line application first and move to Cocoon later.
One reason is, you don't have to search through a bunch
of logs for problems...

J.Pietschmann



-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: FOP in cocoon

2002-10-22 Thread J.Pietschmann
Przybilla, Frank wrote:

But that was not the case for the infinite loop
in cocoon. Now I have the following debug message:

2002-10-22 11:44:11 DEBUG   (2002-10-22) 11:44.11:762   [fop ]
(/cocoon/JAVA.Report_Screen_PDF) HttpProcessor[9080][3]/MessageHandler: area
contents overflows area (thousands of entries in the tomcat log file)


This means you have a word or some other unbreakable string
which is wider than the cell width it is placed in. Enable
hyphenation, or insert zero width spaces into the long word.


What I don't understand is the fact that whole thing works using the same
fop.jar with the same xalan-, and xerces-version outside of cocoon. 

Cocoon runs in a servlet container which might have its own ideas
on which parser to use. You might want to upgrade the parser in the
servlet container's lib directory as well.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: External Graphics in XSL:FO (SVG chart)

2002-10-21 Thread J.Pietschmann
Timothy Larson wrote:

My guess is that FOP does not know much about Cocoon, and cannot fetch
files from anywhere except the filesystem.


No, FOP can use http URLs.

Unfortunately, the original message was  unparsable for me,
but I suspect something is wrong with the pipeline generating
the SVG, perhaps it's serialized as text instead of XML.
Another possibility could be that the original poster complained
about a known problem where SVG text is mangled.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: AW: FOP in cocoon

2002-10-21 Thread J.Pietschmann
Przybilla, Frank wrote:
> As you can see I don't work with leaders (maybe defaults are the problem?).

The error message
>>[ERROR] Leader doesn't fit into line, it will be clipped to fit.
is produced by a fo:leader. There is no such element in your code.
If you don't have such an element somewhere else, it's a "can't
happen": check whether you are actually using the files you think
you are using. Recompiling everything from scratch and (re)installing
the most recent JVM for your version might help too.

J.Pietschmann



-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: FOP in cocoon

2002-10-20 Thread J.Pietschmann
Przybilla, Frank wrote:

The problems is that the column values don't fit into the specified
columns. So fop has to hyphenate the text or produce  breaks
respectively. This is working for small documents. 

For bigger documents fop is not coming to an end and seems to hang producing
permanently the following error (with ascending and very big info numbers): 
[INFO] [2742]
[ERROR] Leader doesn't fit into line, it will be clipped to fit.

You have a problem with a leader. Track down leaders you place
in table cells. Then:
- Check whether you have a space before and after so that FOP can
 break the line, unless you actually want to prohibit this.
- Check whether you use an absolute leader-length. Reduce it, or
 replace it with something relative, for example 99%.
- Post a few lines from the code around the leader and the table
 column width to fop-user.


Outside of cocoon it is working. FOP produces the same error but only per
page.

Probably you use different FOP versions. The 0.20.4 release should be
able to break the loop.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: "&" in XML Output

2002-10-20 Thread J.Pietschmann
apurva zaveri wrote:

How can I have the following in my xml output.



This uses and xml serializer.

The result i get is




Are you adding the attribute value through ssome Java code?
Use "m\u0259mba\u026A" in this case (study the Java languaga
documentation for how to use arbitrary Unicode characters in
a string).
If you are pulling the stuff from a DB or something, either
try to get UTF-8 code into the source form the start, or you
have to pass it somehow through a parser.

J.Pietschmann



-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: How to append a xml string as content

2002-10-18 Thread J.Pietschmann
Alejandro Raiczyk wrote:

Registro.getUltimoRegistro returns a xml string like
"24354325432523485845", the thing is
that I don´t want to treat that string as a string, I want it to form part
of the xml content of my page, so I can apply a XSL to it, any ideas ?


If it's well wormed XML as in your example, run it through an XML
parser. I'm not sure whether this would work in a XSP, but you can
put it in special element and use a custom transformer in the next
pipeline stage matching this element. Another possibility is to
write a custom generator and aggregate it's output to the rest
of the data.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Cocoon 1.8.2 and FOP 0.20.4

2002-10-16 Thread J.Pietschmann

George Pieri wrote:
> Do you know if new Cocoon 2.0 supports the new FOP ?
Yes on both accounts.

> Even though I think cocoon and APIs such as FOP are great
> the general trend that I seem to finding is that the software
> tends not to be backward compatable which sometimes make it 
> difficult in a corporate environment.
TANSTAAFL

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Cocoon 1.8.2 and FOP 0.20.4

2002-10-15 Thread J.Pietschmann

George Pieri wrote:
> Should I be able to change
> 
> 1) the fop_0_15_0.jar to the new fop.jar

FOP's API evolved quite significantly between 0.15 and 0.20.4,
with major changes between 0.20.1 and 0.20.2.
I don't expect the new jar to work with an old Cocoon wrapper.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: XMLForm - VoiceXML

2002-10-14 Thread J.Pietschmann

apurva zaveri wrote:
> One more thing to mention.
> 
> I am working on creating "wizard2vxml.xsl" and
> "xmlform2vxml.xsl" for VoiceXML 2.0 for XMLForm.
> 
> Is it Necessary to have “/” in the field name (html
> input variable name) like : 
> this?

If you do a transformation, why can't you strip the
leading slash while transforming?

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Cocoon with IBM WebSphere

2002-10-03 Thread J.Pietschmann

[EMAIL PROTECTED] wrote:
> I'm trying to get Cocoon loaded under WebSphere 3.4.5.  This has full 
> support for Servlet 2.2 so according to the Cocoon requirements it 
> shouldn't be an issue.
Unfortunately, you problem doesn't have something to do
with Servlet 2.2 compatibility...

> Root Error-1: org.xml.sax.Attributes: method 
> getQName(I)Ljava/lang/String; not found

The problem is that Websphere has a really old XML parser in the
classpath by default, which is loaded before Xerces. You have to
include the Xerces jars into an explicitely set classpath for the
web application, use the "environment" button in the "general"
tab for the web application to set it. I had to put all other
jars there too, otherwise I experienced classloader problems, but
this depends on your actual patch level.

J.Pietschmann



-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Repost: error when using svg2png serializer[Please help!!!!]

2002-10-01 Thread J.Pietschmann

kyle koss wrote:
> Yes, I have noticed this also, but the problem is the XML, the SVG is
> being made from is dynamic, so the png is being remade quite often.

It seems the serializer closes the output stream. I'm not
sure whether this happens in the Cocoon serializer component
or in tha Batik raster processor. Search the serializer source
for "close()", if there is none, rise a question on batik-user,
perhaps someone over there knows. Sifting through the Batik
source is only for beings more persistent than me...

J.Pietschmann



-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Cocoon 2, Docbook and Norman Walsh's Stylesheets

2002-09-30 Thread J.Pietschmann

Vadim Gritsenko wrote:
> 3. I might be mistaken, but I do not see why Saxon needs to be modified. 
> Cocoon  by default will use Xerces parser, not Aelfred, and from Saxon 
> only XSLT engine will be used.
It depends. Saxon has the service for XML parsers set to AElfred, and if
the saxon.jar is in the class path before XercesImpl.jar and if cocoon.xconf
does specify a JAXP parser instead XercesParser so that the service definition
is used, then AEfred may be actually used as SAX parser. Nobody will notice
because Xerces is still used as parser for DOM documents, until someone wants
the parser to validate source documents ...

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: AW: FOP In Latest Cocoon Releases

2002-09-30 Thread J.Pietschmann

Przybilla, Frank wrote:
> But I have the problem that cocoon is not working with
> this fop version ( and also not with fop-0.20.4). I always get the following
> error during cocoon initialization:
...
> When I check the logs I recognize that maybe the LogKit is the problem. I
> have read that since fop-0.20.4
> the LogKit is not used anymore. What must be changed that the newer fop
> versions will run with cocoon
> properly?

Dunno, I had no problems at all. If LogKit is mentioned
in the log, I guess you have an old FOP jar hanging around
in the classpath which actually gets used instead of the
newer version.

J.Pietschmann



-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: FOP In Latest Cocoon Releases

2002-09-30 Thread J.Pietschmann

Przybilla, Frank wrote:
> P.S: I eliminate the error with serialVersionUID. But now there is the 
> follwing error message when I run fop built from fop-0_20_2-maintain:
> 
> [ERROR] Error building hyphenation tree for language de
> java.lang.ClassCastException: cannot assign instance of java.util.Hashtable
> to field org.apache.fop.layout.hyphenation.HyphenationTree.stoplist of type
> java.util.HashMap in instance of

The problem is the buildtools.jar file, which is not properly
rebuilt automatically. You can try to "build -f buildtools.xml",
then rebuild FOP.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: AW: AW: FOP In Latest Cocoon Releases

2002-09-27 Thread J.Pietschmann

Skladovs, Victor wrote:
> What would you suggest in this situation?
> How could I improve the Cocoon work as pdf concerns?
> Updating fop.jar doesn't help.

First, get Xalan 2.4.0 and replace both the xalan.jar
from FOP as well as the jar deployed with Cocoon. Check
with the FOP command line application for problems.

If this doesn't help, and you can get a small XML+XSL
combo which reproduces the problem with the FOP command
line app, post it to fop-user.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: AW: FOP In Latest Cocoon Releases

2002-09-26 Thread J.Pietschmann

Skladovs, Victor wrote:
> Frank, I don't believe it is a fop bug!
> I had been tested all the variants from the command line and I have
> assessed that it is xalan bug!
> The bug appears ONLY by transforming XML and XSL files.
> While working only with, say, FO documents, everything's works fine, but
> when I tried to transform my xml file with a xml2fo.xsl:
> 
>>fop -xml table.xml -xsl xml2fo.xsl -pdf table.pdf
> 
> I've got a bad pdf!

Xalan 2.3.1 still has bugs, in particular it accepts buggy
style sheets. This is not exposed if the transformation
result is serialized but causes trouble if the result is
consumed via SAX events by something else, as it happens
in Cocoon and the FOP command above. Try *upgrading* to
Xalan  2.4, and you'll probably see an error message.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: AW: FOP In Latest Cocoon Releases

2002-09-26 Thread J.Pietschmann

Skladovs, Victor wrote:
> The question is how could I replace xalan and xerces in cocoon? What
> must I take into account so that the cocoon works stable?

Xalan-2.0.0 has many small but very nasty bugs, don't
use it. Rather, upgrade the FOP jar.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: AW: FOP In Latest Cocoon Releases

2002-09-25 Thread J.Pietschmann

Vadim Gritsenko wrote:
> Can you clarify - is it Cocoon's, Xalan's, or FOP's CVS?

FOP CVS, branch tag fop-0_20_2-maintain

> PS How can I better call you; "J." sounds strange :)
  

Joerg Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: AW: FOP In Latest Cocoon Releases

2002-09-25 Thread J.Pietschmann

Przybilla, Frank wrote:
> My problem occurs especially in conjunction with the generation of fop
> tables and hyphenation of long
> text in table-cells. The output produced with fop in cocoon is sometimes
> messing around the characters of a word.

Ah, the problem with parts of hyphenated word jumping around
is actually a FOP bug. Yes, it depends on the parser, more
specific, it depends on how the parser passes text up.
The bug is fixed in CVS (maintenance branch).

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Passing unknown parameters through a site-map

2002-09-23 Thread J.Pietschmann

Hunsberger, Peter wrote:
> That could work, but the problem is that the parameters names are mapped to
> various meta-data and I don't know which ones I want and which ones I don't
> want until I examine the meta-data.  Moving the management of the metadata
> into an XSLT would in effect mean moving converting a chunk of my action
> handler logic into an XSLT.
If your metadata is XML, you can aggregate it with the
request parameters in order to filter them.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Passing unknown parameters through a site-map

2002-09-23 Thread J.Pietschmann

Hunsberger, Peter wrote:
> I've got a situation where I've got to pass a bunch of parameters with
> unknown names from a (Cocoon generated) HTML form through an action to a
> standard Cocoon pipeline.  There are certain parameters I don't want to pass
> on to the stylesheet so I can't use 
> 
>

Is there some reason which forces you not to copy the
parameters wholesale? Otherwise, use use-request-parameters
and simply ignore the parameters you don't want. You can
also try to override the wholesale parameter import by
passing an empty string for the unwanted parameters
 

> However, I can, in my action selectively not copy the unwanted parameters
> into the map (since they have well defined names).  The issue is, how do I
> then pass these onto the transform from the from the sitemap? Normally, I'd
> do something like:
> 
>value="{gunk_data_id}"/>
> 
> to pass on individual parameters.  In this case, since I don't know all the
> parameter names I can't do that.  I basically want to say, pass all the
> parameters in the map returned from the action onto the transform (the
> equivalent of use-action-parameters perhaps?)

You can use an internal pipeline with an request-generator
and an XSLT to filter out unwanted parameters, and aggregate
it to you main source:
  



  
  

  


  
  ...
(beware: untested code)

A filter XSLT can be basically the generic copy-through
template and empty templates for the parameters you don't
want:
   
(beware: element and attr names just guessed).

HTH
J.Pietschmann



-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Urgent: Help in XSLT ..........

2002-09-20 Thread J.Pietschmann

Chitharanjan Mohandas wrote:
> I have the following requirement.. I am sorry If I have posted
> to the woring site. Since cocoon uses XSLT a lot, I guess I
> will be better helped here 
Close, but no cigar. The best place to ask XSLT related
questions is still the XSL list:
  http://www.mulberrytech.com/xsl/xsl-list/
THey have a FAQ and an archive there.

> Consider the following XML
> 
> I need to extract the description for the language
> which appears first when sorted alphabetically.
> 
> In this case I need the description for lang "de" i.e German Descrciption...
> The script should extract only for the language de...
...
> Could any one of you please advice me on how to build
> an XSLT script to solve this issue...

The easiest way is to use
  

  
  

  

  
This is not very efficient if you have a real lot
of descriptions (run time is O(n*log(n)) instead of
O(n)), but then, I don't think there is an efficient
solution without using an extension function for
lexical string comparisions.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Install problems WAS3.5.5

2002-09-19 Thread J.Pietschmann

[EMAIL PROTECTED] wrote:
> I am closer now thanks to that bit of info. However, now when I open
> "http://stuff.domain.com/Cocoon"; I get a nicely formatted "Cocoon 2 -
> Internal server error":
> - 8< Snip---
> java.lang.NullPointerException
[...]
> (CocoonServlet.java:901)
...
> Any ideas what I am over looking? Am I just not reading something
> somewhere? Any help is greatly appreciated.

Get the Cocoon source and look into CocoonServlet.java, line 901,
the code there may give you a hint what's missing.

Did you try your WebApp with Tomcat before? I recommend
debugging it this way.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Install problems WAS3.5.5

2002-09-19 Thread J.Pietschmann

[EMAIL PROTECTED] wrote:
>   I searched the archives, and google, and haven't found a good
> explanation about how to go about getting Cocoon working in Websphere
> 3.5.x. I am close I think. I used the WAR file converter in the Admin
> Console, but I get an exception during init of the Cocoon servlet:
> 
> javax.servlet.ServletException: Init parameter 'configuration' doesn't name
> an existing resource : /web-inf/cocoon.xconf
> 
In the Websphere 3.5 I have to use, the path entered
as value of the configuration parameter is appended
to the first "additional classpath" entry for the
servlet.

J.Pietschmann



-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: SVG conversion with Scripting

2002-09-17 Thread J.Pietschmann

Rob Grundel wrote:
> I have a svg image that gets serialized to jpeg through the svg2jpeg
> converter.  In this svg i use ECMA script to format some of the text. It
> displays properley when viewed through an SVG viewer but when converted to
> JPEG it does not seem to be running the script.

AFAIK scripts a triggered by events generated by the
User Agent. Chances are that the JPEG Serializer User
Agent used in Cocoon does not generate any events.
Check your SVG with the command line rasterizer from
the Batik package to see what may work and what wont.
The batik-user list may be a source for more help.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: PDF "Double Dipping" -- FOP bug?

2002-09-17 Thread J.Pietschmann

John Austin wrote:
> I have seen the same behaviour in 2.0.3. Pretty annoying when the most
> resource-intensive part of our system has this flaw.

Just nitpicking: it's primarily a flaw in the client (IEx),
requesting the same URL twice or even thrice, *not* a flaw
in Cocoon, FOP, Tomcat or whatever. If the XML is processed
multiple times too, check whether everything is cacheable.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: german umlaut!

2002-09-09 Thread J.Pietschmann

Wolle wrote:
> as soon as i try to get an output as txt-file (e.g. on a web-browser or
> saving the content in a file) the german umlaut produced by the ue/oe keys
> are produced wrong (e.g. ue as A1/4). but all encodings in the xml/xsl
> file are correct. even the settings of the webbrowser are correct.
> 
> the aim is to produce a proper text-output for latex.
> 
> is the text-ouput of cocoon broken?
> 
No. It is probably outputting UTF-8. I think you can choose the
output encoding for the text serializer, check the default, and
try to get the encoding you need (like ISO-8859-1).

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: german umlaut!

2002-09-09 Thread J.Pietschmann

Wolle wrote:
> has anybody a proper solution for involving german umlaute in a
> cocoon-framework?

You can read the XML spec for some hints, or check some other
publishing systems, like DocBook.

> i have some ideas like
> 
> 1. writing the umlauts in  unicode (so creating a pdf via fop will cause
> no problems)
> 2. writing them in tex-style like "u or "o an exchange them later in
> every xsl-file
> 3. using extra-markups like 

4. Use a proper encoding declaration which matches the actual
encoding of the file. For example, most platforms setup for
a german language environment use ISO-8859-1, and usually
editors use this as the default encoding. Placing
   
at the beginning of each XML file (XSLT is XML too) allows you
to use native encoded umlauts.
5. Use numerical character references, for example ” for ö.
You can place any unicode character in any XML file which has
an encoding which is a superset of ASCII.
The Unicode consortium has convenient tables for lookin up
characters online at
  http://www.unicode.org/charts/charindex.html
6. Get a DTD with entity definitions for some characters, like
a stripped down DocBook, or the HTML definitions (from
 http://www.w3.org/TR/html401/sgml/entities.html)
and use the aliases defined there, for example ö for ö.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Stylesheet selection by doctype?

2002-09-07 Thread J.Pietschmann

Vadim Gritsenko wrote:
> Ben Young wrote:
>> Is it possible to set up a sitemap that will select a different 
>> stylesheet
>> according to the XML Schema or doctype used in the content file?
> No way that I'm aware of.

There is some talk on forrest-dev to implement exactly this.

J.Pietschmann



-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: fop and c2.1

2002-09-04 Thread J.Pietschmann

Barbara Post wrote:
> I have fop-0.20.4.jar and fop-block.jar in my WEB-INF/lib (c2.1). The xsl:fo
> stylesheet I created with fop 0.20rc4 (c2.0.3) doesn't work now. My xsl:fo
> stylesheet is incorrect...
> 
> What are the changes between the 2 versions regarding fop ? Thanks.

I don't remember user-visible changes from 0.20.4rc to the final release,
just bug fixes.
It would help if you detailed the "don't work" a bit, preferably on
the fop-user list.

J.Pietschmann



-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: How to get xml-entities into Javascript strings?

2002-08-26 Thread J.Pietschmann

Koen Pellegrims wrote:
> Maybe my post wasn't very clear; the XML contains ë but JavaScript
> expects \U00EB (which is 235 in hex).
> Instead of reinventing the wheel, I was hoping there would be some standard
> way to convert from one into the other.

I don't think you need to do anything at all. Entities
are only used in serialized XML, as the notation \u
is only used in JS source. The parser converts the XML
entieties and character references into the proper
internal Unicode character, which should be the same
the JS interpreter expects.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: issue... maybe

2002-08-26 Thread J.Pietschmann

Phil Blake wrote:
...
> Then a second stylesheet named BluePage.xsl imports StandardPage.xsl. It 
> overrides only one template - match="/*" mode="pageBody"

There are a few more differences, namely
 > xmlns:psi="http://prescience.org/logicsheets/app/2.0";
and, most odd:
 > version="2.0">
This means the processor should use XSLT v 2.0, which
is probably something the processor does not like.
It's somewhat strage that you get  the typical result
of default templates kicking in (all text copied, tags
stripped), instead of an error.

Your StandardPage.xsl is a bit strange too,
no XSL version on the document element, which is usually
a fatal error, and:
> 
...
>  
I'm surprised you get a title.

What processor are you using? Xalan? Which release?

Try to change version="1.0" in your blue style sheet,
this could be enough to fix the problem.

J.Pietschman


-
Please check that your question  has not already been answered in the
FAQ before posting. 

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




Re: xml-izing a site

2002-08-21 Thread J.Pietschmann

Vaskin Kissoyan wrote:
> question about paragraph formatting and taking such content and properly 
> displaying it:
...
> Is there anyway to insert html into the  element? currently 
> I just made a  element which gets repeated and gets formatted 
> as above. I'm looking for a more elegant solution which might involve 
> parsing word for paragraphs or the like.

Stricly spoken, you can't insert HTML in general, because it
is not necessarily well formed XML. You can however insert
XHTML (or tidied HTML) and insert it into the output by using
xsl:copy-of.

Parsing Paragraphs and the like is possible but not very
nice in XSLT. You can look into the XSL FAQ and the XSL
list archive, or ask on the XSL list:
  http://www.mulberrytech.com/xsl/xsl-list/
This topic comes up now and then on the list, I'm sure
there is something in the archive, you just have to dig
it up.

J.Pietschmann



-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: SVG trouble!

2002-08-21 Thread J.Pietschmann

Raúl Wild-Spain wrote:
> java.lang.UnsatisfiedLinkError:
> /usr/local/j2sdk1.4.0_01/jre/lib/i386/libawt.so:
> libXp.so.6: cannot open shared object file: No such file or directory

Batik, the SVG rasterizer distributed with Cocoon,
needs by default X11 installed and running in order
to run. There are various ways to circumvent it,
check the Cocoon documentation for "running..on
headless servers"

J.Pietschmann



-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Common practice: how to keep links to html-trees consistent

2002-08-19 Thread J.Pietschmann

Koen Pellegrims wrote:
> Menu on my site that contains a link to the index-page (index.html)  and
> links to (among others) a product-page. In the page-hierarchy, the
> product-pages are contained within a 'products' directory.
...
> The problem arises when I display this menu on a product page, because the
> browser (rightly so) interprets 'index.html' as being relative to the
> 'products'-directory.
> 
> So, whereas the link to 'index.html' is correct from the index-page, it
> refers to 'products/index.html' on any product page. (and even worse: a link
> to productA suddenly becomes a link to products/products/productsA.html)
> 
> My question is simple: did any of you encounter this problem? And -of
> course- how did you solve it?

Use absolute URLs in menus. I pass a parameter to my XSLT
for the prefix
   ...
so that the tree navigated by the menu can be easily reparented.

Other possibilities use relative URLs and pass nesting depths.

I can imagine only two possibilities not using XSLT:
- Use frames and let the menu get its own frame (has its own set of
   disadvantages)
- Use long filenames instead of paths and a Cocoon regexp matcher to
   map them
URL products-productA -> mapped to /products/productA
   No nested directories -> no problems with relative URLs. :-)

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: AW: AW: FOP-0.20.3

2002-08-15 Thread J.Pietschmann

Wolf-Dieter Grabner wrote:
> The other way round - how can I 'downgrade' Cocoon to an older
> batik version (and/or use fop-020.4 instead of -0.20.3).

This should be as easy as replacing the Batik jar distributed
with Cocoon with the jar distributed with FOP. Well, it
worked for me in various environments. You might experience
trouble with the JPG and other SVG-to-graphics serializers
though.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: AW: FOP-0.20.3

2002-08-14 Thread J.Pietschmann

Wolf-Dieter Grabner wrote:
>>This could be an issue with Batik versions. IIRC Cocoon
>>is distributed with some 1.5 version of Batik, while
>>FOP 0.20.3 needs an 1.1 compatible version.
> 
> What about FOP-0.20.4 or later (CVS) versions?

0.20.4 uses 1.5b2, which is still incompatible with
1.5b3 (or vice-versa, experiment).

Current CVS is a bit difficult to judge, FOP HEAD does
not work (redesign in progress) but will use the latest
Batik (CVS too). The maintenance branch (upcoming 0.20.5)
still uses the same as 0.20.4 I think.


> Is it possible (without in-depth knowledge) to rebuild FOP with the
> current batik version
I don't think you'll like it.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: FOP-0.20.3

2002-08-12 Thread J.Pietschmann

Wolf-Dieter Grabner wrote:
> I'm currently trying to produce some PDFs with fop-0.20.3. Everything -
> SVG's, too - works fine when using fop as a standalone application. When
> accessing the same file within Cocoon 2.0.3 / Tomcat 4.0.4, the PDF
> output stops at the point where the first SVG occurs. Pretty uncool ;-)

This could be an issue with Batik versions. IIRC Cocoon
is distributed with some 1.5 version of Batik, while
FOP 0.20.3 needs an 1.1 compatible version. You should
get a ClassNotFound or MethodNotFound exceptionin this
case, check the Cocoon logs and perhaps catalina.out.

J.Pietschmann


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Réf. : RE: xsl vs cocoon

2002-07-10 Thread J.Pietschmann

Othman Haddad wrote:
> it's partially true, because right now (which is a pitty) there's no 
> sitemap element that can get a parameter value (which is sometimes very 
> important)...

There is a RequestParamAction and a RequestParameterExistsAction,
and various components can take a UseRequestParameter parameter
(os similar). Or did you have a different meaning for "parameter"
in mind?

J.Pietschmann



-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Support for XML-XSL-PDF

2002-07-09 Thread J.Pietschmann

Yogesh Mulwani wrote:
> 3.We want that we can set the background of our PDF report so we 
> are specifying 'background-image' attribute in  element but it 
> seems the cocoon2.0.2 does not support the 'backgorund-image' attribute. 
> Is there any solution to set the background image of the PDF.

Background-image is more or less supported in the current
FOP release 0.20.4. Get a distribution and replace the fop.jar
distributed with Cocoon.

J.Pietschmann



-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




  1   2   >