Subversion Repositories general

Rev

Blame | Last modification | View Log | RSS feed

PK
ý<ç. META-INF/þÊPK
ý<ç.µ ʾNNMETA-INF/MANIFEST.MFManifest-Version: 1.0
Comment: you can set named regions on pictures
Transform-To-File: src/plugins/regionEditorPlugin/RegionEditorPluginTr
 ansform.xsl
Created-By: 1.4.0 (Sun Microsystems Inc.)
Description: ...(todo)
XMLEditor-Plugin-Name: RegionEditor
Class-Path: ImagePlugin.jar
Transform-Fro-File: src/plugins/regionEditorPlugin/RegionEditorPluginT
 ransformBack.xsl 
Main-Class: src.plugins.regionEditorPlugin.RegionEditorPlugin

Name: src/plugins/regionEditorPlugin
Specification-Version: 0.4 (05/07/03)
Specification-Title: plugin for XMLEditor
Implementation-Version: 0.1 (05/07/03)
Implementation-Title: src.plugins.regionEditorPlugin
Implementation-Vendor: group5, software practice SS_2003, University B
 ielefeld, Germany
Specification-Vendor: group5, software practice SS_2003, University Bi
 elefeld, Germany

PK
G¿æ.n,@¯––7src/plugins/regionEditorPlugin/RegionEditorPlugin.classÊþº¾-"1src/plugins/regionEditorPlugin/RegionEditorPluginjava/lang/Object<init>()VCode
LineNumberTableLocalVariableTablethis3Lsrc/plugins/regionEditorPlugin/RegionEditorPlugin;main([Ljava/lang/String;)Vjava/lang/SystemoutLjava/io/PrintStream;       6This is the main method of a dummy RegionEditor pluginjava/io/PrintStreamprintln(Ljava/lang/String;)V
args[Ljava/lang/String;
SourceFileRegionEditorPlugin.java!/*·      ±

   7     ²¶±

    !PK
d¸å.'õSITT6src/plugins/regionEditorPlugin/RegionEditorPlugin.java/*
* software practice
* ss_2003
* group project: XML-Editor
* $Id:  $
*/

package src.plugins.regionEditorPlugin;


/**
 * dummy plugin used for testing
 */
public class RegionEditorPlugin {
        
        public static void main(String[] args) {
                System.out.println("This is the main method of a dummy RegionEditor plugin");
        }

}PK
ò<ç. 1>þþAsrc/plugins/regionEditorPlugin/RegionEditorPluginManifestAdditionXMLEditor-Plugin-Name: RegionEditor
Comment: you can set named regions on pictures
Description: ...(todo)
Main-Class: src.plugins.regionEditorPlugin.RegionEditorPlugin
Class-Path: ImagePlugin.jar
Transform-To-File: src/plugins/regionEditorPlugin/RegionEditorPluginTransform.xsl
Transform-Fro-File: src/plugins/regionEditorPlugin/RegionEditorPluginTransformBack.xsl 

Name: src/plugins/regionEditorPlugin
Specification-Title: plugin for XMLEditor
Specification-Version: 0.4 (05/07/03)
Specification-Vendor: group5, software practice SS_2003, University Bielefeld, Germany
Implementation-Title: src.plugins.regionEditorPlugin
Implementation-Version: 0.1 (05/07/03)
Implementation-Vendor: group5, software practice SS_2003, University Bielefeld, Germany
PK
Ê–å.IAECC>src/plugins/regionEditorPlugin/RegionEditorPluginTransform.xsl<!-- status: first working for regioneditor -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" />

<!-- these parameters can be given from outside -->
<xsl:param name="input">/</xsl:param><!-- eg. /XMLEDITORCONFIGURATION/DEFAULTPLUGIN -->
<xsl:param name="elementnamenew">standardplugin</xsl:param>

<xsl:template match="/">
        <xsl:variable name="levelremaining" select="substring-after($input, '/')" />

        <xsl:message><xsl:value-of select="concat('outside-parameter input: ', $input)"/></xsl:message>
        <xsl:message><xsl:value-of select="concat('outside-parameter elementnamenew: ', $elementnamenew)"/></xsl:message>

        <xsl:for-each select="node()">
                <xsl:call-template name="selecter">
                        <xsl:with-param name="levelremaining" select="$levelremaining" />
                </xsl:call-template>
        </xsl:for-each>
</xsl:template>

<xsl:template name="selecter">
        <xsl:param name="levelremaining" />
        <xsl:variable name="level" select="substring-before( concat($levelremaining, '/'), '/')" />
        <xsl:variable name="nextlevels" select="substring-after($levelremaining, '/')" />
        
        <!-- if this node belongs to the right path
             then work on childs with the selecter -->
        <xsl:if test = "(name() = $level)">
                <xsl:message>selecter-case: belongs to right path</xsl:message>
                <xsl:element name="name()">
                
                        <!-- if this is the last level this is the node which must be converted
                             then convert the node -->
                        <xsl:if test = "( ('' = $nextlevels) 
                                      and not('' = name()) )"><!-- avoid too many tags from matcher -->
                                <xsl:message>selecter-case: last level</xsl:message>
                                <xsl:apply-templates select="self::node()">
                                </xsl:apply-templates>
                        </xsl:if>
                        <!-- else (if there are levels left) work on childs -->
                        <xsl:if test = "not('' = $nextlevels)">
                                <xsl:message>selecter-case: levels left</xsl:message>
                                <xsl:copy>
                                        <xsl:for-each select="attribute::*">
                                                <xsl:attribute name="{name(.)}">
                                                        <xsl:value-of select="self::node()" />
                                                </xsl:attribute>
                                        </xsl:for-each>
                                        <xsl:for-each select="node()">
                                                <xsl:call-template name="selecter">
                                                        <xsl:with-param name="levelremaining" select="$nextlevels" />
                                                </xsl:call-template>
                                        </xsl:for-each>
                                </xsl:copy>
                        </xsl:if>
                </xsl:element>
        </xsl:if>
        <!-- else simply copy the node with childs -->
        <xsl:if test = "not(name() = $level)">
                <xsl:message>selecter-case: must only be copied and never touched in future</xsl:message>
                <xsl:copy-of select="self::node()" />
        </xsl:if>
</xsl:template>

<xsl:template match="Regionensatz"><!-- element-plugin association -->
        <xsl:element name="REGIONSET">

                <!-- work on attributes -->
                <xsl:attribute name="image">
                        <xsl:value-of select="@Bild" />
                </xsl:attribute>
                <xsl:for-each select="attribute::*">
                        <xsl:if test = "not(name(.) = ('Bild'))">
                                <xsl:attribute name="{name(.)}">
                                        <xsl:value-of select="self::node()" />
                                </xsl:attribute>
                        </xsl:if>
                </xsl:for-each>

                <!-- work on childs -->
                <xsl:for-each select="Bereich">
                        <xsl:element name="RECT">
                                <xsl:attribute name="x">
                                        <xsl:value-of select="@x" />
                                </xsl:attribute>
                                <xsl:attribute name="y">
                                        <xsl:value-of select="@y" />
                                </xsl:attribute>
                                <xsl:attribute name="b">
                                        <xsl:value-of select="@Breite" />
                                </xsl:attribute>
                                <xsl:attribute name="h">
                                        <xsl:value-of select="@Hoehe" />
                                </xsl:attribute>
                                <xsl:for-each select="attribute::*">
                                        <xsl:if test = "not(name(.) = 'x')">
                                        <xsl:if test = "not(name(.) = 'y')">
                                        <xsl:if test = "not(name(.) = 'Breite')">
                                        <xsl:if test = "not(name(.) = 'Hoehe')">
                                                <xsl:attribute name="{name(.)}">
                                                        <xsl:value-of select="self::node()" />
                                                </xsl:attribute>
                                        </xsl:if></xsl:if></xsl:if></xsl:if>
                                </xsl:for-each>
                                <xsl:for-each select="node()">
                                        <xsl:copy-of select="self::node()" />
                                </xsl:for-each>
                        </xsl:element>
                </xsl:for-each>
                <xsl:for-each select="node()">
                        <xsl:if test = "not(name(.) = 'Bereich')">
                                <xsl:copy-of select="self::node()" />
                        </xsl:if>
                </xsl:for-each>

        </xsl:element>
</xsl:template>

<xsl:template match="REGIONSET"><!-- element-plugin association -->
        <xsl:copy-of select="." />
</xsl:template>

</xsl:stylesheet>PK
È<ç.v,xY44Bsrc/plugins/regionEditorPlugin/RegionEditorPluginTransformBack.xsl<!-- status: first try for regioneditor -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes" />

<!-- these parameters can be given from outside -->
<xsl:param name="input">/</xsl:param><!-- eg. /XMLEDITORCONFIGURATION/DEFAULTPLUGIN -->
<xsl:param name="elementnamenew">standardplugin</xsl:param>

<xsl:template match="/">
        <xsl:variable name="levelremaining" select="substring-after($input, '/')" />

        <xsl:message><xsl:value-of select="concat('outside-parameter input: ', $input)"/></xsl:message>
        <xsl:message><xsl:value-of select="concat('outside-parameter elementnamenew: ', $elementnamenew)"/></xsl:message>

        <xsl:for-each select="node()">
                <xsl:call-template name="selecter">
                        <xsl:with-param name="levelremaining" select="$levelremaining" />
                </xsl:call-template>
        </xsl:for-each>
</xsl:template>

<xsl:template name="selecter">
        <xsl:param name="levelremaining" />
        <xsl:variable name="level" select="substring-before( concat($levelremaining, '/'), '/')" />
        <xsl:variable name="nextlevels" select="substring-after($levelremaining, '/')" />
        
        <!-- if this node belongs to the right path
             then work on childs with the selecter -->
        <xsl:if test = "(name() = $level)">
                <xsl:message>selecter-case: belongs to right path</xsl:message>
                <xsl:element name="name()">
                
                        <!-- if this is the last level this is the node which must be converted
                             then convert the node -->
                        <xsl:if test = "( ('' = $nextlevels) 
                                      and not('' = name()) )"><!-- avoid too many tags from matcher -->
                                <xsl:message>selecter-case: last level</xsl:message>
                                <xsl:apply-templates select="self::node()">
                                </xsl:apply-templates>
                        </xsl:if>
                        <!-- else (if there are levels left) work on childs -->
                        <xsl:if test = "not('' = $nextlevels)">
                                <xsl:message>selecter-case: levels left</xsl:message>
                                <xsl:copy>
                                        <xsl:for-each select="attribute::*">
                                                <xsl:attribute name="{name(.)}">
                                                        <xsl:value-of select="self::node()" />
                                                </xsl:attribute>
                                        </xsl:for-each>
                                        <xsl:for-each select="node()">
                                                <xsl:call-template name="selecter">
                                                        <xsl:with-param name="levelremaining" select="$nextlevels" />
                                                </xsl:call-template>
                                        </xsl:for-each>
                                </xsl:copy>
                        </xsl:if>
                </xsl:element>
        </xsl:if>
        <!-- else simply copy the node with childs -->
        <xsl:if test = "not(name() = $level)">
                <xsl:message>selecter-case: must only be copied and never touched in future</xsl:message>
                <xsl:copy-of select="self::node()" />
        </xsl:if>
