Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

FOP fails with something like “The attribute “width” of the element is required”. Whats wrong?

element fails FOP wrong
0
10 Posted

FOP fails with something like “The attribute “width” of the element is required”. Whats wrong?

0

This phenomenon occurs since FOP 0.92 beta. It surfaced due to a change in the handling of non-FO namespaces. It’s not a bug in FOP, but rather in the dependent packages: Apache Batik, Apache Xalan-J and SAXON. The bug in Apache Batik will be fixed in the next release. In the latest release of Apache Xalan-J, the bug is already fixed. It only occurs in the Xalan version bundled with Sun’s JVM, because Sun uses a rather old version. Bug description: In a namespace-enabled Level 3 DOM, an attribute in the default namespace must be set with “null” as the value for the namespace URI. SAX, on the other side, uses an empty string (“”) to designate the default namespace. Many packages appear to not properly handle this difference in which case they still use the empty string as the namespace URI parameter for org.w3c.dom.Element.setAttributeNS(). Work-around: Use the latest version of Apache Xalan-J. Note that starting with JDK 1.4 it’s not enough to replace Xalan-J on the normal application

0

This phenomenon is not a bug in FOP, but rather in the dependent packages: Apache Batik, Apache Xalan-J and SAXON. The bug in Apache Batik will be fixed in the next release. In the latest release of Apache Xalan-J, the bug is already fixed. It only occurs in the Xalan version bundled with Sun’s JVM, because Sun uses a rather old version. Bug description: In a namespace-enabled Level 3 DOM, an attribute in the default namespace must be set with “null” as the value for the namespace URI. SAX, on the other side, uses an empty string (“”) to designate the default namespace. Many packages appear to not properly handle this difference in which case they still use the empty string as the namespace URI parameter for org.w3c.dom.Element.setAttributeNS(). Work-around: Use the latest version of Apache Xalan-J. Note that starting with JDK 1.4 it’s not enough to replace Xalan-J on the normal application classpath and you need to override the Xalan-J version bundled with the Sun JVM using the Endors

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.