ok i solved it, the problem is the internet explorer. I seems to have
problems to map
the right application if the filetype (means the extension eg. .html or
.pdf) doesn't
fit to the mime-type. I changed the action attribute in the forms to
print.pdf instead
of print.htm and it worked.
ciao Lars
> -----Urspr�ngliche Nachricht-----
> Von: Kirchhoff, Lars
> Gesendet: Montag, 30. Dezember 2002 17:54
> An: Cocoon-Users (E-Mail)
> Betreff: strange fo2pdf serializer problem (xmlform)
>
>
> hi,
>
> I setup a sitemap with a resource to be able to give different output
> formats.
>
> ----- code -------------------------
> <map:resources>
> <map:resource name="format-transformation">
> <map:select type="parameter">
> <map:parameter name="parameter-selector-test"
> value="{format}" />
> <map:when test="pdf">
> <map:transform src="stylesheets/print/print2pdf.xsl" />
> <map:serialize type="fo2pdf" />
> </map:when>
> <map:otherwise>
> <map:transform src="stylesheets/print/print2html.xsl" />
> <map:serialize type="html" label="debug" />
> </map:otherwise>
> </map:select>
> </map:resource>
> </map:resources>
>
> <map:match pattern="print*">
> <map:act type="set-encoding">
> <map:parameter name="form-encoding" value="UTF-8"/>
> </map:act>
>
> <map:act type="print">
> <map:parameter name="xmlform-id"
> value="printInv"/>
> <map:parameter name="xmlform-scope" value="session"/>
> <map:parameter name="xmlform-model" value="test.UserBean"/>
>
> <map:generate src="forms/{page}.xml" />
>
> <map:act type="locale">
> <map:transform type="i18n">
> <map:parameter name="locale" value="{locale}"/>
> </map:transform>
> </map:act>
>
> <map:transform type="xmlform" label="xml"/>
>
> <map:select type="parameter">
> <map:parameter name="parameter-selector-test" value="{page}" />
> <map:when test="invoice">
> <map:call resource="format-transformation">
> <map:parameter name="format" value="{format}" />
> </map:call>
> </map:when>
>
> <map:otherwise>
> <map:transform src="stylesheets/wizard2html.xsl" />
> <map:transform src="stylesheets/xmlform2html.xsl" />
> <map:serialize type="html" label="debug"/>
> </map:otherwise>
> </map:select>
> </map:act>
> </map:match>
>
> ----- /code -------------------------
>
> From the xmlform action I return the page and the format parameter.
> Depending on some database action the invoice page/view is displayed
> after different views before. (for instance, the action looks up for
> the name of a customer and if it finds it, it goes directly
> to the invoice
> view if not it shows a list of all found customers and after
> selecting
> one the invoice will be shown.
>
> The problem now is that the pdf version of the invoice is
> displayed only
> if the user does select one customer from the list. If the
> action finds
> a customer straight ahead, the output of the pdf is like
> <p> </p>.
>
> First I thought i return the wrong parameter from the action, but the
> parameters are right.
> Second I compared the output the invoice2pdf.xsl of both ways
> with the
> htmlSerializer and both are looking exactly.
>
> Now I don't see any difference between both and getting stuck
> with these.
> If anybody has an idea about this I would be very pleased to get an
> answer.
>
> ciao Lars
>
>
> ---------------------------------------------------------------------
> 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]>
>
---------------------------------------------------------------------
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]>