</xsl:template>

<xsl:template match="REGIONSET"><!-- element-plugin association -->
        <xsl:element name="Regionensatz">

                <!-- work on attributes -->
                <xsl:attribute name="Bild">
                        <xsl:value-of select="@image" />
                </xsl:attribute>
                <xsl:for-each select="attribute::*">
                        <xsl:if test = "not(name(.) = ('image'))">
                                <xsl:attribute name="{name(.)}">
                                        <xsl:value-of select="self::node()" />
                                </xsl:attribute>
                        </xsl:if>
                </xsl:for-each>

                <!-- work on childs -->
                <xsl:for-each select="RECT">
                        <xsl:element name="Bereich">
                                <xsl:attribute name="x">
                                        <xsl:value-of select="@x" />
                                </xsl:attribute>
                                <xsl:attribute name="y">
                                        <xsl:value-of select="@y" />
                                </xsl:attribute>
                                <xsl:attribute name="Breite">
                                        <xsl:value-of select="@b" />
                                </xsl:attribute>
                                <xsl:attribute name="Hoehe">
                                        <xsl:value-of select="@h" />
                                </xsl:attribute>
                                <xsl:for-each select="attribute::*">
                                        <xsl:if test = "not(name(.) = 'x')">
                                        <xsl:if test = "not(name(.) = 'y')">
                                        <xsl:if test = "not(name(.) = 'b')">
                                        <xsl:if test = "not(name(.) = 'h')">
                                                <xsl:attribute name="{name(.)}">
                                                        <xsl:value-of select="self::node()" />
                                                </xsl:attribute>
                                        </xsl:if></xsl:if></xsl:if></xsl:if>
                                </xsl:for-each>
                                <xsl:for-each select="node()">
                                        <xsl:copy-of select="self::node()" />
                                </xsl:for-each>
                        </xsl:element>
                </xsl:for-each>
                <xsl:for-each select="node()">
                        <xsl:if test = "not(name(.) = 'RECT')">
                                <xsl:copy-of select="self::node()" />
                        </xsl:if>
                </xsl:for-each>

        </xsl:element>
</xsl:template>

<xsl:template match="REGIONSET"><!-- element-plugin association -->
        <xsl:copy-of select="." />
</xsl:template>

</xsl:stylesheet>PK

ý<ç. META-INF/þÊPK

ý<ç.µ ʾNN+META-INF/MANIFEST.MFPK

G¿æ.n,@¯––7«src/plugins/regionEditorPlugin/RegionEditorPlugin.classPK

d¸å.'õSITT6–src/plugins/regionEditorPlugin/RegionEditorPlugin.javaPK

ò<ç. 1>þþA>src/plugins/regionEditorPlugin/RegionEditorPluginManifestAdditionPK

Ê–å.IAECC>›src/plugins/regionEditorPlugin/RegionEditorPluginTransform.xslPK

È<ç.v,xY44B:src/plugins/regionEditorPlugin/RegionEditorPluginTransformBack.xslPK‘Î.