aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas L. Delmelle <adelmelle@apache.org>2005-09-28 20:41:38 +0000
committerAndreas L. Delmelle <adelmelle@apache.org>2005-09-28 20:41:38 +0000
commit0d958797f24f630650d5fdd45eabfa8fd69933a7 (patch)
tree00e2e5a1b236b365b6ce99888366905ea71b7cf5
parentce41ee5eaf87be28d99fcf5b6f1c6e7ce38ba741 (diff)
downloadxmlgraphics-fop-0d958797f24f630650d5fdd45eabfa8fd69933a7.tar.gz
xmlgraphics-fop-0d958797f24f630650d5fdd45eabfa8fd69933a7.zip
Slight modification to user config file format
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@292290 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--conf/fop.xconf16
-rw-r--r--src/java/org/apache/fop/apps/FOUserAgent.java18
2 files changed, 17 insertions, 17 deletions
diff --git a/conf/fop.xconf b/conf/fop.xconf
index d3fc5794b..c5534b134 100644
--- a/conf/fop.xconf
+++ b/conf/fop.xconf
@@ -14,16 +14,16 @@ the location of this file.
<!-- NOTE: This is the version of the configuration -->
<fop version="1.0">
- <userAgent>
- <base url="./"/>
- <!-- pixel to millimeter to specify dpi, 72dpi -->
- <pixelToMillimeter value="0.35277777777777777778"/>
- <!-- default page-height and page-width, in case
- value is specified as auto -->
+ <base url="./"/>
+ <!-- pixel to millimeter to specify dpi, 72dpi -->
+ <pixelToMillimeter value="0.35277777777777777778"/>
+ <pagesettings>
+ <!-- default page-height and page-width, in case
+ value is specified as auto -->
<pageHeight value="11in"/>
<pageWidth value="8.26in"/>
- </userAgent>
-
+ </pagesettings>
+
<!-- Information for specific renderers -->
<!-- Uses renderer mime type for renderers -->
<renderers>
diff --git a/src/java/org/apache/fop/apps/FOUserAgent.java b/src/java/org/apache/fop/apps/FOUserAgent.java
index 6c278428a..b462bc58c 100644
--- a/src/java/org/apache/fop/apps/FOUserAgent.java
+++ b/src/java/org/apache/fop/apps/FOUserAgent.java
@@ -353,10 +353,9 @@ public class FOUserAgent {
*/
public void initUserConfig() throws ConfigurationException {
log.info("Initializing User Agent Configuration");
- Configuration cfgUserAgent = userConfig.getChild("userAgent");
- if (cfgUserAgent.getChild("base", false) != null) {
+ if (userConfig.getChild("base", false) != null) {
try {
- String cfgBaseDir = cfgUserAgent.getChild("base")
+ String cfgBaseDir = userConfig.getChild("base")
.getAttribute("url");
File dir = new File(cfgBaseDir);
if (dir.isDirectory()) {
@@ -372,18 +371,19 @@ public class FOUserAgent {
}
log.info("Base URL set to: " + baseURL);
}
- if (cfgUserAgent.getChild("pixelToMillimeter", false) != null) {
- this.px2mm = cfgUserAgent.getChild("pixelToMillimeter")
+ if (userConfig.getChild("pixelToMillimeter", false) != null) {
+ this.px2mm = userConfig.getChild("pixelToMillimeter")
.getAttributeAsFloat("value", DEFAULT_PX2MM);
log.info("pixelToMillimeter set to: " + px2mm);
}
- if (cfgUserAgent.getChild("pageHeight", false) != null) {
- setPageHeight(cfgUserAgent.getChild("pageHeight")
+ Configuration pageConfig = userConfig.getChild("pagesettings");
+ if (pageConfig.getChild("pageHeight", false) != null) {
+ setPageHeight(pageConfig.getChild("pageHeight")
.getAttribute("value"));
log.info("Default page-height set to: " + pageHeight);
}
- if (cfgUserAgent.getChild("pageWidth", false) != null) {
- setPageWidth(cfgUserAgent.getChild("pageWidth")
+ if (pageConfig.getChild("pageWidth", false) != null) {
+ setPageWidth(pageConfig.getChild("pageWidth")
.getAttribute("value"));
log.info("Default page-width set to: " + pageWidth);
}