pull-in the .T generating
authorAleš Křenek <ljocha@ics.muni.cz>
Thu, 24 Feb 2005 18:16:45 +0000 (18:16 +0000)
committerAleš Křenek <ljocha@ics.muni.cz>
Thu, 24 Feb 2005 18:16:45 +0000 (18:16 +0000)
org.glite.lb.ws-interface/Makefile
org.glite.lb.ws-interface/build.xml
org.glite.lb.ws-interface/src/puke-ug.xsl [new file with mode: 0644]

index 051fdeb..aacc67c 100644 (file)
@@ -12,7 +12,12 @@ PREFIX=/opt/glite
 
 -include Makefile.inc
 
-VPATH=${top_srcdir}/interface
+SUFFIXES = .T
+
+VPATH=${top_srcdir}/src
+AT3=perl -I${top_srcdir}/project ${top_srcdir}/project/at3
+XSLTPROC=xsltproc
+
 STAGETO=interface
 
 WSDL=LB.wsdl
@@ -43,7 +48,16 @@ install:
        -mkdir -p ${PREFIX}/share/doc/${package}-${version}
        install -m 644 ${top_srcdir}/LICENSE ${PREFIX}/share/doc/${package}-${version}
        cd ${top_srcdir}/interface && install -m 644 ${WSDL} ${PREFIX}/${STAGETO}
+#      install -m 644 ${WSDL} ${PREFIX}/${STAGETO}
 
 clean:
        rm -f *.h
        
+
+%.xml: %.xml.T
+       rm -f $@
+       ${AT3} $< >$@ || rm -f $@
+       chmod -w $@ >/dev/null
+
+${WSDL}: LB.xml
+       ${XSLTPROC} ../src/puke-wsdl.xsl LB.xml >$@
index c460af0..c8440c4 100644 (file)
 
        Revision history:
        $Log$
+       Revision 1.1.1.1.2.1  2005/02/12 01:39:43  glbuild
+       Changed start time
+       
        Revision 1.1.1.1  2004/11/25 15:20:10  akrenek
        initial import
        
-       Revision 1.5  2004/07/20 16:08:30  flammer
-       Changed incorrect my_... instead of .._template entries for subsystem and component.
-       
-       Revision 1.4  2004/07/16 16:32:53  flammer
-       Added comment where to add language target.
-       
-       Revision 1.3  2004/07/16 14:56:55  flammer
-       Corrected input path of build.properties.
-       
-       Revision 1.2  2004/07/06 20:43:19  flammer
-       Update of configure & targets.
-       
-       Revision 1.1.1.1  2004/06/18 12:40:17  flammer
-       Added general component template.
-       
-       
 -->
 
 <project name="ws-interface" default="dist">
        
        <target name="localinit"
                description="Module specific initialization tasks">
+               <copy toDir="${module.project.dir}">
+                       <fileset dir="${subsystem.project.dir}">
+                               <include name="at3" />
+                               <include name="*.T" />
+                               <include name="*.pm" />
+                       </fileset>
+               </copy>
                <antcall target="lbmakefiles" />
        </target>
        
diff --git a/org.glite.lb.ws-interface/src/puke-ug.xsl b/org.glite.lb.ws-interface/src/puke-ug.xsl
new file mode 100644 (file)
index 0000000..8daaf3a
--- /dev/null
@@ -0,0 +1,84 @@
+<?xml version="1.0"?>
+
+<xsl:stylesheet version="1.0"
+       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+       xmlns="">
+
+<xsl:output indent="yes"/>
+
+
+<xsl:template match="/service">
+
+       <chapter>
+               <title><xsl:value-of select="@name"/></title>
+               <para> <xsl:value-of select="text()"/> </para>
+               <sect1>
+                       <title>Operation summary</title>
+                               <itemizedlist>
+                                       <xsl:apply-templates select="op" mode="summary"/>
+                               </itemizedlist>
+               </sect1>
+       
+               <sect1>
+                       <title>Types</title>
+                       <xsl:apply-templates select="types"/>
+               </sect1>
+       
+               <sect1>
+                       <title>Operation detail</title>
+                       <xsl:apply-templates select="op" mode="detail"/>
+               </sect1>
+       </chapter>
+       
+</xsl:template>
+
+<xsl:template match="op" mode="summary">
+       <listitem>
+               <funcsynopsis>
+                       <funcprototype>
+                               <funcdef>
+                                       <xsl:value-of select="./output/@type"/>
+                                       <function>
+                                               <xsl:value-of select="@name"/>
+                                       </function>
+                               </funcdef>
+                               <xsl:for-each select="./input">
+                                       <paramdef>
+                                               <xsl:value-of select="@type "/>
+                                               <parameter><xsl:value-of select="@name"/></parameter>
+                                       </paramdef>
+                               </xsl:for-each>
+                       </funcprototype>
+               </funcsynopsis>
+       </listitem>
+</xsl:template>
+
+<xsl:template match="op" mode="detail">
+</xsl:template>
+
+<xsl:template match="types">
+       <xsl:for-each select="flags|enum|struct">
+               <xsl:sort select="@name"/>
+               <xsl:choose>
+                       <xsl:when test="name(.)='struct'">
+                               <variablelist>
+                                       <title>Complex type <classname><xsl:value-of select="@name"/></classname></title>
+                                       <xsl:for-each select="elem">
+                                               <varlistentry>
+                                                       <term>
+                                                               <type><xsl:value-of select="@type"/></type>
+                                                               <structfield><xsl:value-of select="@name"/></structfield>
+                                                       </term>
+                                                       <listitem>
+                                                               <para><xsl:value-of select="text()"/></para>
+                                                       </listitem>
+                                               </varlistentry>
+                                       </xsl:for-each>
+                               </variablelist>
+                       </xsl:when>
+               </xsl:choose>
+       </xsl:for-each>
+</xsl:template>
+
+
+</xsl:stylesheet>