diff -r -u -N -X cvsignore prevdia/plug-ins/Makefile.am dia/plug-ins/Makefile.am
--- prevdia/plug-ins/Makefile.am	Tue May 14 00:15:06 2002
+++ dia/plug-ins/Makefile.am	Mon Jun  3 20:17:48 2002
@@ -1,4 +1,4 @@
 # Remember to also add subdirs in configure.in
-SUBDIRS = cgm pstricks hpgl wpg svg shape dxf python xfig wmf metapost
+SUBDIRS = cgm pstricks hpgl wpg svg shape dxf python xfig wmf metapost xslt
 
 EXTRA_DIST = renderer.inc
diff -r -u -N -X cvsignore prevdia/plug-ins/xslt/Makefile.am dia/plug-ins/xslt/Makefile.am
--- prevdia/plug-ins/xslt/Makefile.am	Thu Jan  1 01:00:00 1970
+++ dia/plug-ins/xslt/Makefile.am	Mon Jun  3 20:08:56 2002
@@ -0,0 +1,13 @@
+## Process this file with automake to produce Makefile.in
+
+pkglib_LTLIBRARIES = libxslt_filter.la
+
+libxslt_filter_la_SOURCES = \
+	xslt.c \
+	xsltdialog.c
+
+libxslt_filter_la_LDFLAGS = -export-dynamic -module -avoid-version -ldl
+
+#libxslt_filter_la_EXTRA_DIST = uml-dia.xsl uml-dia2c++.xsl uml-dia2java.xsl uml-dia2idl.xsl
+
+INCLUDES = -I$(top_srcdir)/intl -I$(srcdir)/../../lib $(GTK_CFLAGS) $(GNOME_CFLAGS) $(FREETYPE_CFLAGS) $(XML_CFLAGS) $(UNICODE_CFLAGS) $(DEBUG_FLAGS) $(XSLT_CFLAGS)
diff -r -u -N -X cvsignore prevdia/plug-ins/xslt/dia-uml.xsl dia/plug-ins/xslt/dia-uml.xsl
--- prevdia/plug-ins/xslt/dia-uml.xsl	Thu Jan  1 01:00:00 1970
+++ dia/plug-ins/xslt/dia-uml.xsl	Thu May 16 20:02:13 2002
@@ -0,0 +1,184 @@
+<?xml version="1.0"?>
+<!-- 
+     Transform dia UML objects to a convenient structure
+     
+     Matthieu Sozeau <mattam@netcourrier.com>
+     
+
+     -->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:dia="http://www.lysator.liu.se/~alla/dia/"
+  version="1.0">
+  <xsl:output method="xml" indent="yes"/>
+
+  <xsl:template match="/">
+    <xsl:element name="dia-uml">
+      <xsl:choose>
+        <xsl:when test="*/*/*/dia:object[@type='UML - LargePackage']">
+          <xsl:apply-templates select="*/*/*/dia:object[@type='UML - LargePackage']"/>      
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:apply-templates/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:element>
+  </xsl:template>
+
+  <xsl:template match="dia:object[@type='UML - LargePackage']">
+    <xsl:element name="package">
+      <xsl:element name="name">
+
+        <xsl:value-of select="substring-before(substring-after(dia:attribute[@name='name']/dia:string, '#'), '#')"/>
+      </xsl:element>
+      <xsl:apply-templates select="../dia:object[@type='UML - Class']"/>      
+    </xsl:element>
+  </xsl:template>
+
+  <xsl:template match="dia:object[@type='UML - Class']">
+    <xsl:element name="class">
+      <xsl:attribute name="name">
+        <xsl:value-of select="substring-before(substring-after(dia:attribute[@name='name']/dia:string, '#'), '#')"/>            
+      </xsl:attribute>
+      <xsl:if test="dia:attribute[@name='stereotype']">
+        <xsl:attribute name="stereotype">
+          <xsl:value-of select="substring-before(substring-after(dia:attribute[@name='stereotype']/dia:string, '#'), '#')"/>                
+        </xsl:attribute>
+      </xsl:if>
+      <xsl:if test="dia:attribute[@name='abstract']/dia:boolean/@val='true'">
+        <xsl:attribute name="abstract">1</xsl:attribute>
+      </xsl:if>
+      <xsl:element name="attributes">
+        <xsl:apply-templates select="dia:attribute[@name='attributes']"/>
+      </xsl:element>
+      <xsl:element name="operations">
+        <xsl:apply-templates select="dia:attribute[@name='operations']"/>
+      </xsl:element>
+    </xsl:element>    
+  </xsl:template>
+
+
+  <xsl:template match="dia:composite[@type='umlattribute']">
+    <xsl:element name="attribute">
+      <xsl:if test="dia:attribute[@name='class_scope']/dia:boolean/@val='true'">
+        <xsl:attribute name="class_scope">1</xsl:attribute>
+      </xsl:if>
+      <xsl:choose>
+        <xsl:when test="dia:attribute[@name='visibility']/dia:enum/@val=1">
+          <xsl:attribute name="visibility">private</xsl:attribute>
+        </xsl:when>
+        <xsl:when test="dia:attribute[@name='visibility']/dia:enum/@val=2">
+          <xsl:attribute name="visibility">protected</xsl:attribute>
+        </xsl:when>
+        <xsl:when test="dia:attribute[@name='visibility']/dia:enum/@val=0">
+          <xsl:attribute name="visibility">public</xsl:attribute>
+        </xsl:when>
+      </xsl:choose>
+
+      <xsl:element name="type">
+        <xsl:value-of select="substring-before(substring-after(dia:attribute[@name='type']/dia:string, '#'), '#')"/>
+      </xsl:element>
+
+      <xsl:element name="name">
+        <xsl:value-of select="substring-before(substring-after(dia:attribute[@name='name']/dia:string, '#'), '#')"/>
+      </xsl:element>
+
+      <xsl:if test="not(dia:attribute[@name='value']/dia:string='')">
+        <xsl:element name="value">
+          <xsl:value-of select="substring-before(substring-after(dia:attribute[@name='value']/dia:string, '#'), '#')"/>
+        </xsl:element>
+      </xsl:if>
+    </xsl:element>
+  </xsl:template>
+  
+  
+  <xsl:template match="dia:composite[@type='umloperation']">
+    <xsl:element name="operation">
+      <xsl:choose>
+        <xsl:when test="dia:attribute[@name='inheritance_type']/dia:enum/@val=2">
+          <xsl:attribute name="inheritance">leaf</xsl:attribute>
+        </xsl:when>
+        <xsl:when test="dia:attribute[@name='inheritance_type']/dia:enum/@val=1">
+          <xsl:attribute name="inheritance">polymorphic</xsl:attribute>
+        </xsl:when>
+        <xsl:when test="dia:attribute[@name='inheritance_type']/dia:enum/@val=0">
+          <xsl:attribute name="inheritance">abstract</xsl:attribute>
+        </xsl:when>
+      </xsl:choose>
+      <xsl:choose>
+        <xsl:when test="dia:attribute[@name='visibility']/dia:enum/@val=1">
+          <xsl:attribute name="visibility">private</xsl:attribute>
+        </xsl:when>
+        <xsl:when test="dia:attribute[@name='visibility']/dia:enum/@val=2">
+          <xsl:attribute name="visibility">protected</xsl:attribute>
+        </xsl:when>
+        <xsl:when test="dia:attribute[@name='visibility']/dia:enum/@val=0">
+          <xsl:attribute name="visibility">public</xsl:attribute>
+        </xsl:when>
+      </xsl:choose>
+      
+      <xsl:if test="dia:attribute[@name='class_scope']/dia:boolean/@val='true'">
+        <xsl:attribute name="class_scope">1</xsl:attribute>
+      </xsl:if>
+
+      <xsl:choose>
+        <xsl:when test="dia:attribute[@name='query']/dia:boolean/@val='true'">
+          <xsl:attribute name="query">1</xsl:attribute>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:attribute name="query">0</xsl:attribute>
+        </xsl:otherwise>
+      </xsl:choose>
+      
+      <xsl:if test="not(dia:attribute[@name='type']/dia:string='')">
+        <xsl:element name="type">
+          <xsl:value-of select="substring-before(substring-after(dia:attribute[@name='type']/dia:string, '#'), '#')"/>
+        </xsl:element>
+      </xsl:if>    
+      
+      <xsl:element name="name">
+        <xsl:value-of select="substring-before(substring-after(dia:attribute[@name='name']/dia:string, '#'), '#')"/>
+      </xsl:element>
+      
+      <xsl:element name="parameters">
+        <xsl:for-each select="dia:attribute[@name='parameters']/dia:composite[@type='umlparameter']">
+          <xsl:element name="parameter">
+            <xsl:choose>
+              <xsl:when test="dia:attribute[@name='kind']/dia:enum/@val=1">
+                <xsl:attribute name="kind">in</xsl:attribute>
+              </xsl:when>
+              <xsl:when test="dia:attribute[@name='kind']/dia:enum/@val=2">
+                <xsl:attribute name="kind">out</xsl:attribute>
+              </xsl:when>
+              <xsl:when test="dia:attribute[@name='kind']/dia:enum/@val=3">
+                <xsl:attribute name="kind">inout</xsl:attribute>
+              </xsl:when>
+            </xsl:choose>
+            
+            <xsl:element name="type">
+              <xsl:value-of select="substring-before(substring-after(dia:attribute[@name='type']/dia:string, '#'), '#')"/>
+            </xsl:element>
+            
+            <xsl:element name="name">
+              <xsl:value-of select="substring-before(substring-after(dia:attribute[@name='name']/dia:string, '#'), '#')"/>
+            </xsl:element>
+            
+            <xsl:if test="not(dia:attribute[@name='value']/dia:string='')">
+              <xsl:element name="value">
+                <xsl:value-of select="substring-before(substring-after(dia:attribute[@name='value']/dia:string, '#'), '#')"/>
+              </xsl:element>              
+            </xsl:if>
+
+          </xsl:element>
+        </xsl:for-each>      
+      </xsl:element>
+    </xsl:element>
+  </xsl:template>
+
+  
+  <xsl:template match="text()"></xsl:template>
+
+  <xsl:template match="node()|@*">
+    <xsl:apply-templates match="node()|@*"/>  
+  </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
diff -r -u -N -X cvsignore prevdia/plug-ins/xslt/dia-uml2c++.xsl dia/plug-ins/xslt/dia-uml2c++.xsl
--- prevdia/plug-ins/xslt/dia-uml2c++.xsl	Thu Jan  1 01:00:00 1970
+++ dia/plug-ins/xslt/dia-uml2c++.xsl	Thu May 16 20:02:13 2002
@@ -0,0 +1,137 @@
+<?xml version="1.0"?>
+<!-- 
+     Transform dia UML objects to C++ classes 
+     
+     Matthieu Sozeau <mattam@netcourrier.com>
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">
+
+  <xsl:output method="text"/>
+
+  <xsl:param name="ident">
+    <xsl:text>    </xsl:text>
+  </xsl:param>
+  
+  <!-- Visibility indentation -->
+  <xsl:param name="visident">
+    <xsl:text>  </xsl:text>
+  </xsl:param>
+
+  <xsl:template match="class">
+    <xsl:text>class </xsl:text>
+    <xsl:value-of select="@name"/>
+    <xsl:if test="@stereotype">
+      <xsl:text> : public </xsl:text>
+      <xsl:value-of select="@stereotype"/>      
+    </xsl:if>
+    <xsl:text> {&#xa;&#xa;</xsl:text>
+    <xsl:apply-templates select="attributes"/>
+    <xsl:text>&#xa;</xsl:text>
+    <xsl:apply-templates select="operations"/>
+    <xsl:text>&#xa;};&#xa;</xsl:text>
+  </xsl:template>
+  
+  <xsl:template match="operations|attributes">
+    <xsl:if test="*[@visibility='private']">
+      <xsl:value-of select="$visident"/>
+      <xsl:text>private:&#xa;</xsl:text>
+      <xsl:apply-templates select="*[@visibility='private']"/>
+      <xsl:text>&#xa;</xsl:text>
+    </xsl:if>
+    <xsl:if test="*[@visibility='protected']">
+      <xsl:value-of select="$visident"/>
+      <xsl:text>protected:&#xa;</xsl:text>
+      <xsl:apply-templates select="*[@visibility='protected']"/>
+      <xsl:text>&#xa;</xsl:text>
+    </xsl:if>
+    <xsl:if test="*[@visibility='public']">
+      <xsl:value-of select="$visident"/>
+      <xsl:text>public:&#xa;</xsl:text>
+      <xsl:apply-templates select="*[@visibility='public']"/>
+      <xsl:text>&#xa;</xsl:text>
+    </xsl:if>
+    <xsl:if test="*[not(@visibility)]">
+      <xsl:apply-templates select="*[not(@visibility)]"/>
+      <xsl:text>&#xa;</xsl:text>
+    </xsl:if>
+  </xsl:template>
+
+
+  <xsl:template match="attribute">
+    <xsl:value-of select="$ident"/>
+    <xsl:if test="@class_scope">
+      <xsl:text>static </xsl:text>
+    </xsl:if>
+    <xsl:value-of select="type"/>
+    <xsl:text> </xsl:text>
+    <xsl:value-of select="name"/>
+    <xsl:text>;&#xa;</xsl:text>
+  </xsl:template>
+
+  <xsl:template match="operation">
+    <xsl:value-of select="$ident"/>
+    <xsl:choose>
+      <xsl:when test="@inheritance='polymorphic'">
+        <xsl:text>virtual </xsl:text>
+      </xsl:when>
+      <xsl:when test="@inheritance='abstract'">
+        <xsl:text>virtual </xsl:text>
+      </xsl:when>      
+    </xsl:choose>
+    
+    <xsl:if test="@class_scope">
+      <xsl:text>static </xsl:text>
+    </xsl:if>
+    
+    <!-- Constructor has no type -->
+    <xsl:if test="type">
+      <xsl:value-of select="type"/>
+      <xsl:text> </xsl:text>      
+    </xsl:if>
+    
+    <xsl:value-of select="name"/>
+    <xsl:text>(</xsl:text>
+    <xsl:for-each select="parameters/*">
+      <xsl:choose>
+        <xsl:when test="@kind='in'">
+          <xsl:text>const </xsl:text>
+        </xsl:when>
+      </xsl:choose>
+
+      <xsl:value-of select="type"/>
+      <xsl:if test="@kind">
+        <xsl:text>&amp;</xsl:text>
+      </xsl:if>
+      
+      <xsl:text> </xsl:text>
+      <xsl:value-of select="name"/>
+      <xsl:if test="value">
+        <xsl:text> = </xsl:text>
+        <xsl:value-of select="value"/>
+      </xsl:if>
+      <xsl:if test="not(position()=last())">
+        <xsl:text>, </xsl:text>        
+      </xsl:if>
+    </xsl:for-each>
+
+    <xsl:text>)</xsl:text>
+    <xsl:if test="@inheritance='abstract'">
+      <xsl:text> = 0</xsl:text>
+    </xsl:if>
+    <xsl:if test="@query=1">
+      <xsl:text> const</xsl:text>
+    </xsl:if>
+    <xsl:text>;&#xa;</xsl:text>
+  </xsl:template>
+
+
+  <xsl:template match="text()">    
+  </xsl:template>
+
+  <xsl:template match="node()|@*">
+    <xsl:apply-templates match="node()|@*"/>  
+  </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
diff -r -u -N -X cvsignore prevdia/plug-ins/xslt/dia-uml2idl.xsl dia/plug-ins/xslt/dia-uml2idl.xsl
--- prevdia/plug-ins/xslt/dia-uml2idl.xsl	Thu Jan  1 01:00:00 1970
+++ dia/plug-ins/xslt/dia-uml2idl.xsl	Fri May 17 15:28:00 2002
@@ -0,0 +1,129 @@
+<?xml version="1.0"?>
+<!-- 
+     Transform dia UML objects to IDL interfaces
+     
+     Matthieu Sozeau <mattam@netcourrier.com>
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">
+
+  <xsl:output method="text"/>
+
+  <xsl:param name="ident">
+    <xsl:text>    </xsl:text>
+  </xsl:param>
+
+  <!-- Interface indentation -->
+  <xsl:param name="interident">
+    <xsl:text>  </xsl:text>
+  </xsl:param>
+
+  <xsl:param name="warn">true</xsl:param>
+
+  <!-- Default type -->
+  <xsl:param name="type" select="'void'"/>
+  
+  <!-- Default kind of argument passing -->
+  <xsl:param name="kind" select="'inout'"/>
+
+  <xsl:template match="package">
+    <xsl:text>module </xsl:text>
+    <xsl:value-of select="name"/>
+    <xsl:text> {&#xa;</xsl:text>
+    <xsl:apply-templates/>
+    <xsl:text>&#xa;};&#xa;</xsl:text>
+  </xsl:template>
+
+  
+  <xsl:template match="class">
+    <xsl:text>&#xa;</xsl:text>
+    <xsl:value-of select="$interident"/>
+    <xsl:text>interface </xsl:text>
+    <xsl:value-of select="@name"/>
+    <xsl:if test="not(@stereotype='')">
+      <xsl:text> : </xsl:text>
+      <xsl:value-of select="@stereotype"/>      
+    </xsl:if>
+    <xsl:text> {&#xa;&#xa;</xsl:text>
+    <xsl:apply-templates select="attributes"/>
+    <xsl:text>&#xa;</xsl:text>
+    <xsl:apply-templates select="operations"/>
+    <xsl:text>&#xa;</xsl:text>
+    <xsl:value-of select="$interident"/>
+    <xsl:text>};&#xa;</xsl:text>
+  </xsl:template>
+  
+  <xsl:template match="operations|attributes">
+    <xsl:if test="*[@visibility='private']">
+      <xsl:apply-templates select="*[@visibility='private']"/>
+    </xsl:if>
+    <xsl:if test="*[@visibility='protected']">
+      <xsl:apply-templates select="*[@visibility='protected']"/>
+    </xsl:if>
+    <xsl:if test="*[@visibility='public']">
+      <xsl:apply-templates select="*[@visibility='public']"/>
+    </xsl:if>
+    <xsl:if test="*[not(@visibility)]">
+      <xsl:apply-templates select="*[not(@visibility)]"/>
+    </xsl:if>
+  </xsl:template>
+
+
+  <xsl:template match="attribute">
+    <xsl:value-of select="$ident"/>
+
+    <xsl:value-of select="type"/>
+    <xsl:text> </xsl:text>
+    <xsl:value-of select="name"/>
+    <xsl:if test="value">
+      <xsl:text> = </xsl:text>
+      <xsl:value-of select="value"/>
+    </xsl:if>
+    <xsl:text>;&#xa;</xsl:text>
+  </xsl:template>
+
+  <xsl:template match="operation">
+    <xsl:value-of select="$ident"/>
+
+    <xsl:if test="type=''">
+      <xsl:if test="$warn='true'">
+        <xsl:message>// Defaulting type to <xsl:value-of select="$type"/> for <xsl:value-of select="name"/>().</xsl:message>
+      </xsl:if>
+      <xsl:value-of select="$type"/>
+    </xsl:if>
+    
+    <xsl:value-of select="type"/>      
+    <xsl:text> </xsl:text>  
+
+    <xsl:value-of select="name"/>
+
+    <xsl:text>(</xsl:text>
+    <xsl:for-each select="parameters/*">
+      <xsl:if test="not(@kind)">
+        <xsl:if test="$warn='true'">
+          <xsl:message>// Defaulting argument passing kind to <xsl:value-of select="$kind"/> for <xsl:value-of select="name"/>.</xsl:message>    
+        </xsl:if>
+        <xsl:value-of select="$kind"/>
+      </xsl:if>
+      <xsl:value-of select="@kind"/>
+      <xsl:text> </xsl:text>
+      <xsl:value-of select="type"/>
+      <xsl:text> </xsl:text>
+      <xsl:value-of select="name"/>
+      <xsl:if test="not(position()=last())">
+        <xsl:text>, </xsl:text>        
+      </xsl:if>
+    </xsl:for-each>
+    <xsl:text>);&#xa;&#xa;</xsl:text>
+  </xsl:template>
+
+
+  <xsl:template match="text()">    
+  </xsl:template>
+
+  <xsl:template match="node()|@*">
+    <xsl:apply-templates match="node()|@*"/>  
+  </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
diff -r -u -N -X cvsignore prevdia/plug-ins/xslt/dia-uml2java.xsl dia/plug-ins/xslt/dia-uml2java.xsl
--- prevdia/plug-ins/xslt/dia-uml2java.xsl	Thu Jan  1 01:00:00 1970
+++ dia/plug-ins/xslt/dia-uml2java.xsl	Thu May 16 20:02:13 2002
@@ -0,0 +1,156 @@
+<?xml version="1.0"?>
+<!-- 
+     Transform dia UML objects to Java classes 
+     
+     Matthieu Sozeau <mattam@netcourrier.com>
+-->
+
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  version="1.0">
+
+  <xsl:output method="text"/>
+
+  <xsl:param name="ident">
+    <xsl:text>    </xsl:text>
+  </xsl:param>
+
+  <!-- Default visibility of attrs and ops -->
+  <xsl:param name="visibility" select="'private'"/>
+    
+  <xsl:template match="package">
+    <xsl:text>package </xsl:text>
+    <xsl:value-of select="name"/>
+    <xsl:text>;&#xa;</xsl:text>
+        
+    <xsl:apply-templates/>
+  </xsl:template>
+
+  
+  <xsl:template match="class">
+    <xsl:text>&#xa;</xsl:text>
+    <xsl:if test="@abstract">
+      <xsl:text>abstract </xsl:text>
+    </xsl:if>
+    <xsl:text>class </xsl:text>
+    <xsl:value-of select="@name"/>
+    <xsl:if test="@stereotype">
+      <xsl:text> : implements </xsl:text>
+      <xsl:value-of select="@stereotype"/>      
+    </xsl:if>
+    <xsl:text> {&#xa;&#xa;</xsl:text>
+    <xsl:apply-templates select="attributes"/>
+    <xsl:text>&#xa;</xsl:text>
+    <xsl:apply-templates select="operations"/>
+    <xsl:text>&#xa;};&#xa;</xsl:text>
+  </xsl:template>
+  
+  <xsl:template match="operations|attributes">
+    <xsl:if test="*[@visibility='private']">
+      <xsl:apply-templates select="*[@visibility='private']"/>
+    </xsl:if>
+    <xsl:if test="*[@visibility='protected']">
+      <xsl:apply-templates select="*[@visibility='protected']"/>
+    </xsl:if>
+    <xsl:if test="*[@visibility='public']">
+      <xsl:apply-templates select="*[@visibility='public']"/>
+    </xsl:if>
+    <xsl:if test="*[not(@visibility)]">
+      <xsl:apply-templates select="*[not(@visibility)]"/>
+    </xsl:if>
+  </xsl:template>
+
+
+  <xsl:template match="attribute">
+    <xsl:value-of select="$ident"/>
+    <xsl:if test="not(@visibility)">
+      <xsl:if test="$visibility=''">
+        <xsl:message terminate="yes">
+          You must set a valid visibility attribute for attribute <xsl:value-of select="name"/>
+        </xsl:message>
+      </xsl:if>
+      <xsl:value-of select="$visibility"/>
+    </xsl:if>
+    <xsl:value-of select="@visibility"/>
+    <xsl:text> </xsl:text>
+    <xsl:if test="@class_scope">
+      <xsl:text>static </xsl:text>
+    </xsl:if>
+    <xsl:value-of select="type"/>
+    <xsl:text> </xsl:text>
+    <xsl:value-of select="name"/>
+    <xsl:if test="value">
+      <xsl:text> = </xsl:text>
+      <xsl:value-of select="value"/>
+    </xsl:if>
+    <xsl:text>;&#xa;</xsl:text>
+  </xsl:template>
+
+  <xsl:template match="operation">
+    <xsl:value-of select="$ident"/>
+    <xsl:if test="not(@visibility)">
+      <xsl:if test="$visibility=''">
+        <xsl:message terminate="yes">
+          You must set a valid visibility attribute for method <xsl:value-of select="name"/>
+        </xsl:message>
+      </xsl:if>
+      <xsl:value-of select="$visibility"/>
+    </xsl:if>
+
+    <xsl:value-of select="@visibility"/>
+    <xsl:text> </xsl:text>
+
+    <xsl:choose>
+      <xsl:when test="@inheritance='leaf'">
+        <xsl:text>final </xsl:text>
+      </xsl:when>
+      <xsl:when test="@inheritance='abstract'">
+        <xsl:text>abstract </xsl:text>
+      </xsl:when>      
+    </xsl:choose>
+    
+    <xsl:if test="@class_scope">
+      <xsl:text>static </xsl:text>
+    </xsl:if>
+    
+    <!-- Constructor has no type -->
+    <xsl:if test="type">
+      <xsl:value-of select="type"/>      
+      <xsl:text> </xsl:text>
+    </xsl:if>
+
+    <xsl:value-of select="name"/>
+
+    <xsl:text>(</xsl:text>
+    <xsl:for-each select="parameters/*">
+      <xsl:choose>
+        <xsl:when test="@kind='in'">
+          <xsl:text>const </xsl:text>
+        </xsl:when>
+      </xsl:choose>
+
+      <xsl:value-of select="type"/>
+      
+      <xsl:text> </xsl:text>
+      <xsl:value-of select="name"/>
+      <xsl:if test="not(position()=last())">
+        <xsl:text>, </xsl:text>        
+      </xsl:if>
+    </xsl:for-each>
+
+    <xsl:text>)</xsl:text>
+    <xsl:text> {&#xa;</xsl:text>
+    <xsl:value-of select="$ident"/>
+    <xsl:text>&#xa;</xsl:text>
+    <xsl:value-of select="$ident"/>
+    <xsl:text>}&#xa;&#xa;</xsl:text>
+  </xsl:template>
+
+
+  <xsl:template match="text()">    
+  </xsl:template>
+
+  <xsl:template match="node()|@*">
+    <xsl:apply-templates match="node()|@*"/>  
+  </xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
Binary files prevdia/plug-ins/xslt/dia-xslt.tar.gz and dia/plug-ins/xslt/dia-xslt.tar.gz differ
diff -r -u -N -X cvsignore prevdia/plug-ins/xslt/xslt.c dia/plug-ins/xslt/xslt.c
--- prevdia/plug-ins/xslt/xslt.c	Thu Jan  1 01:00:00 1970
+++ dia/plug-ins/xslt/xslt.c	Mon Jun  3 20:07:11 2002
@@ -0,0 +1,196 @@
+/*
+ * File: plug-ins/xslt/xslt.c
+ * 
+ * Made by Matthieu Sozeau <mattam@netcourrier.com>
+ * 
+ * Started on  Thu May 16 23:21:43 2002 Matthieu Sozeau
+ * Last update Mon Jun  3 20:07:11 2002 Matthieu Sozeau
+ * 
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#include <config.h>
+#include <stdio.h>
+#include "filter.h"
+#include "plug-ins.h"
+#include "intl.h"
+#include "message.h"
+#include "dia_dirs.h"
+#include <libxslt/xslt.h>
+#include <libxslt/xsltInternals.h>
+#include <libxslt/transform.h>
+#include <libxslt/xsltutils.h>
+
+#include "xslt.h"
+
+void xslt_ok(void);
+
+static char *diafilename;
+static char *filename;
+
+static GModule *xslt_module;
+
+static char *stylesheets[] = {
+	UML_TO_CPP_STYLESHEET,
+	UML_TO_IDL_STYLESHEET,
+	UML_TO_JAVA_STYLESHEET
+};
+
+static void
+export_data(DiagramData *data, const gchar *f, 
+            const gchar *diaf, void* user_data)
+{
+	if(filename != NULL)
+		g_free(filename);
+	
+	filename = g_strdup(f);
+	if(diafilename != NULL)
+		g_free(diafilename);
+
+	diafilename = g_strdup(diaf);
+
+	xslt_dialog_create();	
+}
+
+
+void xslt_ok() {
+	FILE *file, *out;
+	int err;
+	gchar *stylefname;
+	
+	xsltStylesheetPtr style, codestyle;
+	xmlDocPtr doc, res;
+
+	file = fopen(diafilename, "r");
+
+	if (file == NULL) {
+		message_error(_("Couldn't open: '%s' for reading.\n"), diafilename);
+		return;
+	}
+
+	out = fopen(filename, "w+");
+	if (out == NULL) {
+		message_error(_("Couldn't open: '%s' for writing.\n"), filename);
+		return;
+	}
+	
+	xmlSubstituteEntitiesDefault(0);
+	doc = xmlParseFile(diafilename);
+
+	if(doc == NULL) {
+		message_error(_("Error while parsing %s\n"), diafilename);
+		return;
+	}
+	
+	stylefname = g_strconcat(g_getenv("DIA_PLUGIN_PATH"),
+				 G_DIR_SEPARATOR_S, "xslt", 
+				 G_DIR_SEPARATOR_S, DIA_TO_UML_STYLESHEET, NULL);
+
+	//stylefname = malloc(strlen() + strlen(DIA_TO_UML_STYLESHEET) + 1); 
+	//sprintf(stylefname, "%s%s", g_getenv("DIA_PLUGIN_PATH"), DIA_TO_UML_STYLESHEET);
+	
+	style = xsltParseStylesheetFile((const xmlChar *) stylefname);
+	if(style == NULL) {
+		message_error(_("Error while parsing stylesheet %s\n"), stylefname);
+		return;
+	}
+	
+	res = xsltApplyStylesheet(style, doc, NULL);
+	if(res == NULL) {
+		message_error(_("Error while applying stylesheet\n"));
+		return;
+	}
+	
+	g_free(stylefname);
+	
+	/*stylefname = malloc(strlen(g_getenv("DIA_PLUGIN_PATH")) + strlen(stylesheets[language]) + 1); 
+	sprintf(stylefname, "%s%s", g_getenv("DIA_PLUGIN_PATH"), stylesheets[language]);
+	*/
+	stylefname = g_strconcat(g_getenv("DIA_PLUGIN_PATH"), 
+				 G_DIR_SEPARATOR_S, "xslt", 
+				 G_DIR_SEPARATOR_S, stylesheets[language], NULL);
+
+	codestyle = xsltParseStylesheetFile((const xmlChar *) stylefname);
+	if(codestyle == NULL) {
+		message_error(_("Error while parsing stylesheet: %s\n"), stylesheets[language]);
+		return;
+	}
+	
+	xmlFreeDoc(doc);
+	
+	doc = xsltApplyStylesheet(codestyle, res, NULL);
+	if(doc == NULL) {
+		message_error(_("Error while applying stylesheet: %s\n"), stylesheets[language]);
+		return;
+	}
+
+
+	err = xsltSaveResultToFile(out, doc, codestyle);
+	//printf("Saved to file (%i) using stylesheet: %s\n", err, stylefname);
+		
+	fclose(out);
+	fclose(file);
+	g_free(stylefname);
+
+	xsltFreeStylesheet(codestyle);
+	xsltFreeStylesheet(style);
+	xmlFreeDoc(res);
+	xmlFreeDoc(doc);
+	xsltCleanupGlobals();
+	xmlCleanupParser();
+
+	xslt_clear();
+}
+
+/* --- dia plug-in interface --- */
+
+#define MY_RENDERER_NAME "code"
+
+static const gchar *extensions[] = { "code", NULL };
+static DiaExportFilter my_export_filter = {
+	N_(MY_RENDERER_NAME),
+	extensions,
+	export_data
+};
+
+
+PluginInitResult
+dia_plugin_init(PluginInfo *info)
+{
+	gchar *path;
+	if (!dia_plugin_info_init(info, "XSLT",
+			          _("XSL Transformation filter"),
+			          NULL, NULL))
+	{
+			return DIA_PLUGIN_INIT_ERROR;
+	}
+	
+#ifdef G_OS_WIN32
+	path = g_module_build_path("\Windows", "xslt");
+#else
+	path = g_module_build_path("/usr/lib", "xslt");
+#endif	
+	xslt_module = g_module_open(path, 0);
+	if(!xslt_module) {
+		message_error("Could not load XSLT library (%s) : %s", path, g_module_error());
+		return DIA_PLUGIN_INIT_ERROR;
+	}
+	filter_register_export(&my_export_filter);
+		
+	g_free(path);
+
+	return DIA_PLUGIN_INIT_OK;
+}
diff -r -u -N -X cvsignore prevdia/plug-ins/xslt/xslt.h dia/plug-ins/xslt/xslt.h
--- prevdia/plug-ins/xslt/xslt.h	Thu Jan  1 01:00:00 1970
+++ dia/plug-ins/xslt/xslt.h	Mon Jun  3 19:36:32 2002
@@ -0,0 +1,39 @@
+/*
+ * File: plug-ins/xslt/xslt.h
+ * 
+ * Made by Matthieu Sozeau <mattam@netcourrier.com>
+ * 
+ * Started on  Thu May 16 23:22:12 2002 Matthieu Sozeau
+ * Last update Mon Jun  3 19:36:32 2002 Matthieu Sozeau
+ * 
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+#define UML_TO_CPP_STYLESHEET "dia-uml2c++.xsl"
+#define UML_TO_CPP 0
+#define UML_TO_IDL_STYLESHEET "dia-uml2idl.xsl"
+#define UML_TO_IDL 1
+#define UML_TO_JAVA_STYLESHEET "dia-uml2java.xsl"
+#define UML_TO_JAVA 2
+
+#define DIA_TO_UML_STYLESHEET "dia-uml.xsl"
+
+#include <dlfcn.h>
+
+void xslt_dialog_create();
+void xslt_ok();
+void xslt_clear();
+int language;
diff -r -u -N -X cvsignore prevdia/plug-ins/xslt/xsltdialog.c dia/plug-ins/xslt/xsltdialog.c
--- prevdia/plug-ins/xslt/xsltdialog.c	Thu Jan  1 01:00:00 1970
+++ dia/plug-ins/xslt/xsltdialog.c	Fri May 17 00:30:24 2002
@@ -0,0 +1,127 @@
+/*
+ * File: plug-ins/xslt/xsltdialog.c
+ * 
+ * Made by Matthieu Sozeau <mattam@netcourrier.com>
+ * 
+ * Started on  Thu May 16 20:30:42 2002 Matthieu Sozeau
+ * Last update Fri May 17 00:30:24 2002 Matthieu Sozeau
+ * 
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ */
+
+/*
+ * Opens a dialog for export options
+ */
+
+#include "xslt.h"
+#include <stdio.h>
+
+#include <gtk/gtk.h>
+void xslt_dialog_create(void);
+void xslt_clear(void);
+
+static void
+language_update(GtkWidget *widget, int *op)
+{
+	//printf("Current language: %i\n", op);
+	language = GPOINTER_TO_INT(op);
+}
+
+static GtkWidget *dialog;
+
+void
+xslt_dialog_create(void) {
+	GtkWidget *box, *vbox;
+	
+	GtkWidget *omenu, *menu, *menuitem;
+	GSList *group;
+	GtkWidget *label, *button;	
+
+	dialog = gtk_window_new(0);
+	
+	box = gtk_vbox_new(FALSE, 5);
+	
+	vbox = gtk_vbox_new(FALSE, 5);
+	gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
+	gtk_container_set_border_width (GTK_CONTAINER (box), 10);
+
+	label = gtk_label_new("Language :");
+
+ 	omenu = gtk_option_menu_new ();
+	menu = gtk_menu_new ();
+	group = NULL;
+
+	menuitem = gtk_radio_menu_item_new_with_label (group, "C++");
+	gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
+			    GTK_SIGNAL_FUNC (language_update), GINT_TO_POINTER(UML_TO_CPP) );
+	group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menuitem));
+	gtk_menu_append (GTK_MENU (menu), menuitem);
+	gtk_widget_show (menuitem);
+
+	menuitem = gtk_radio_menu_item_new_with_label (group, "Java");
+	gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
+			    GTK_SIGNAL_FUNC (language_update), GINT_TO_POINTER(UML_TO_JAVA) );
+	group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menuitem));
+	gtk_menu_append (GTK_MENU (menu), menuitem);
+	gtk_widget_show (menuitem);
+
+	menuitem = gtk_radio_menu_item_new_with_label (group, "IDL");
+	gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
+			    GTK_SIGNAL_FUNC (language_update), GINT_TO_POINTER(UML_TO_IDL) );
+	group = gtk_radio_menu_item_group (GTK_RADIO_MENU_ITEM (menuitem));
+	gtk_menu_append (GTK_MENU (menu), menuitem);
+	gtk_widget_show (menuitem);
+  
+	gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu);
+	gtk_widget_show(menu);
+	gtk_widget_show(omenu);
+	gtk_widget_show(label);
+	gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, TRUE, 0);
+	gtk_box_pack_start (GTK_BOX (vbox), omenu, FALSE, TRUE, 0);
+	
+	gtk_widget_show_all(vbox);
+
+	gtk_box_pack_start (GTK_BOX (box), vbox, FALSE, TRUE, 0);
+	
+	vbox = gtk_vbox_new(FALSE, 5);
+	gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
+
+	button = gtk_button_new_with_label ("OK");
+	gtk_signal_connect (GTK_OBJECT (button), "clicked",
+			    GTK_SIGNAL_FUNC(xslt_ok), NULL);
+	gtk_widget_show (button);
+	gtk_box_pack_start (GTK_BOX (box), button, FALSE, TRUE, 0);
+	
+	button = gtk_button_new_with_label ("Cancel");
+	gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
+				   GTK_SIGNAL_FUNC (gtk_widget_destroy), 
+				   GTK_OBJECT(dialog));
+	gtk_widget_show (button);
+	gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, TRUE, 0);
+	gtk_widget_show_all(vbox);
+
+	gtk_box_pack_start (GTK_BOX (box), vbox, FALSE, TRUE, 0);
+
+	gtk_widget_show_all(box);
+
+	gtk_container_add(GTK_CONTAINER(dialog), box);	
+	
+	gtk_widget_show(dialog);	
+}
+
+void xslt_clear() {
+	gtk_widget_destroy(dialog);
+}
--- prevdia/app/Makefile.am	Mon May 13 22:14:57 2002
+++ dia/app/Makefile.am	Mon Jun  3 21:01:09 2002
@@ -234,8 +234,9 @@
 
 run_dia.sh: Makefile.am
 	echo "#!$(SHELL) " > run_dia.sh
