aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2001-06-20 08:44:58 +0000
committerKeiron Liddle <keiron@apache.org>2001-06-20 08:44:58 +0000
commitd5ebe6f872cb53298261f9ecc75d44474e4f04f0 (patch)
tree0b75cc42093600e6350f655501f9f2325e18a3f3 /src
parent03251238691db372bb8e690c5a35c6400bd8da69 (diff)
downloadxmlgraphics-fop-d5ebe6f872cb53298261f9ecc75d44474e4f04f0.tar.gz
xmlgraphics-fop-d5ebe6f872cb53298261f9ecc75d44474e4f04f0.zip
some independance improvements
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194299 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/codegen/elements.xsl22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/codegen/elements.xsl b/src/codegen/elements.xsl
index 9c0e3cdd7..3fcca188d 100644
--- a/src/codegen/elements.xsl
+++ b/src/codegen/elements.xsl
@@ -6,6 +6,10 @@
<xsl:output method="text" />
+<xsl:variable name="prefixVal">
+<xsl:value-of select="//elements/@prefix"/>
+</xsl:variable>
+
<xsl:template name="capfirst">
<xsl:param name="str"/>
<xsl:variable name="lcletters" select="'abcdefghijklmnopqrstuvwxyz'" />
@@ -14,6 +18,14 @@
$lcletters, $ucletters), substring($str, 2))"/>
</xsl:template>
+<xsl:template name="capall">
+ <xsl:param name="str"/>
+ <xsl:variable name="lcletters" select="'abcdefghijklmnopqrstuvwxyz'" />
+ <xsl:variable name="ucletters" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
+ <xsl:value-of select="translate($str,
+ $lcletters, $ucletters)"/>
+</xsl:template>
+
<xsl:template name="makeClassName">
<xsl:param name="propstr"/>
<xsl:choose>
@@ -77,21 +89,17 @@
</xsl:choose>
</xsl:variable>
-<redirect:write select="concat('@org/apache/fop@/svg/', $classname, '.java')">
-package org.apache.fop.svg;
+<redirect:write select="concat('@org/apache/fop@/{$prefixVal}/', $classname, '.java')">
+package org.apache.fop.<xsl:value-of select="$prefixVal"/>;
import org.apache.fop.fo.*;
import org.apache.fop.layout.Area;
import org.apache.fop.layout.FontState;
import org.apache.fop.apps.FOPException;
-import org.apache.batik.dom.svg.*;
-
-import org.w3c.dom.svg.SVGElement;
-import org.w3c.dom.svg.SVGDocument;
import org.w3c.dom.Element;
-public class <xsl:value-of select="$classname"/> extends SVGObj {
+public class <xsl:value-of select="$classname"/> extends <xsl:call-template name="capall"><xsl:with-param name="str" select="$prefixVal"/></xsl:call-template>Obj {
/**
* inner class for making <xsl:apply-templates select="tagname"/> objects.