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 Lucas Miguez <lu...@gmail.com> on 2010/06/02 11:22:49 UTC

FOP encoding Issue

Hi,

I have the following problem using FOP 0.95.

I have an XML in UTF-8 encoding, and the XSL file in UTF-8 too. There is no
problem when I generate the PDF file.

But I have another XML file in windows-1252 encoding and the XSL file in
iso-8859-1.

The problem is that when I generate the PDF, the values of the fields there
are not displayed...

What are the encodings supported by Apache FOP?

Maybe I'm missing the namespace showed in the XML file. Take a look at the
following XML declaration:

<?xml version="1.0" encoding="windows-1252"?>
<AuditFile xmlns="urn:OECD:StandardAuditFile-Tax:PT_1.00_01">
  <Header>
    <AuditFileVersion>1.00_01</AuditFileVersion>
    <CompanyID/>
....

And now the XSL declaration:

<?xml version="1.0" encoding="windows-1252"?><!-- DWXMLSource="Fact
Portugal/SAFT-PT/Exemplo SAFT da Facturacao.XML" -->
<!DOCTYPE xsl:stylesheet  [
    <!ENTITY nbsp   "&#160;">
    <!ENTITY copy   "&#169;">
    <!ENTITY reg    "&#174;">
    <!ENTITY trade  "&#8482;">
    <!ENTITY mdash  "&#8212;">
    <!ENTITY ldquo  "&#8220;">
    <!ENTITY rdquo  "&#8221;">
    <!ENTITY pound  "&#163;">
    <!ENTITY yen    "&#165;">
    <!ENTITY euro   "&#8364;">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform"
xmlns="urn:OECD:StandardAuditFile-Tax:PT_1.00_01" xmlns:fo="
http://www.w3.org/1999/XSL/Format">
....


Thanks

Re: FOP encoding Issue

Posted by Pascal Sancho <pa...@takoma.fr>.
Hi,

what you describe here is not related to any FOP limitation.
FOP job begins *after* XML transformation, the latter being delegated to
Xalan in FOP releases.
You will probably get more help on XSLT forum (see[1]).

That said, you can get some help on this list if you provide the
resulting XSL-FO file.

[1] http://www.mulberrytech.com/xsl/xsl-list

Pascal

Le 02/06/2010 11:22, Lucas Miguez a écrit :
> Hi,
>
> I have the following problem using FOP 0.95.
>
> I have an XML in UTF-8 encoding, and the XSL file in UTF-8 too. There
> is no problem when I generate the PDF file.
> But I have another XML file in windows-1252 encoding and the XSL file
> in iso-8859-1.
> The problem is that when I generate the PDF, the values of the fields
> there are not displayed...
> What are the encodings supported by Apache FOP?
> Maybe I'm missing the namespace showed in the XML file. Take a look at
> the following XML declaration:
> <?xml version="1.0" encoding="windows-1252"?>
> <AuditFile xmlns="urn:OECD:StandardAuditFile-Tax:PT_1.00_01">
>   <Header>
>     <AuditFileVersion>1.00_01</AuditFileVersion>
>     <CompanyID/>
> ....
>
> And now the XSL declaration:
> <?xml version="1.0" encoding="windows-1252"?><!-- DWXMLSource="Fact
> Portugal/SAFT-PT/Exemplo SAFT da Facturacao.XML" -->
> <!DOCTYPE xsl:stylesheet  [
>     <!ENTITY nbsp   "&#160;">
>     <!ENTITY copy   "&#169;">
>     <!ENTITY reg    "&#174;">
>     <!ENTITY trade  "&#8482;">
>     <!ENTITY mdash  "&#8212;">
>     <!ENTITY ldquo  "&#8220;">
>     <!ENTITY rdquo  "&#8221;">
>     <!ENTITY pound  "&#163;">
>     <!ENTITY yen    "&#165;">
>     <!ENTITY euro   "&#8364;">
> ]>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns="urn:OECD:StandardAuditFile-Tax:PT_1.00_01"
> xmlns:fo="http://www.w3.org/1999/XSL/Format">
> ....
>
>
> Thanks


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