throws IllegalArgumentException {
try {
renderer = (Renderer)Class.forName(rendererClassName).newInstance();
- renderer.setLogger(getLogger());
renderer.setProducer(Version.getVersion());
renderer.setUserAgent(getUserAgent());
} catch (ClassNotFoundException e) {
}
}
+ /**
+ * @see org.apache.fop.fo.FONode#end
+ */
protected void end() {
if (children == null) {
missingChildElementError("(simple-page-master|page-sequence-master)+");
// XML
import org.xml.sax.Attributes;
+import org.xml.sax.Locator;
// FOP
+import org.apache.fop.fo.FOElementMapping;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
import org.apache.fop.fo.FOTreeVisitor;
super(parent);
}
+ /**
+ * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String)
+ XSL/FOP: (conditional-page-master-reference+)
+ */
+ protected void validateChildNode(Locator loc, String nsURI, String localName) {
+ if (!(nsURI == FOElementMapping.URI &&
+ localName.equals("conditional-page-master-reference"))) {
+ invalidChildError(loc, nsURI, localName);
+ }
+ }
+
+ /**
+ * @see org.apache.fop.fo.FONode#end
+ */
+ protected void end() {
+ if (children == null) {
+ missingChildElementError("(conditional-page-master-reference+)");
+ }
+ }
+
/**
* @see org.apache.fop.fo.FObj#addProperties
*/
import org.apache.fop.fonts.FontInfo;
import org.apache.fop.fo.pagination.Region;
import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
// Avalon
import org.apache.avalon.framework.configuration.Configurable;
/**
* logging instance
*/
- protected Log logger = null;
-
+ protected static Log logger = LogFactory.getLog("Renderer");
+
/**
* producer (usually "FOP")
*/
public void configure(Configuration conf) throws ConfigurationException {
}
- /**
- * Sets the Commons-Logging instance for this class
- * @param logger The Commons-Logging instance
- */
- public void setLogger(Log logger) {
- this.logger = logger;
- }
-
/**
* Returns the Commons-Logging instance for this class
* @return The Commons-Logging instance
* @param cont The inline container area
*/
void renderContainer(Container cont);
-
- /**
- * Tells the renderer to render an inline container.
- *
- * @param cont The inline container area
- */
- void setLogger(Log logger);
}
rend = new SVGRenderer();
}
- rend.setLogger(logger);
FontInfo fontInfo = new FontInfo();
rend.setupFontInfo(fontInfo);
FOUserAgent ua = new FOUserAgent();