magnus melwin created FOP-2783:

             Summary: FOP fails to generate pdf for certain URLS
                 Key: FOP-2783
             Project: FOP
          Issue Type: Bug
          Components: fo/page
    Affects Versions: 2.2
            Reporter: magnus melwin

I have an issue with generating pdf files using the apache fop tool from url 
based data, whenever there are certain characters or keywords such as utm or 
rel as the below given url

For example : 



I get the following error

_{{SEVERE: Exception org.apache.fop.apps.FOPException: The reference to entity 
"rel" must end with the ';' delimiter. 
javax.xml.transform.TransformerException: The reference to entity "rel" must 
end with the ';' delimiter.}}_



My XML DATA FILE - mytest.xml contains:



{{My XSL TEMPLATE FILE - mytest.xsl contains}}


_{{<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="1.0" 
xmlns:fo="";> <xsl:output method="xml" 
indent="yes"/> <xsl:template match="/"> <fo:root> <fo:layout-master-set> 
<fo:simple-page-master master-name="A4-portrait" page-height="29.7cm" 
page-width="21.0cm" margin="2cm"> <fo:region-body/> </fo:simple-page-master> 
</fo:layout-master-set> <fo:page-sequence master-reference="A4-portrait">}}_ 

_{{<fo:flow flow-name="xsl-region-body">}}_ 

_{{<fo:block> <fo:basic-link external-destination="url(\{url/@href})" 
color="blue" text-decoration="underline"> <xsl:value-of select="url/@href"/> 
</fo:basic-link> </fo:block> </fo:flow> </fo:page-sequence>  </fo:root>}}_




{{Tested using bash commandline:}}

{{myvar=mytest && /opt/fop-2.2/fop/fop -r -v -xml $myvar.xml -xsl $myvar.xsl 
-pdf $myvar.pdf }}{{}}

{{PDF generation fails ..generating using fop v2.2 on kali linux 2018 and 
opensuse 42.3}}



I have tried both encodings - UTF-8 and  encoding="ISO-8859-1" ...still no 
luck. Any help will be appreciated here.


This message was sent by Atlassian JIRA

Reply via email to