[prev in list] [next in list] [prev in thread] [next in thread]
List: fop-dev
Subject: [jira] [Closed] (FOP-2706) Allow not failing when an unknown FO property is found
From: "Vincent Massol (JIRA)" <jira () apache ! org>
Date: 2017-05-12 14:01:04
Message-ID: JIRA.13071527.1494593930000.197637.1494597664208 () Atlassian ! JIRA
[Download RAW message or body]
[ https://issues.apache.org/jira/browse/FOP-2706?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel \
]
Vincent Massol closed FOP-2706.
-------------------------------
Resolution: Not A Problem
Thanks so much [~ssteiner1]! I had missed this. I've tested it and it works fine so \
I'm closing this issue.
> Allow not failing when an unknown FO property is found
> ------------------------------------------------------
>
> Key: FOP-2706
> URL: https://issues.apache.org/jira/browse/FOP-2706
> Project: FOP
> Issue Type: Improvement
> Affects Versions: 2.2
> Reporter: Vincent Massol
>
> Rationale: on the XWiki project we use FOP to export to PDF like this:
> * Generate XHTML from a wiki page and clean it
> * Apply a xhtml2fo.xsl XSL stylesheet
> * Run FOP on it to generate the PDF
> However our xhtml2fo.xsl is far from perfect and it lets some invalid FO slip \
> through. Of course a solution is to fix is and re-implement it as a white list of \
> FOP-supported properties instead of what we do now which is to remove unknown \
> properties (and we constantly find new CSS properties that make it fail). However \
> this is going to take time and we were wondering if, in the meantime, you'd be open \
> to add a feature in FOP to be more lenient and instead of hard failing when there \
> are unknown properties to log a warning an continue? Right now I have this local \
> patch for PropertyList#convertAttributeToProperty(): Before patch:
> {code}
> if (propId == -1
> > > (subpropId == -1 && subPropertyName != null)) {
> handleInvalidProperty(new QName(null, attributeName));
> }
> {code}
> After patch:
> {code}
> if (propId == -1
> > > (subpropId == -1 && subPropertyName != null)) {
> log.warn("Ignoring invalid property: " + attributeName);
> // handleInvalidProperty(new QName(null, attributeName));
> }
> {code}
> Of course this should be done properly and a configuration option introduced so \
> that by default it throws an exception as it does now but when the "lenient" \
> property is set it would emit a warning instead. AFAICS the config property should \
> be defined in FOUserAgent, right? WDYT? Would you be open to include this option in \
> the fop codebase?
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic