cvs: php-gtk-doc /manual demo_manual.xml /stylesheets/common en.xml titles.xsl /stylesheets/html autotoc.xsl chunk-common.xsl class.xsl index.xsl
name_to_id.xsl

From: Date: Thu, 02 Mar 2006 23:34:10 +0000
Subject: cvs: php-gtk-doc /manual demo_manual.xml /stylesheets/common en.xml titles.xsl /stylesheets/html autotoc.xsl chunk-common.xsl class.xsl index.xsl
name_to_id.xsl
Groups: php.gtk.doc 
Request: Send a blank email to php-gtk-doc+get-1890@lists.php.net to get a copy of this message
cweiske Thu Mar 2 23:34:10 2006 UTC Modified files: /php-gtk-doc/manual demo_manual.xml /php-gtk-doc/stylesheets/common en.xml titles.xsl /php-gtk-doc/stylesheets/html autotoc.xsl chunk-common.xsl class.xsl index.xsl name_to_id.xsl Log: Full fields support <fields> <field id=""> <fieldname>bla</fieldname> <fieldtype>string</fieldtype> </field> </field> Linking to fields doesn't work. Neither the ones on the class page, nor the direct links via <fieldname> work. It has something to do that the linking reaches chunk-common.xsl#href.target, but not #*(chunk-filename). I have no idea why, but I've been up 18 hours now.

http://cvs.php.net/viewcvs.cgi/php-gtk-doc/manual/demo_manual.xml?r1=1.7&r2=1.8&diff_format=u Index: php-gtk-doc/manual/demo_manual.xml diff -u php-gtk-doc/manual/demo_manual.xml:1.7 php-gtk-doc/manual/demo_manual.xml:1.8 --- php-gtk-doc/manual/demo_manual.xml:1.7 Thu Mar 2 21:45:46 2006 +++ php-gtk-doc/manual/demo_manual.xml Thu Mar 2 23:34:10 2006 @@ -207,9 +207,9 @@ <fields> - <property id="bro.broopera.field.name" type="ro"> - <propname>name</propname> - <proptype>string</proptype> + <field id="bro.broopera.field.name" type="ro"> + <fieldname>name</fieldname> + <fieldtype>string</fieldtype> <shortdesc> A normal field. Get it with $obj->name. </shortdesc> @@ -219,7 +219,7 @@ </simpara> <programlisting><![CDATA[echo $obj->name]]></programlisting> </desc> - </property> + </field> </fields> http://cvs.php.net/viewcvs.cgi/php-gtk-doc/stylesheets/common/en.xml?r1=1.16&r2=1.17&diff_format=u Index: php-gtk-doc/stylesheets/common/en.xml diff -u php-gtk-doc/stylesheets/common/en.xml:1.16 php-gtk-doc/stylesheets/common/en.xml:1.17 --- php-gtk-doc/stylesheets/common/en.xml:1.16 Thu Mar 2 21:45:47 2006 +++ php-gtk-doc/stylesheets/common/en.xml Thu Mar 2 23:34:10 2006 @@ -49,6 +49,7 @@ <template name="enums" text="%t"/> <template name="enumset" text="%t"/> <template name="example" text="Example %n. %t"/> + <template name="field" text="%t"/> <template name="fields" text=""/> <template name="figure" text="Figure %n. %t"/> <template name="legalnotice" text="%t"/> http://cvs.php.net/viewcvs.cgi/php-gtk-doc/stylesheets/common/titles.xsl?r1=1.7&r2=1.8&diff_format=u Index: php-gtk-doc/stylesheets/common/titles.xsl diff -u php-gtk-doc/stylesheets/common/titles.xsl:1.7 php-gtk-doc/stylesheets/common/titles.xsl:1.8 --- php-gtk-doc/stylesheets/common/titles.xsl:1.7 Mon Apr 11 21:54:43 2005 +++ php-gtk-doc/stylesheets/common/titles.xsl Thu Mar 2 23:34:10 2006 @@ -288,6 +288,19 @@ <xsl:value-of select="$classentry/classmeta/classtitle"/> </xsl:template> +<xsl:template match="field" mode="title.markup"> + <xsl:param name="text-only" select="'0'"/> + <xsl:param name="allow-anchors" select="'0'"/> + <xsl:variable name="classentry" select="ancestor::classentry"/> + <span dir="ltr"> + <xsl:value-of select="$classentry/classmeta/classtitle"/> + <xsl:if test="count($classentry)>0"> + <xsl:text>::</xsl:text> + </xsl:if> + <xsl:value-of select="(./fieldname)" /> + </span> +</xsl:template> + <xsl:template match="property" mode="title.markup"> <xsl:param name="text-only" select="'0'"/> <xsl:param name="allow-anchors" select="'0'"/> http://cvs.php.net/viewcvs.cgi/php-gtk-doc/stylesheets/html/autotoc.xsl?r1=1.11&r2=1.12&diff_format=u Index: php-gtk-doc/stylesheets/html/autotoc.xsl diff -u php-gtk-doc/stylesheets/html/autotoc.xsl:1.11 php-gtk-doc/stylesheets/html/autotoc.xsl:1.12 --- php-gtk-doc/stylesheets/html/autotoc.xsl:1.11 Thu Mar 2 21:45:47 2006 +++ php-gtk-doc/stylesheets/html/autotoc.xsl Thu Mar 2 23:34:10 2006 @@ -6,7 +6,7 @@ version='1.0'> <!-- ******************************************************************** - $Id: autotoc.xsl,v 1.11 2006/03/02 21:45:47 cweiske Exp $ + $Id: autotoc.xsl,v 1.12 2006/03/02 23:34:10 cweiske Exp $ ******************************************************************** This file is part of the XSL DocBook Stylesheet distribution. @@ -325,7 +325,10 @@ <xsl:when test="(name(.)='constructors' or name(.)='methods') or (name(.)='properties') or (name(.)='fields') or (name(.)='signals')"> <xsl:value-of select="name(.)"/> </xsl:when> - + + <xsl:when test="name(.)='field'"> + <xsl:value-of select="fieldname"/> + </xsl:when> <xsl:when test="name(.)='property'"> <xsl:value-of select="propname"/> </xsl:when> http://cvs.php.net/viewcvs.cgi/php-gtk-doc/stylesheets/html/chunk-common.xsl?r1=1.10&r2=1.11&diff_format=u Index: php-gtk-doc/stylesheets/html/chunk-common.xsl diff -u php-gtk-doc/stylesheets/html/chunk-common.xsl:1.10 php-gtk-doc/stylesheets/html/chunk-common.xsl:1.11 --- php-gtk-doc/stylesheets/html/chunk-common.xsl:1.10 Sun Oct 23 09:59:17 2005 +++ php-gtk-doc/stylesheets/html/chunk-common.xsl Thu Mar 2 23:34:10 2006 @@ -105,6 +105,7 @@ <xsl:when test="name($node)='constructor'">1</xsl:when> <xsl:when test="name($node)='legalnotice'">1</xsl:when> <xsl:when test="name($node)='enum'">1</xsl:when> + <xsl:when test="name($node)='field'">1</xsl:when> <xsl:when test="name($node)='property'">1</xsl:when> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> @@ -712,6 +713,7 @@ |preceding::signal[1] |preceding::classset[1] |preceding::enumset[1] + |preceding::field[1] |preceding::property[1] |preceding::classtree[1] |preceding::classentry[1] @@ -748,12 +750,14 @@ |following::index[1] |following::refentry[1] |following::enum[1] + |following::field[1] |following::property[1] |following::sect1[1] |descendant::book[1] |descendant::chapter[1] |descendant::appendix[1] |descendant::part[1] + |descendant::field[1] |descendant::property[1] |descendant::enum[1] |descendant::part[1] @@ -786,6 +790,7 @@ |preceding::signal[1] |preceding::classset[1] |preceding::enumset[1] + |preceding::field[1] |preceding::property[1] |preceding::classtree[1] |preceding::classentry[1] @@ -822,6 +827,7 @@ |following::index[1] |following::refentry[1] |following::enum[1] + |following::field[1] |following::property[1] |following::sect1[1] |descendant::book[1] @@ -829,6 +835,7 @@ |descendant::appendix[1] |descendant::part[1] |descendant::enum[1] + |descendant::field[1] |descendant::property[1] |descendant::part[1] |descendant::constructor[1] @@ -859,6 +866,7 @@ |preceding::signal[1] |preceding::classset[1] |preceding::enumset[1] + |preceding::field[1] |preceding::property[1] |preceding::classtree[1] |preceding::classentry[1] @@ -895,12 +903,14 @@ |following::index[1] |following::refentry[1] |following::enum[1] + |following::field[1] |following::property[1] |descendant::book[1] |descendant::chapter[1] |descendant::appendix[1] |descendant::part[1] |descendant::enum[1] + |descendant::field[1] |descendant::property[1] |descendant::constructor[1] |descendant::method[1] @@ -1062,7 +1072,7 @@ </xsl:choose> </xsl:template> -<xsl:template match="enumset|classset|classtree|classentry|index|method|signal|property|constructor|enum"> +<xsl:template match="enumset|classset|classtree|classentry|index|method|signal|field|property|constructor|enum"> <xsl:call-template name="process-chunk-element"/> </xsl:template> http://cvs.php.net/viewcvs.cgi/php-gtk-doc/stylesheets/html/class.xsl?r1=1.26&r2=1.27&diff_format=u Index: php-gtk-doc/stylesheets/html/class.xsl diff -u php-gtk-doc/stylesheets/html/class.xsl:1.26 php-gtk-doc/stylesheets/html/class.xsl:1.27 --- php-gtk-doc/stylesheets/html/class.xsl:1.26 Thu Mar 2 21:53:01 2006 +++ php-gtk-doc/stylesheets/html/class.xsl Thu Mar 2 23:34:10 2006 @@ -87,9 +87,13 @@ <xsl:apply-templates /> </xsl:template> - <xsl:template match="proptype"> - <xsl:apply-templates /> - </xsl:template> + <xsl:template match="fieldtype"> + <xsl:apply-templates /> + </xsl:template> + + <xsl:template match="proptype"> + <xsl:apply-templates /> + </xsl:template> <xsl:template match="classimage"> <div style="float:right; border:1px solid #000;"> @@ -205,9 +209,9 @@ <xsl:variable name="id"> <xsl:choose> - <xsl:when test="name(../..)='fields' or name(.)='fieldname'"> + <xsl:when test="name(.)='fieldname'"> <xsl:call-template name="get_field_id_from_name"> - <xsl:with-param name="propname" select="$prop"/> + <xsl:with-param name="fieldname" select="$prop"/> <xsl:with-param name="class" select="$class"/> </xsl:call-template> </xsl:when> @@ -222,6 +226,8 @@ <xsl:choose> <xsl:when test="$id!='no'"> +<xsl:message><xsl:value-of select="$id"/></xsl:message> + <xsl:variable name="link"> <xsl:call-template name="href.target"> <xsl:with-param name="object" select="id($id)"/> @@ -682,10 +688,21 @@ </xsl:call-template> </h3> <blockquote> - <xsl:apply-templates select="./property" mode="synoptic.mode"/> + <xsl:apply-templates select="./field" mode="synoptic.mode"/> </blockquote> </xsl:template> + <xsl:template match="field" mode="synoptic.mode"> + <dt> + <xsl:apply-templates select="./fieldname" mode="synoptic.mode"/> + <xsl:text>:</xsl:text> + </dt> + <dd> + <xsl:call-template name="spaceholder"/> + <xsl:apply-templates select="./shortdesc"/> + </dd> + </xsl:template> + <xsl:template match="property" mode="synoptic.mode"> <dt> <xsl:apply-templates select="./propname" mode="synoptic.mode"/> @@ -771,6 +788,39 @@ <xsl:apply-templates select="funcprototype"/> </xsl:template> + <xsl:template match="field"> + <div> + <a> + <xsl:attribute name="name"><xsl:value-of select="@id"/></xsl:attribute> + </a> + <h2> + <xsl:apply-templates select="." mode="title.markup"/> + </h2> + <p> + <span dir="ltr"> + <xsl:text>Access: </xsl:text> + <xsl:choose> + <xsl:when test="@type='rw'"> + <xsl:text>Read Write</xsl:text> + </xsl:when> + <xsl:when test="@type='ro'"> + <xsl:text>Read Only</xsl:text> + </xsl:when> + <xsl:otherwise> + <xsl:text>UNKNOWN</xsl:text> + </xsl:otherwise> + </xsl:choose> + <br/> + <xsl:text>Type: </xsl:text> + <xsl:apply-templates select="./fieldtype"/> + </span> + </p> + <p> + <xsl:apply-templates select="./desc"/> + </p> + </div> + </xsl:template> + <xsl:template match="property"> <div> <a> http://cvs.php.net/viewcvs.cgi/php-gtk-doc/stylesheets/html/index.xsl?r1=1.3&r2=1.4&diff_format=u Index: php-gtk-doc/stylesheets/html/index.xsl diff -u php-gtk-doc/stylesheets/html/index.xsl:1.3 php-gtk-doc/stylesheets/html/index.xsl:1.4 --- php-gtk-doc/stylesheets/html/index.xsl:1.3 Thu Mar 2 21:45:47 2006 +++ php-gtk-doc/stylesheets/html/index.xsl Thu Mar 2 23:34:10 2006 @@ -1,7 +1,7 @@ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" encoding="utf-8"> <!-- - Stylesheets for index pages (class, method, signal and property index) + Stylesheets for index pages (class, method, signal, field and property index) Christian Weiske <cweiske@php.net> FIXME: group by first letter @@ -76,10 +76,10 @@ <!-- field index --> <xsl:template name="index.fields"> - <xsl:for-each select="/set/book/classset/classentry/properties/fields"> - <xsl:sort select="propname"/> + <xsl:for-each select="/set/book/classset/classentry/fields/field"> + <xsl:sort select="fieldname"/> <xsl:call-template name="index_link"> - <xsl:with-param name="title"><xsl:value-of select="propname"/> - <xsl:value-of select="../../classmeta/classtitle"/></xsl:with-param> + <xsl:with-param name="title"><xsl:value-of select="fieldname"/> - <xsl:value-of select="../../classmeta/classtitle"/></xsl:with-param> <xsl:with-param name="id"><xsl:value-of select="@id"/></xsl:with-param> </xsl:call-template> </xsl:for-each> @@ -95,12 +95,13 @@ |/set/book/classset/classentry/constructors/constructor |/set/book/classset/classentry/methods/method |/set/book/classset/classentry/properties/property - |/set/book/classset/classentry/fields/property + |/set/book/classset/classentry/fields/field |/set/book/classset/classentry/signals/signal"> <!-- Sort by the title thingies --> <!-- FIXME: Functions with the same name but different classes aren't sorted correctly --> <xsl:sort select="classmeta/classtitle |funcsynopsis/funcprototype/funcdef/function + |fieldname |propname |signalname" order="ascending" data-type="text"/> @@ -117,6 +118,7 @@ <xsl:when test="$type='classentry'"><xsl:value-of select="classmeta/classtitle"/> (class)</xsl:when> <xsl:when test="$type='constructor'"><xsl:value-of select="funcsynopsis/funcprototype/funcdef/function"/>() (constructor)</xsl:when> <xsl:when test="$type='method'"><xsl:value-of select="funcsynopsis/funcprototype/funcdef/function"/>() (<xsl:value-of select="../../classmeta/classtitle"/>)</xsl:when> + <xsl:when test="$type='field'"><xsl:value-of select="fieldname"/> (field, <xsl:value-of select="../../classmeta/classtitle"/>)</xsl:when> <xsl:when test="$type='property'"><xsl:value-of select="propname"/> (property, <xsl:value-of select="../../classmeta/classtitle"/>)</xsl:when> <xsl:when test="$type='signal'"><xsl:value-of select="signalname"/> (signal, <xsl:value-of select="../../classmeta/classtitle"/>)</xsl:when> <xsl:otherwise> http://cvs.php.net/viewcvs.cgi/php-gtk-doc/stylesheets/html/name_to_id.xsl?r1=1.7&r2=1.8&diff_format=u Index: php-gtk-doc/stylesheets/html/name_to_id.xsl diff -u php-gtk-doc/stylesheets/html/name_to_id.xsl:1.7 php-gtk-doc/stylesheets/html/name_to_id.xsl:1.8 --- php-gtk-doc/stylesheets/html/name_to_id.xsl:1.7 Thu Mar 2 21:45:47 2006 +++ php-gtk-doc/stylesheets/html/name_to_id.xsl Thu Mar 2 23:34:10 2006 @@ -174,7 +174,7 @@ returns "no" if none is found --> <xsl:template name="get_field_id_from_name"> - <xsl:param name="propname" /> + <xsl:param name="fieldname" /> <xsl:param name="class" select="no" /> <xsl:variable name="classid"><xsl:call-template name="get_id_from_name"> @@ -184,11 +184,11 @@ <xsl:choose> <xsl:when test="$classid='no'"> <!-- class couldn't be found... strange --> - <xsl:message>ERROR: classid for field <xsl:value-of select="$propname"/> not found</xsl:message> + <xsl:message>ERROR: classid for field <xsl:value-of select="$fieldname"/> not found</xsl:message> <xsl:text>no</xsl:text> </xsl:when> <xsl:otherwise> - <xsl:value-of select="$classid"/><xsl:text>.field.</xsl:text><xsl:value-of select="$propname"/> + <xsl:value-of select="$classid"/><xsl:text>.field.</xsl:text><xsl:value-of select="$fieldname"/> </xsl:otherwise> </xsl:choose> </xsl:template><!--xsl:template name="get_field_id_from_name"-->
« previous php.gtk.doc (#1890) next »