Pārlūkot izejas kodu

changed names to make transforms easier

removed unused files


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194610 13f79535-47bb-0310-9956-ffa450edef68
tags/fop-0_20_4-doc
Keiron Liddle pirms 22 gadiem
vecāks
revīzija
aba029c6c6

src/codegen/Courier-Bold.xml → src/codegen/CourierBold.xml Parādīt failu


src/codegen/Courier-BoldOblique.xml → src/codegen/CourierBoldOblique.xml Parādīt failu


src/codegen/Courier-Oblique.xml → src/codegen/CourierOblique.xml Parādīt failu


src/codegen/Helvetica-Bold.xml → src/codegen/HelveticaBold.xml Parādīt failu


src/codegen/Helvetica-BoldOblique.xml → src/codegen/HelveticaBoldOblique.xml Parādīt failu


src/codegen/Helvetica-Oblique.xml → src/codegen/HelveticaOblique.xml Parādīt failu


src/codegen/Times-Bold.xml → src/codegen/TimesBold.xml Parādīt failu


src/codegen/Times-BoldItalic.xml → src/codegen/TimesBoldItalic.xml Parādīt failu


src/codegen/Times-Italic.xml → src/codegen/TimesItalic.xml Parādīt failu


src/codegen/Times-Roman.xml → src/codegen/TimesRoman.xml Parādīt failu


+ 0
- 20
src/codegen/elements.dtd Parādīt failu

@@ -1,20 +0,0 @@
<!-- $Id$ -->
<!--
DTD for svgelements.xml
-->

<!DOCTYPE elements [
<!ELEMENT elements (commonAttributes+, element+) >
<!ATTLIST elements
prefix CDATA #REQUIRED
ns CDATA #REQUIRED>
<!ELEMENT element (tagname, attributes) >
<!ELEMENT tagname (#PCDATA) >
<!ELEMENT attributes ((attribute | includeAttributes)+) >
<!ELEMENT commonAttributes ((attribute | includeAttributes)+) >
<!ATTLIST commonAttributes
ref CDATA #REQUIRED>
<!ELEMENT attribute (#PCDATA) >
<!ELEMENT includeAttributes (#PCDATA) >
<!ATTLIST includeAttributes
ref CDATA #REQUIRED>

+ 0
- 154
src/codegen/elements.xsl Parādīt failu

@@ -1,154 +0,0 @@
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:lxslt="http://xml.apache.org/xslt"
xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
extension-element-prefixes="redirect">

<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'" />
<xsl:variable name="ucletters" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
<xsl:value-of select="concat(translate(substring($str, 1, 1),
$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:when test="contains($propstr, '-')">
<xsl:call-template name="capfirst">
<xsl:with-param name="str" select="substring-before($propstr, '-')"/>
</xsl:call-template>
<xsl:call-template name="makeClassName">
<xsl:with-param name="propstr" select="substring-after($propstr, '-')"/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="capfirst">
<xsl:with-param name="str" select="$propstr"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="attributes"><xsl:apply-templates/></xsl:template>

<xsl:template match="includeAttributes">
<xsl:variable name="attr-ref">
<xsl:value-of select="@ref"/>
</xsl:variable>
<xsl:for-each select="/elements/commonAttributes">
<xsl:choose>
<xsl:when test="@ref = $attr-ref">
<xsl:apply-templates/>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:template>

<xsl:template match="attribute">"<xsl:apply-templates/>"<xsl:if test="not(position()=last())">, </xsl:if></xsl:template>

<xsl:template match="elements">
<xsl:apply-templates select="element"/>
</xsl:template>

<xsl:template match="tagname">
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="element">

<xsl:variable name="name">
<xsl:apply-templates select="tagname"/>
</xsl:variable>

<xsl:variable name="classname">
<xsl:choose>
<xsl:when test="class-name">
<xsl:value-of select="class-name"/>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="makeClassName">
<xsl:with-param name="propstr" select="$name"/>
</xsl:call-template>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>

<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.w3c.dom.Element;

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.
*/
public static class Maker extends FObj.Maker {

/**
* make a <xsl:apply-templates select="tagname"/> object.
*
* @param parent the parent formatting object
* @param propertyList the explicit properties of this object
*
* @return the <xsl:apply-templates select="tagname"/> object
*/
public FObj make(FObj parent,
PropertyList propertyList) throws FOPException {
return new <xsl:value-of select="$classname"/>(parent, propertyList);
}
}

/**
* returns the maker for this object.
*
* @return the maker for <xsl:apply-templates select="tagname"/> objects
*/
public static FObj.Maker maker() {
return new <xsl:value-of select="$classname"/>.Maker();
}

/**
* constructs a <xsl:apply-templates select="tagname"/> object (called by Maker).
*
* @param parent the parent formatting object
* @param propertyList the explicit properties of this object
*/
protected <xsl:value-of select="$classname"/>(FObj parent, PropertyList propertyList) {
super(parent, propertyList);
this.name = "<xsl:value-of select="//@prefix"/>:<xsl:value-of select="$name"/>";
tagName = "<xsl:value-of select="$name"/>";
props = new String[] {<xsl:apply-templates select="attributes"/>};
}

<xsl:if test="@addText">
protected void addCharacters(char data[], int start, int length) {
this.children.addElement(new String(data, start, length - start));
}
</xsl:if>
}
</redirect:write>
</xsl:template>

</xsl:stylesheet>

+ 0
- 1355
src/codegen/svgelements.xml
Failā izmaiņas netiks attēlotas, jo tās ir par lielu
Parādīt failu


Notiek ielāde…
Atcelt
Saglabāt