cvs: php-gtk-doc /stylesheets/xsl/common hierarchy.xsl util.xsl

[email protected] ("James Moore") Sat, 11 Aug 2001 16:10:40 -0000
Newsgroups php.gtk
Message-ID <cvsjmoore997546240@cvsserver>
jmoore		Sat Aug 11 12:10:40 2001 EDT

  Added files:                 
    /php-gtk-doc/stylesheets/xsl/common	util.xsl 

  Modified files:              
    /php-gtk-doc/stylesheets/xsl/common	hierarchy.xsl 
  Log:
  Bit more work on these stylesheets
  
  
Index: php-gtk-doc/stylesheets/xsl/common/hierarchy.xsl
diff -u php-gtk-doc/stylesheets/xsl/common/hierarchy.xsl:1.4 php-gtk-doc/stylesheets/xsl/common/hierarchy.xsl:1.5
--- php-gtk-doc/stylesheets/xsl/common/hierarchy.xsl:1.4	Fri Aug 10 11:09:10 2001
+++ php-gtk-doc/stylesheets/xsl/common/hierarchy.xsl	Sat Aug 11 12:10:40 2001
@@ -1,8 +1,8 @@
-<?xml version='1.0' encoding='ISO-8859-1' ?>
+y<?xml version='1.0' encoding='ISO-8859-1' ?>
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 		version="1.0">
 
-<!-- $Id: hierarchy.xsl,v 1.4 2001/08/10 15:09:10 jmoore Exp $ -->
+<!-- $Id: hierarchy.xsl,v 1.5 2001/08/11 16:10:40 jmoore Exp $ -->
 		
 <!-- ================== Common Hierarchy Functions ============================ -->
 
@@ -74,16 +74,17 @@
 -->
  <xsl:template name="get.class.id.from.name">
   <xsl:param name="classname" />
-  <xsl:param name="root" select="no" />
-
-  <xsl:choose>
-   <xsl:when test="$root='no'">
-    <xsl:variable name="classentry" select="//classentry[classmeta/classtitle=$classname]" />
-   </xsl:when>
-   <xsl:otherwise>
-    <xsl:variable name="classentry" select="$root//classentry[classmeta/classtitle=$classname]" />
-   </xsl:otherwise>
-   <xsl:value-of select="$classentry/attribute::id" />
+  <xsl:param name="root" select="/" >
+	  
+  <xsl:variable name="classentry">
+   <xsl:call-template name="get.classentry.from.title">
+    <xsl:with-param name="title" select="$classname"/>
+    <xsl:with-param name="root" select="$root"/>
+   </xsl:call-template>
+  </xsl:variable>
+ 
+  <xsl:value-of select="$classentry/attribute::id" />
+  
  </xsl:template>
  
 <!--
@@ -92,18 +93,12 @@
   *		[root - The root node to start searching from. Default is top node]
   * Returns:  	the signals' id.
 -->
- <xsl:template name="get.class.id.from.name">
+ <xsl:template name="get.signal.id.from.name">
   <xsl:param name="signalname" />
-  <xsl:param name="root" select="no" />
+  <xsl:param name="root" select="/" />
 
-  <xsl:choose>
-   <xsl:when test="$root='no'">
-   <xsl:variable name="signal" select="//signal[signalname=$signame]"/>
-   </xsl:when>
-   <xsl:otherwise>
-    <xsl:variable name="signal" select="$root//signal[signalname=$signame]"/>
-   </xsl:otherwise>
-   <xsl:value-of select="$signal/attribute::id" />
+  <xsl:variable name="signal" select="$root//signal[signalname=$signame]"/>
+  <xsl:value-of select="$signal/attribute::id" />
  </xsl:template>
 
 <!-- 

Index: php-gtk-doc/stylesheets/xsl/common/util.xsl
+++ php-gtk-doc/stylesheets/xsl/common/util.xsl
<?xml version='1.0' encoding='ISO-8859-1' ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
		version="1.0">

<!-- $Id: util.xsl,v 1.1 2001/08/11 16:10:40 jmoore Exp $ -->
		
<!-- ================== Utility Functions ============================ -->

<!--
  * Function:	get.class.title
  * Params:	classentry - The classentry node
  * Returns:	The classentry's classes Title
-->
 <xsl:template name="get.class.title">
  <xsl:param name="classentry"/>

  <xsl:value-of select="$classentry/classmeta/classtitle"/>
  
 </xsl:template>

<!--
 * Function:	get.classentry.from.title
 * Params:	title - The title of the classentry we are looking for
 * 		[root - the root to start seaching from]
 * Returns	The classentry's node
-->
 <xsl:template name="get.classentry.from.title">
  <xsl:param name="title" />	 
  <xsl:param name="root" select="/"/>

  <xsl:copy-of select="$root//classentry[classmeta/classtitle = $title]"/>
 
 </xsl:template>