-	echo "export DIA_LIB_PATH DIA_SHAPE_PATH DIA_INT_SHAPE_PATH DIA_SHEET_PATH" >> run_dia.sh
+	echo "export DIA_LIB_PATH DIA_SHAPE_PATH DIA_INT_SHAPE_PATH DIA_SHEET_PATH DIA_PLUGIN_PATH" >> run_dia.sh
 	echo DIA_LIB_PATH=`pwd`/../objects//:`pwd`/../plug-ins// >> run_dia.sh
+	echo DIA_PLUGIN_PATH=`pwd`/../plug-ins >> run_dia.sh
 	echo DIA_SHAPE_PATH=`pwd`/../shapes >> run_dia.sh
 	echo DIA_INT_SHAPE_PATH=`pwd`/../objects >> run_dia.sh
 	echo DIA_SHEET_PATH=`pwd`/../sheets >> run_dia.sh
--- prevdia/configure.in	Mon Jun  3 00:14:56 2002
+++ dia/configure.in	Mon Jun  3 20:13:44 2002
@@ -344,6 +344,18 @@
 
 CFLAGS="$XML_CFLAGS $CFLAGS"
 
+dnl libxslt
+AC_CHECK_PROG(XSLT_CONFIG, xslt-config, xslt-config)
+if test "x$XSLT_CONFIG" != x ; then  
+  XSLT_LIBS="`$XSLT_CONFIG --libs`"
+  XSLT_CFLAGS="`$XSLT_CONFIG --cflags`"
+else
+  AC_MSG_RESULT(not found)	
+fi
+
+AC_SUBST(XSLT_LIBS)
+AC_SUBST(XSLT_CFLAGS)
+
 dnl LibZ
 dnl GTK2: keep.
 AC_CHECK_HEADERS(zlib.h,
@@ -517,6 +529,7 @@
 plug-ins/shape/Makefile
 plug-ins/xfig/Makefile
 plug-ins/python/Makefile
+plug-ins/xslt/Makefile
 doc/Makefile
 doc/en/Makefile
 doc/pl/Makefile
