You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by DoomHammer <Do...@poczta.wp.pl> on 2004/04/26 21:55:11 UTC
Strange thingy with pipeline
I've got a pipeline, which looks like this:
<map:match pattern="">
<map:generate src="Wu.xml"/>
<map:transform type="sql">
<map:parameter name="use-connection" value="MySQL"/>
<map:parameter name="clob-encoding" value="UTF-8"/>
</map:transform>
<map:transform src="entities.xsl"/>
<map:transform type="mml-extractor"/>
<map:transform src="fragment2img.xsl"/>
<map:serialize type="html">
<encoding>UTF-8</encoding>
</map:serialize>
</map:match>
first it queries data from SQL then, using XSL, transforms entities
into chars. Next mml-extractor and fragment2img.xsl should transform
the MathML equations into GIF images. But they doesn't want to... It's
ok, when I save the generated page to disk and then use it as a source
in another pipeline, which only uses mml-extratcor and f2i.xsl, but
why it doesn't work this way?
--
Best regards,
DoomHammer mailto:DoomHammer@poczta.wp.pl
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Strange thingy with pipeline
Posted by Tim Larson <ti...@keow.org>.
On Mon, Apr 26, 2004 at 10:37:25PM +0200, DoomHammer wrote:
> TC> Have you tried inspecting the XML before and after these two steps: ?
>
> TC> <map:transform type="mml-extractor"/>
> TC> <map:transform src="fragment2img.xsl"/>
>
> Yes. The most funny thing is that the saved XML and XML produced by
> SQLGenerator are identical. And only the saved one tranforms with
> JEuclid... :/
Try the LogTransformer to see the actual SAX events in your two cases:
http://cocoon.apache.org/2.1/userdocs/transformers/log-transformer.html
Use a diff tool to see if there are any differences in the SAX streams.
This can sometimes find differences this way that are hidden when just
viewing the generated XML.
--Tim Larson
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
retrieving XML from db using SQLTransformer (was: Strange thingy
with pipeline)
Posted by Joerg Heinicke <jo...@gmx.de>.
On 27.04.2004 21:43, DoomHammer wrote:
> JH> Can you tell us what exactly you store and retrieve in and from the
> JH> database, i.e. which entities you need to replace? Are it the equation
> JH> or complete MathML?
>
> Serialized it looks like this:
> <math xmlns="http://www.w3.org/1998/Math/MathML">
> <mrow>
> <msub>
> <mi>a</mi>
> <mn>3</mn>
> </msub>
> <mo>=</mo><mo>−</mo><mn>1,</mn><mtext> </mtext><mtext> </mtext><msub>
> <mi>a</mi>
> <mn>8</mn>
> </msub>
> <mo>=</mo><mn>2</mn>
> </mrow>
> </math>
But that's already with @disable-output-escaping, isn't it? Without it
the XML would came out as <math xmlns=""><mrow> and so on?
I did a quick search on SQLTransformer, but it seems it provides no XML
datatype. Is it possible to switch to XSP/ESQL, where the XML datatype
is provided (i.e. the XML string is parsed) and you get real SAX events
out of it? This depends more or less and the generator step you have in
use at the moment.
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Strange thingy with pipeline
Posted by Joerg Heinicke <jo...@gmx.de>.
On 30.04.2004 14:25, DoomHammer wrote:
> JH>> Can you tell us what exactly you store and retrieve in and from the
> JH>> database, i.e. which entities you need to replace? Are it the equation
> JH>> or complete MathML?
>
> JH>> Joerg
>
> D> Serialized it looks like this:
> ...
> D> and so on....
>
> D> Send here full XML attached?
>
> So there are no ideas about what to do?
I gave an answer:
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=108309935502126&w=4.
I only changed the subject to more meaningful one, so you might have
missed it.
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re[3]: Strange thingy with pipeline
Posted by DoomHammer <Do...@poczta.wp.pl>.
JH>> Can you tell us what exactly you store and retrieve in and from the
JH>> database, i.e. which entities you need to replace? Are it the equation
JH>> or complete MathML?
JH>> Joerg
D> Serialized it looks like this:
...
D> and so on....
D> Send here full XML attached?
So there are no ideas about what to do?
DoomHammer
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re[2]: Strange thingy with pipeline
Posted by DoomHammer <Do...@poczta.wp.pl>.
JH> Can you tell us what exactly you store and retrieve in and from the
JH> database, i.e. which entities you need to replace? Are it the equation
JH> or complete MathML?
JH> Joerg
Serialized it looks like this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<page xmlns:sql="http://apache.org/cocoon/SQL/2.0">
Hello
This is my first Cocoon2 page filled with sql data!
1Wstęp2Matematyka1Trygonometria2Ciągi liczbowe1Co¶ 3atwego (dopuszczaj±cy)1Wyznacz ciąg arytmetyczny mając dane:
<ol><li><math xmlns="http://www.w3.org/1998/Math/MathML">
<mrow>
<msub>
<mi>a</mi>
<mn>3</mn>
</msub>
<mo>=</mo><mo>−</mo><mn>1,</mn><mtext> </mtext><mtext> </mtext><msub>
<mi>a</mi>
<mn>8</mn>
</msub>
<mo>=</mo><mn>2</mn>
</mrow>
</math>
,</li>
and so on....
Send here full XML attached?
DoomHammer
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Strange thingy with pipeline
Posted by Joerg Heinicke <jo...@gmx.de>.
On 26.04.2004 22:37, DoomHammer wrote:
> TC> Have you tried inspecting the XML before and after these two steps: ?
>
> TC> <map:transform type="mml-extractor"/>
> TC> <map:transform src="fragment2img.xsl"/>
>
> Yes. The most funny thing is that the saved XML and XML produced by
> SQLGenerator are identical. And only the saved one tranforms with
> JEuclid... :/
If you followed the suggestion in the other thread using
@disable-output-escaping that's not true. It only looks like the same,
because you are serializing the stuff to an XML string. But it is not
the same in the sense of SAX events. @disable-output-escaping affects
only the serialization of them.
Can you tell us what exactly you store and retrieve in and from the
database, i.e. which entities you need to replace? Are it the equation
or complete MathML?
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re[2]: Strange thingy with pipeline
Posted by DoomHammer <Do...@poczta.wp.pl>.
TC> Have you tried inspecting the XML before and after these two steps: ?
TC> <map:transform type="mml-extractor"/>
TC> <map:transform src="fragment2img.xsl"/>
Yes. The most funny thing is that the saved XML and XML produced by
SQLGenerator are identical. And only the saved one tranforms with
JEuclid... :/
TC> Regards,
TC> Tony
DoomHammer
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Strange thingy with pipeline
Posted by Tony Collen <co...@umn.edu>.
DoomHammer wrote:
> TC> Hmm, why are you expecting a pipeline that serializes HTML to generate images?
>
> Because later on is:
> <map:match pattern="images/*.gif">
> <map:generate type="extractor" src="{1}"/>
> <!--<map:transform src="mathmlc2p.xsl"/>-->
> <map:serialize type="mml2gif"/>
> </map:match>
>
> :D
> It's JEuclid and company. Working with other sources... Not with
> SQLGenerated XML :/
Have you tried inspecting the XML before and after these two steps: ?
<map:transform type="mml-extractor"/>
<map:transform src="fragment2img.xsl"/>
Regards,
Tony
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re[2]: Strange thingy with pipeline
Posted by DoomHammer <Do...@poczta.wp.pl>.
TC> Hmm, why are you expecting a pipeline that serializes HTML to generate images?
Because later on is:
<map:match pattern="images/*.gif">
<map:generate type="extractor" src="{1}"/>
<!--<map:transform src="mathmlc2p.xsl"/>-->
<map:serialize type="mml2gif"/>
</map:match>
:D
It's JEuclid and company. Working with other sources... Not with
SQLGenerated XML :/
TC> Tony
--
Best regards,
DoomHammer mailto:DoomHammer@poczta.wp.pl
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Strange thingy with pipeline
Posted by Tony Collen <co...@umn.edu>.
DoomHammer wrote:
> I've got a pipeline, which looks like this:
> <map:match pattern="">
> <map:generate src="Wu.xml"/>
> <map:transform type="sql">
> <map:parameter name="use-connection" value="MySQL"/>
> <map:parameter name="clob-encoding" value="UTF-8"/>
> </map:transform>
> <map:transform src="entities.xsl"/>
> <map:transform type="mml-extractor"/>
> <map:transform src="fragment2img.xsl"/>
> <map:serialize type="html">
> <encoding>UTF-8</encoding>
> </map:serialize>
> </map:match>
>
> first it queries data from SQL then, using XSL, transforms entities
> into chars. Next mml-extractor and fragment2img.xsl should transform
> the MathML equations into GIF images. But they doesn't want to... It's
> ok, when I save the generated page to disk and then use it as a source
> in another pipeline, which only uses mml-extratcor and f2i.xsl, but
> why it doesn't work this way?
>
Hmm, why are you expecting a pipeline that serializes HTML to generate images?
Tony
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org