You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Jean-Pierre Lamon <gi...@ngscan.com> on 2014/10/20 09:02:29 UTC

Different sort between FOP and XSL

Hi all,

FOP 1.1 - XSLT 1.0

With exactly the same code for my key indexing, I'm getting two different
ordering sequences through XSLT or FOP:

XSLT (MSXML) (Tried with XML2PDF, sort is also OK)

A CACCIA DEL BOSONE DI HIGGS
A DOS DE DROMADAIRE
ABATON
ABATON
ABATON
ACQUISITION TRAITEMENT ET CONSOMMATION DES RESSOURCES ANI
AFFOLTER JEHANNE

First white space after A is preserved

FO

ABATON
ABATON
ABATON
A CACCIA DEL BOSONE DI HIGGS
ACQUISITION TRAITEMENT ET CONSOMMATION DES RESSOURCES ANI
A DOS DE DROMADAIRE

First white space A after here is ignored

Any idea?
Regards
JP



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Different sort between FOP and XSL

Posted by Pascal Sancho <ps...@gmail.com>.
Xerces is an XML parser, not an XSLT engine.

If you are speaking about the latter, you can use your own, including
Xalan (2.7.1), MsXml, Saxon, LibXslt, etc.

the general process is:
 1. transform xml+xslt to get xsl-fo
    using the chosen Xslt engine
 2. transform xsl-fo to get pdf (or whatever final format)
     using Fop

The way to proceed between the 2 stages depends on how you invoke FOP
(command line, embedded, webservice, etc.): pipe, stream, temp file,
etc.

2014-10-20 11:52 GMT+02:00 Jean-Pierre Lamon <gi...@ngscan.com>:
> Thx for your reply.
> And if I would like to test Xerces with FOP? Possible?
> With version 1.1 I can see xercesImpl-2.7.1.jar
> A way to change that?
> Cheers
> JP
>
>
> -----Message d'origine-----
> De : Pascal Sancho [mailto:psancho.asf@gmail.com]
> Envoyé : lundi 20 octobre 2014 11:17
> À : fop-users@xmlgraphics.apache.org
> Objet : Re: Different sort between FOP and XSL
>
> Hi,
>
> Sorting is only an XSLT feature, not a XSL-FO one.
> Note that sort implementation may differ from XSLT engines, as said in
> XSLT-REC (see [1]):
> "It is possible for two conforming XSLT processors not to sort exactly
> the same."
>
> Note again that FOP bundle comes with Xalan as XSLT engine for
> convenience, but you can use your own, i.e. MSXML, and feed FOP with
> the resulting FO.
>
> [1] http://www.w3.org/TR/xslt#sorting
>
> 2014-10-20 9:02 GMT+02:00 Jean-Pierre Lamon <gi...@ngscan.com>:
>> Hi all,
>>
>> FOP 1.1 - XSLT 1.0
>>
>> With exactly the same code for my key indexing, I'm getting two different
>> ordering sequences through XSLT or FOP:
>>
>> XSLT (MSXML) (Tried with XML2PDF, sort is also OK)
>>
>> A CACCIA DEL BOSONE DI HIGGS
>> A DOS DE DROMADAIRE
>> ABATON
>> ABATON
>> ABATON
>> ACQUISITION TRAITEMENT ET CONSOMMATION DES RESSOURCES ANI
>> AFFOLTER JEHANNE
>>
>> First white space after A is preserved
>>
>> FO
>>
>> ABATON
>> ABATON
>> ABATON
>> A CACCIA DEL BOSONE DI HIGGS
>> ACQUISITION TRAITEMENT ET CONSOMMATION DES RESSOURCES ANI
>> A DOS DE DROMADAIRE
>>
>> First white space A after here is ignored
>>
>> Any idea?
>> Regards
>> JP
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
>> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>>
>
>
>
> --
> pascal
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>



-- 
pascal

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: Different sort between FOP and XSL

