]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
some independance improvements
authorKeiron Liddle <keiron@apache.org>
Wed, 20 Jun 2001 08:44:58 +0000 (08:44 +0000)
committerKeiron Liddle <keiron@apache.org>
Wed, 20 Jun 2001 08:44:58 +0000 (08:44 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194299 13f79535-47bb-0310-9956-ffa450edef68

src/codegen/elements.xsl

index 9c0e3cdd73707e5fc04d265661316e84d7da7587..3fcca188df8e677668e89786d6985f19d54953c8 100644 (file)
@@ -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'" />
                    $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>
   </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.