Posted by Jean-Pierre Lamon <gi...@ngscan.com>.
Thx for your reply. 
And if I would like to test Xerces with FOP? Possible?
With version 1.1 I can see xercesImpl-2.7.1.jar
A way to change that?
Cheers
JP


-----Message d'origine-----
De : Pascal Sancho [mailto:psancho.asf@gmail.com] 
Envoyé : lundi 20 octobre 2014 11:17
À : fop-users@xmlgraphics.apache.org
Objet : Re: Different sort between FOP and XSL

Hi,

Sorting is only an XSLT feature, not a XSL-FO one.
Note that sort implementation may differ from XSLT engines, as said in
XSLT-REC (see [1]):
"It is possible for two conforming XSLT processors not to sort exactly
the same."

Note again that FOP bundle comes with Xalan as XSLT engine for
convenience, but you can use your own, i.e. MSXML, and feed FOP with
the resulting FO.

[1] http://www.w3.org/TR/xslt#sorting

2014-10-20 9:02 GMT+02:00 Jean-Pierre Lamon <gi...@ngscan.com>:
> Hi all,
>
> FOP 1.1 - XSLT 1.0
>
> With exactly the same code for my key indexing, I'm getting two different
> ordering sequences through XSLT or FOP:
>
> XSLT (MSXML) (Tried with XML2PDF, sort is also OK)
>
> A CACCIA DEL BOSONE DI HIGGS
> A DOS DE DROMADAIRE
> ABATON
> ABATON
> ABATON
> ACQUISITION TRAITEMENT ET CONSOMMATION DES RESSOURCES ANI
> AFFOLTER JEHANNE
>
> First white space after A is preserved
>
> FO
>
> ABATON
> ABATON
> ABATON
> A CACCIA DEL BOSONE DI HIGGS
> ACQUISITION TRAITEMENT ET CONSOMMATION DES RESSOURCES ANI
> A DOS DE DROMADAIRE
>
> First white space A after here is ignored
>
> Any idea?
> Regards
> JP
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>



-- 
pascal

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: Different sort between FOP and XSL

Posted by Jean-Pierre Lamon <gi...@ngscan.com>.
Ok, thanks. You can see I'm a newbie :-)

Your solution is really great :-) My soft can produce .fo file without
problem. And now, it's MSXML that handles XSL parsing. And the result :

A caccia del bosone di Higgs | 17
A dos de dromadaire | 1
Abaton | 19
Affolter, Jehanne
Le site magdalénien de Monruz | 21

Thx again :-)
JP



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: Different sort between FOP and XSL

Posted by Pascal Sancho <ps...@gmail.com>.
Hi,

Sorting is only an XSLT feature, not a XSL-FO one.
Note that sort implementation may differ from XSLT engines, as said in
XSLT-REC (see [1]):
"It is possible for two conforming XSLT processors not to sort exactly
the same."

Note again that FOP bundle comes with Xalan as XSLT engine for
convenience, but you can use your own, i.e. MSXML, and feed FOP with
the resulting FO.

[1] http://www.w3.org/TR/xslt#sorting

2014-10-20 9:02 GMT+02:00 Jean-Pierre Lamon <gi...@ngscan.com>:
> Hi all,
>
> FOP 1.1 - XSLT 1.0
>
> With exactly the same code for my key indexing, I'm getting two different
> ordering sequences through XSLT or FOP:
>
> XSLT (MSXML) (Tried with XML2PDF, sort is also OK)
>
> A CACCIA DEL BOSONE DI HIGGS
> A DOS DE DROMADAIRE
> ABATON
> ABATON
> ABATON
> ACQUISITION TRAITEMENT ET CONSOMMATION DES RESSOURCES ANI
> AFFOLTER JEHANNE
>
> First white space after A is preserved
>
> FO
>
> ABATON
> ABATON
> ABATON
> A CACCIA DEL BOSONE DI HIGGS
> ACQUISITION TRAITEMENT ET CONSOMMATION DES RESSOURCES ANI
> A DOS DE DROMADAIRE
>
> First white space A after here is ignored
>
> Any idea?
> Regards
> JP
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>



-- 
pascal

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org