Initial Commit
This commit is contained in:
34
database/php/pear/PHP/UML/Output/Html/Exporter.php
Normal file
34
database/php/pear/PHP/UML/Output/Html/Exporter.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* PHP_UML
|
||||
*
|
||||
* PHP version 5
|
||||
*
|
||||
* @category PHP
|
||||
* @package PHP_UML
|
||||
* @author Baptiste Autin <ohlesbeauxjours@yahoo.fr>
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL License 3
|
||||
* @version SVN: $Revision: 178 $
|
||||
* @link http://pear.php.net/package/PHP_UML
|
||||
* @since $Date: 2011-09-19 03:08:06 +0200 (lun., 19 sept. 2011) $
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implementation of an exporter to generate an HTML website (Javadoc look and
|
||||
* feel)
|
||||
*
|
||||
* @category PHP
|
||||
* @package PHP_UML
|
||||
* @subpackage Output
|
||||
* @subpackage Html
|
||||
* @author Baptiste Autin <ohlesbeauxjours@yahoo.fr>
|
||||
* @license http://www.gnu.org/licenses/lgpl.html LGPL License 3
|
||||
*/
|
||||
class PHP_UML_Output_Html_Exporter extends PHP_UML_Output_ExporterXSL
|
||||
{
|
||||
function getXslFilepath()
|
||||
{
|
||||
return dirname(__FILE__).DIRECTORY_SEPARATOR.self::STARTING_TPL;
|
||||
}
|
||||
}
|
||||
?>
|
||||
49
database/php/pear/PHP/UML/Output/Html/allclasses-frame.xsl
Normal file
49
database/php/pear/PHP/UML/Output/Html/allclasses-frame.xsl
Normal file
@@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<xsl:stylesheet version="1.0" exclude-result-prefixes="uml xmi"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:uml="http://schema.omg.org/spec/UML/2.1.2"
|
||||
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1">
|
||||
|
||||
<!-- Called on the top container. Lists all the "uml:Package" elements, in the left frame. -->
|
||||
<xsl:template name="allclasses">
|
||||
|
||||
<html>
|
||||
<xsl:call-template name="htmlStartPage"/>
|
||||
<xsl:call-template name="htmlHead">
|
||||
<xsl:with-param name="path" />
|
||||
<xsl:with-param name="title" select="concat(@name,' - All Classes')"/>
|
||||
</xsl:call-template>
|
||||
<body>
|
||||
|
||||
<div id="contentFrame">
|
||||
<h1>All Classes</h1>
|
||||
<ul>
|
||||
<xsl:for-each select="//packagedElement[@xmi:type='uml:Class' or @xmi:type='uml:Interface' or @xmi:type='uml:DataType']">
|
||||
<xsl:sort select="@name" data-type="text" case-order="lower-first"/>
|
||||
<xsl:variable name="prefix">
|
||||
<xsl:call-template name="getPackageFilePath">
|
||||
<xsl:with-param name="context" select="."/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="getPrefix">
|
||||
<xsl:with-param name="context" select="."/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<li>
|
||||
<xsl:if test="@xmi:type='uml:Interface'">
|
||||
<xsl:attribute name="class">interfaceElement</xsl:attribute>
|
||||
</xsl:if>
|
||||
<a href="{concat('./', $prefix, @name, '.html')}" target="classFrame">
|
||||
<xsl:value-of select="@name"/>
|
||||
</a>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
452
database/php/pear/PHP/UML/Output/Html/classifier.xsl
Normal file
452
database/php/pear/PHP/UML/Output/Html/classifier.xsl
Normal file
@@ -0,0 +1,452 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<xsl:stylesheet version="1.0" exclude-result-prefixes="uml xmi exslt exslt-set exslt-functions"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:uml="http://schema.omg.org/spec/UML/2.1.2"
|
||||
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
|
||||
xmlns:exslt="http://exslt.org/common" xmlns:exslt-set="http://exslt.org/sets"
|
||||
xmlns:exslt-functions="http://exslt.org/functions">
|
||||
|
||||
<!-- Called on every class/interface. One file per class/interface -->
|
||||
<xsl:template name="classifier">
|
||||
<xsl:param name="relPathTop"/>
|
||||
<xsl:param name="entity"/>
|
||||
<xsl:param name="nestingPackageName"/>
|
||||
<xsl:param name="ownedAttributeSet"/>
|
||||
<xsl:param name="ownedOperationSet" />
|
||||
<xsl:param name="generalization"/>
|
||||
<xsl:param name="implements"/>
|
||||
<xsl:param name="prevEntity"/>
|
||||
<xsl:param name="nextEntity"/>
|
||||
<xsl:param name="filePrefix"/>
|
||||
<xsl:param name="relPathClass"/>
|
||||
|
||||
<xsl:variable name="path">
|
||||
<element>
|
||||
<xsl:attribute name="id"><xsl:value-of select="@xmi:id"/></xsl:attribute>
|
||||
<xsl:call-template name="getPackageNamePart"/>
|
||||
<xsl:value-of select="@name"/>
|
||||
</element>
|
||||
<xsl:for-each select="generalization">
|
||||
<xsl:call-template name="generalization"></xsl:call-template>
|
||||
</xsl:for-each>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="allImplementedClasses" select="key('getElementById', key('getRealizations', exslt:node-set($path)/*/@id)/@supplier)"/>
|
||||
<xsl:variable name="allImplementingClasses" select="key('getElementById',key('getRealizingClasses', @xmi:id)/@client)"/>
|
||||
<xsl:variable name="allSubClasses" select="key('getSubclasses', @xmi:id)"/>
|
||||
<xsl:variable name="artifact" select="key('getElementById',key('getManifestation', @xmi:id)/@client)"/>
|
||||
<xsl:variable name="lcEntityName" select="translate($entity, 'CDI', 'cdi')"/>
|
||||
|
||||
<html>
|
||||
<xsl:call-template name="htmlStartPage"/>
|
||||
<xsl:call-template name="htmlHead">
|
||||
<xsl:with-param name="path" select="$relPathTop"/>
|
||||
<xsl:with-param name="title" select="concat($nestingPackageName, $packageDelimiter, @name)"/>
|
||||
</xsl:call-template>
|
||||
<body>
|
||||
|
||||
<div id="navigation">
|
||||
<div id="banner">
|
||||
<ul class="sections">
|
||||
<li><a href="{$relPathTop}{$fileOverviewSummary}" title="Summary of all packages">Overview</a></li>
|
||||
<li><a href="{$filePackageSummary}" title="Summary of {$nestingPackageName}">Package</a></li>
|
||||
<li class="active"><xsl:value-of select="$entity"/></li>
|
||||
<li><a href="{$relPathTop}{$fileIndexAll}">Index</a></li>
|
||||
</ul>
|
||||
<ul class="navigFrame">
|
||||
<a href="{concat($relPathTop,$fileIndex,'?',$relPathClass,$filePrefix,@name,'.html')}" class="navigFrameElem" target="_top">FRAMES</a>
|
||||
<xsl:text> </xsl:text>
|
||||
<a href="{concat($filePrefix,@name,'.html')}" class="navigFrameElem" target="_top">NO FRAMES</a>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="siblingSections">
|
||||
<xsl:if test="$prevEntity!=''">
|
||||
<li><a href="{concat($filePrefix,$prevEntity,'.html')}"><xsl:value-of select="concat('Prev ', $entity)" /></a></li>
|
||||
</xsl:if>
|
||||
<xsl:if test="$nextEntity!=''">
|
||||
<li class="last"><a href="{concat($filePrefix,$nextEntity,'.html')}"><xsl:value-of select="concat('Next ', $entity)" /></a></li>
|
||||
</xsl:if>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="classSummary">
|
||||
<!-- Class Name -->
|
||||
<h3 id="entityPackage"><xsl:value-of select="$nestingPackageName"/></h3>
|
||||
<h1 id="entityName"><xsl:value-of select="concat($entity, ' ', @name)" /></h1>
|
||||
|
||||
<!-- Class tree -->
|
||||
<xsl:call-template name="htmlInheritedClassTree">
|
||||
<xsl:with-param name="path" select="$path"/>
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
</xsl:call-template>
|
||||
|
||||
<!-- All Implemented Classes -->
|
||||
<xsl:if test="count($allImplementedClasses) > 0">
|
||||
<h3 class="titleSmallList">All Implemented Interfaces:</h3>
|
||||
<div class="smallList">
|
||||
<xsl:for-each select="$allImplementedClasses">
|
||||
<xsl:call-template name="htmlLinkToElement">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
<xsl:with-param name="context" select="."/>
|
||||
<xsl:with-param name="style" select="string('linkSimple')"/>
|
||||
</xsl:call-template>
|
||||
<xsl:if test="position() < last()"><xsl:text>, </xsl:text></xsl:if>
|
||||
</xsl:for-each>
|
||||
</div>
|
||||
</xsl:if>
|
||||
|
||||
<!-- All Implemented Classes -->
|
||||
<xsl:if test="count($allSubClasses) > 0">
|
||||
<h3 class="titleSmallList">Direct Known Subclasses:</h3>
|
||||
<div class="smallList">
|
||||
<xsl:for-each select="$allSubClasses">
|
||||
<xsl:call-template name="htmlLinkToElement">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
<xsl:with-param name="context" select="."/>
|
||||
<xsl:with-param name="style" select="string('linkSimple')"/>
|
||||
</xsl:call-template>
|
||||
<xsl:if test="position() < last()"><xsl:text>, </xsl:text></xsl:if>
|
||||
</xsl:for-each>
|
||||
</div>
|
||||
</xsl:if>
|
||||
|
||||
<!-- All Implementing Classes -->
|
||||
<xsl:if test="count($allImplementingClasses) > 0">
|
||||
<h3 class="titleSmallList">All Known Implementing Classes:</h3>
|
||||
<div class="smallList">
|
||||
<xsl:for-each select="$allImplementingClasses">
|
||||
<xsl:call-template name="htmlLinkToElement">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
<xsl:with-param name="context" select="."/>
|
||||
<xsl:with-param name="style" select="string('linkSimple')"/>
|
||||
</xsl:call-template>
|
||||
<xsl:if test="position() < last()"><xsl:text>, </xsl:text></xsl:if>
|
||||
</xsl:for-each>
|
||||
</div>
|
||||
</xsl:if>
|
||||
|
||||
<hr/>
|
||||
|
||||
<!-- Class details -->
|
||||
<xsl:text>public </xsl:text>
|
||||
<xsl:if test="@isAbstract='true' and $entity!='Interface'">
|
||||
<xsl:text>abstract </xsl:text>
|
||||
</xsl:if>
|
||||
<xsl:value-of select="concat($lcEntityName, ' ')"/>
|
||||
<strong><xsl:value-of select="@name" /></strong><br/>
|
||||
<xsl:if test="count($generalization) > 0">
|
||||
extends <xsl:value-of select="$generalization/@name" /><br/>
|
||||
</xsl:if>
|
||||
<xsl:if test="count($implements) > 0">
|
||||
implements
|
||||
<xsl:for-each select="$implements">
|
||||
<xsl:value-of select="@name" />
|
||||
<xsl:if test="position() < last()">, </xsl:if>
|
||||
</xsl:for-each>
|
||||
</xsl:if>
|
||||
|
||||
<p>
|
||||
<xsl:call-template name="htmlDescription">
|
||||
<xsl:with-param name="baseElement" select="@xmi:id"/>
|
||||
</xsl:call-template>
|
||||
<xsl:if test="count($artifact) > 0">
|
||||
<b>File: </b>
|
||||
<xsl:for-each select="exslt:node-set($artifact)/ancestor::*[@xmi:type='uml:Package']">
|
||||
<xsl:if test="position() > 1"><xsl:value-of select="concat('/',@name)"/></xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:value-of select="concat('/', $artifact/@name)"/>
|
||||
</xsl:if>
|
||||
</p>
|
||||
<hr/>
|
||||
</div>
|
||||
|
||||
<xsl:if test="count($ownedAttributeSet) > 0">
|
||||
<div id="fieldSummary">
|
||||
<h2>Field Summary</h2>
|
||||
<table border="1" class="tableSummary">
|
||||
<xsl:for-each select="$ownedAttributeSet">
|
||||
<xsl:call-template name="class-field-summary">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</div>
|
||||
</xsl:if>
|
||||
<xsl:if test="count($ownedOperationSet) > 0">
|
||||
<div id="methodSummary">
|
||||
<h2>Method Summary</h2>
|
||||
<table border="1" class="tableSummary">
|
||||
<xsl:for-each select="$ownedOperationSet">
|
||||
<xsl:call-template name="class-method-summary">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</div>
|
||||
</xsl:if>
|
||||
<xsl:if test="count($ownedAttributeSet) > 0">
|
||||
<div id="fieldDetail">
|
||||
<h2>Field Detail</h2>
|
||||
<xsl:for-each select="$ownedAttributeSet">
|
||||
<xsl:call-template name="class-field-detail">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
</div>
|
||||
</xsl:if>
|
||||
<xsl:if test="count($ownedOperationSet) > 0">
|
||||
<div id="methodDetail">
|
||||
<h2>Method Detail</h2>
|
||||
<xsl:for-each select="$ownedOperationSet">
|
||||
<xsl:call-template name="class-method-detail">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
<xsl:with-param name="specifiedBy" select="exslt:node-set($allImplementedClasses)/ownedOperation[@name=current()/@name]"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
</div>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:variable name="nestedClassSet" select="nestedClassifier[@xmi:type='uml:Class']"/>
|
||||
<xsl:if test="count($nestedClassSet) > 0">
|
||||
<div>
|
||||
<h2>Nested Classes</h2>
|
||||
<xsl:call-template name="htmlTableSummary">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
<xsl:with-param name="set" select="$nestedClassSet"/>
|
||||
<xsl:with-param name="filePrefix" select="string(concat(@name, '/', $fileprefixClass))"/>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
</xsl:if>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="class-field-summary">
|
||||
<xsl:param name="relPathTop"/>
|
||||
<tr>
|
||||
<td align="right" width="1%" valign="top">
|
||||
<span class="code">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@isReadOnly='true'">const</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@visibility='private'">private</xsl:when>
|
||||
<xsl:when test="@visibility='protected'">protected</xsl:when>
|
||||
</xsl:choose>
|
||||
<xsl:if test="@isStatic='true'"> static</xsl:if>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="count(type) > 0">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="htmlType">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
<xsl:with-param name="context" select="."/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
</span>
|
||||
</td>
|
||||
<td valign="top">
|
||||
<span class="code">
|
||||
<a href="#{@name}" class="linkSummary"><xsl:value-of select="@name" /></a>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Method summary -->
|
||||
<xsl:template name="class-method-summary">
|
||||
<xsl:param name="relPathTop"/>
|
||||
<tr>
|
||||
<td align="right" width="1%" valign="top">
|
||||
<span class="code">
|
||||
<xsl:if test="@isReadOnly='true'">final</xsl:if>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@visibility='private'"> private</xsl:when>
|
||||
<xsl:when test="@visibility='protected'"> protected</xsl:when>
|
||||
</xsl:choose>
|
||||
<xsl:if test="@isAbstract='true'"> abstract</xsl:if>
|
||||
<xsl:if test="@isStatic='true'"> static</xsl:if>
|
||||
<xsl:choose>
|
||||
<xsl:when test="ownedParameter[@direction='return']">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="htmlType">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
<xsl:with-param name="context" select="ownedParameter[@direction='return']"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
</span>
|
||||
</td>
|
||||
<td valign="top">
|
||||
<span class="code">
|
||||
<xsl:variable name="parameters">
|
||||
<xsl:call-template name="htmlParametersBracket">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<a href="#{concat(@name,$parameters)}" class="linkSummary"><xsl:value-of select="@name"/></a>
|
||||
<xsl:copy-of select="$parameters"/>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Field Detail -->
|
||||
<xsl:template name="class-field-detail">
|
||||
<xsl:param name="relPathTop"/>
|
||||
<div class="detail" id="{@name}">
|
||||
<h4><xsl:value-of select="@name" /></h4>
|
||||
<div class="detailContent">
|
||||
<span class="code">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@isReadOnly='true'">const</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@visibility='private'">private</xsl:when>
|
||||
<xsl:when test="@visibility='protected'">protected</xsl:when>
|
||||
<xsl:otherwise>public</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="@isStatic='true'"> static</xsl:if>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="count(type) > 0">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="htmlType">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
<xsl:with-param name="context" select="."/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
<b><xsl:value-of select="concat(' ', @name)" /></b>
|
||||
<xsl:if test="defaultValue">
|
||||
<xsl:value-of select="concat(' = ', defaultValue/@value)" />
|
||||
</xsl:if>
|
||||
</span>
|
||||
<p>
|
||||
<xsl:call-template name="htmlDescription">
|
||||
<xsl:with-param name="baseElement" select="@xmi:id"/>
|
||||
</xsl:call-template>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr/>
|
||||
</xsl:template>
|
||||
|
||||
<!-- Method Detail -->
|
||||
<xsl:template name="class-method-detail">
|
||||
<xsl:param name="relPathTop"/>
|
||||
<xsl:param name="specifiedBy"/>
|
||||
<xsl:variable name="artifact" select="key('getElementById',key('getManifestation', @xmi:id)/@client)"/>
|
||||
|
||||
<xsl:variable name="parameters">
|
||||
<xsl:call-template name="htmlParametersBracket">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<div class="detail" id="{concat(@name,$parameters)}">
|
||||
<h4><xsl:value-of select="@name"/></h4>
|
||||
<div class="detailContent">
|
||||
<span class="code">
|
||||
<xsl:choose>
|
||||
<xsl:when test="@visibility='private'">private</xsl:when>
|
||||
<xsl:when test="@visibility='protected'">protected</xsl:when>
|
||||
<xsl:otherwise>public</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
<xsl:if test="@isAbstract='true'"> abstract</xsl:if>
|
||||
<xsl:if test="@isStatic='true'"> static</xsl:if>
|
||||
<xsl:choose>
|
||||
<xsl:when test="ownedParameter[@direction='return']">
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="htmlType">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
<xsl:with-param name="context" select="ownedParameter[@direction='return']"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise/>
|
||||
</xsl:choose>
|
||||
<b><xsl:value-of select="concat(' ', @name)" /></b>
|
||||
<xsl:copy-of select="$parameters"/>
|
||||
</span>
|
||||
|
||||
<!-- Description and tags -->
|
||||
<p>
|
||||
<xsl:call-template name="htmlDescriptionParam">
|
||||
<xsl:with-param name="baseElement" select="@xmi:id"/>
|
||||
</xsl:call-template>
|
||||
<xsl:if test="count($artifact) > 0">
|
||||
<b>File: </b>
|
||||
<xsl:for-each select="exslt:node-set($artifact)/ancestor::*[@xmi:type='uml:Package']">
|
||||
<xsl:if test="position() > 1"><xsl:value-of select="concat('/',@name)"/></xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:value-of select="concat('/', $artifact/@name)"/>
|
||||
</xsl:if>
|
||||
</p>
|
||||
|
||||
<!-- Specified By -->
|
||||
<xsl:if test="count($specifiedBy) > 0">
|
||||
|
||||
<xsl:for-each select="exslt:node-set($specifiedBy)/ownedComment">
|
||||
<h3 class="titleSmallList">Description Copied From interface:</h3>
|
||||
<div class="smallList">
|
||||
<xsl:value-of select="@body"/>
|
||||
<xsl:call-template name="br-replace">
|
||||
<xsl:with-param name="str" select="body/text()"/>
|
||||
</xsl:call-template>
|
||||
</div>
|
||||
</xsl:for-each>
|
||||
|
||||
<h3 class="titleSmallList">Specified By</h3>
|
||||
<div class="smallList">
|
||||
<xsl:for-each select="$specifiedBy">
|
||||
<xsl:variable name="classParent" select="parent::*"/>
|
||||
<xsl:variable name="path">
|
||||
<xsl:call-template name="getPackageFilePath">
|
||||
<xsl:with-param name="context" select="$classParent"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="getPrefix">
|
||||
<xsl:with-param name="context" select="$classParent"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<span class="code">
|
||||
<a href="{concat($relPathTop,$path,$classParent/@name,'.html#',@name,$parameters)}" class="$linkType">
|
||||
<xsl:value-of select="@name"/>
|
||||
</a>
|
||||
</span>
|
||||
<xsl:text> in </xsl:text>
|
||||
<span class="code">
|
||||
<xsl:call-template name="htmlLinkToElement">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
<xsl:with-param name="context" select="$classParent"/>
|
||||
<xsl:with-param name="style" select="string('linkSimple')"/>
|
||||
</xsl:call-template>
|
||||
</span>
|
||||
</xsl:for-each>
|
||||
</div>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:variable name="params" select="ownedParameter[not(@direction) or @direction!='return']"/>
|
||||
<xsl:if test="count($params) > 0">
|
||||
<h3 class="titleSmallList">Parameters</h3>
|
||||
<div class="smallList">
|
||||
<xsl:variable name="id" select="@xmi:id"/>
|
||||
<xsl:for-each select="$params">
|
||||
<xsl:variable name="cnt" select="position()"/>
|
||||
<span class="code"><xsl:value-of select="@name"/></span>
|
||||
<xsl:text> - </xsl:text>
|
||||
<xsl:for-each select="key('getMetadata', $id)/*[local-name()='param'][$cnt]">
|
||||
<xsl:call-template name="htmlDocblockParam"/>
|
||||
</xsl:for-each>
|
||||
<br/>
|
||||
</xsl:for-each>
|
||||
</div>
|
||||
</xsl:if>
|
||||
</div>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
</xsl:stylesheet>
|
||||
239
database/php/pear/PHP/UML/Output/Html/documentation-common.xsl
Normal file
239
database/php/pear/PHP/UML/Output/Html/documentation-common.xsl
Normal file
@@ -0,0 +1,239 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<xsl:stylesheet version="1.0" exclude-result-prefixes="uml xmi exslt exslt-set exslt-functions"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:uml="http://schema.omg.org/spec/UML/2.1.2"
|
||||
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
|
||||
xmlns:exslt="http://exslt.org/common" xmlns:exslt-set="http://exslt.org/sets"
|
||||
xmlns:exslt-functions="http://exslt.org/functions">
|
||||
|
||||
<!-- Common templates required by the documentation exporter -->
|
||||
|
||||
<!-- Returns the generalized elements of the current context (through <element> tags)-->
|
||||
<xsl:template name="generalization">
|
||||
<xsl:variable name="parent" select="key('getElementById', @general)"/>
|
||||
<element>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:call-template name="getPackageFilePath">
|
||||
<xsl:with-param name="context" select="$parent"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="getPrefix">
|
||||
<xsl:with-param name="context" select="$parent"/>
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="concat($parent/@name,'.html')"/>
|
||||
</xsl:attribute>
|
||||
<xsl:attribute name="id">
|
||||
<xsl:value-of select="$parent/@xmi:id"/>
|
||||
</xsl:attribute>
|
||||
<xsl:call-template name="getPackageNamePart">
|
||||
<xsl:with-param name="context" select="$parent"/>
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="$parent/@name"/>
|
||||
</element>
|
||||
<xsl:for-each select="$parent/generalization">
|
||||
<xsl:call-template name="generalization"/>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="htmlHead">
|
||||
<xsl:param name="path"/>
|
||||
<xsl:param name="title"/>
|
||||
<xsl:comment><xsl:value-of select="concat('Generated by ',$appName,' on ',$genDate)"/></xsl:comment>
|
||||
<head>
|
||||
<title><xsl:value-of select="$title"/></title>
|
||||
<link rel="stylesheet" type="text/css" media="all" href="{concat($path,'style.css')}" />
|
||||
</head>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="htmlInherit">
|
||||
<xsl:param name="relPathTop" />
|
||||
<img src="{concat($relPathTop, 'inherit.gif')}" alt="extended by "/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Displays the inheritance-tree of the current class -->
|
||||
<xsl:template name="htmlInheritedClassTree">
|
||||
<xsl:param name="path"/>
|
||||
<xsl:param name="relPathTop" />
|
||||
|
||||
<xsl:variable name="nbElement" select="count(exslt:node-set($path)/*)"/>
|
||||
<xsl:if test="$nbElement > 1"> <!-- no display if the class does not inherit from anything -->
|
||||
<dl class="classTree">
|
||||
<xsl:for-each select="exslt:node-set($path)/*">
|
||||
<xsl:sort select="position()" data-type="number" order="descending"/>
|
||||
<dd>
|
||||
<xsl:choose>
|
||||
<xsl:when test="position() > 1">
|
||||
<xsl:if test="position() = last()">
|
||||
<xsl:attribute name="class">currentElem</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:attribute name="style"><xsl:value-of select="concat('padding-left:',(position()-1)*30,'px')"/></xsl:attribute>
|
||||
<xsl:call-template name="htmlInherit">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
<xsl:choose>
|
||||
<xsl:when test="position() < $nbElement">
|
||||
<a href="{concat($relPathTop, @href)}"><xsl:value-of select="text()"/></a>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="text()"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</dd>
|
||||
</xsl:for-each>
|
||||
</dl>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="htmlStartPage">
|
||||
<xsl:attribute name="xmlns">http://www.w3.org/1999/xhtml</xsl:attribute>
|
||||
<xsl:attribute name="xml:lang">en</xsl:attribute>
|
||||
<xsl:attribute name="lang">en</xsl:attribute>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="htmlTableSummary">
|
||||
<xsl:param name="relPathTop"/>
|
||||
<xsl:param name="set" />
|
||||
<xsl:param name="filePrefix" />
|
||||
<table border="1" class="tableSummary">
|
||||
<xsl:for-each select="$set">
|
||||
<tr>
|
||||
<td><strong><a href="{concat($filePrefix, @name, '.html')}"><xsl:value-of select="@name"/></a></strong></td>
|
||||
<td><xsl:call-template name="titleComment"/></td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Displays the parameters of a function as a bracketed list (<ownedParameter...) -->
|
||||
<xsl:template name="htmlParametersBracket">
|
||||
<xsl:param name="relPathTop" />
|
||||
<xsl:text>(</xsl:text>
|
||||
<xsl:for-each select="ownedParameter[@direction!='return' or not(@direction)]">
|
||||
<xsl:call-template name="htmlType">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
<xsl:with-param name="context" select="."/>
|
||||
</xsl:call-template>
|
||||
<xsl:if test="@direction='inout'">&</xsl:if>
|
||||
<xsl:value-of select="@name" />
|
||||
<xsl:if test="defaultValue">
|
||||
<xsl:value-of select="concat('=', defaultValue/@value)"/>
|
||||
</xsl:if>
|
||||
<xsl:if test="position() < last()">
|
||||
<xsl:text>, </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:for-each>
|
||||
<xsl:text>)</xsl:text>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Displays a type as a hyperlink (<type xmi:idref="..."/>) -->
|
||||
<xsl:template name="htmlType">
|
||||
<xsl:param name="relPathTop" />
|
||||
<xsl:param name="context" />
|
||||
<xsl:variable name="idref" select="$context/type/@xmi:idref | $context/@type"/>
|
||||
<xsl:if test="$idref!=''">
|
||||
<xsl:variable name="typeElement" select="key('getElementById', $idref)"/>
|
||||
<xsl:call-template name="htmlLinkToElement">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
<xsl:with-param name="context" select="$typeElement"/>
|
||||
</xsl:call-template>
|
||||
<xsl:text> </xsl:text>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Displays the description/docblocks about a given element -->
|
||||
<xsl:template name="htmlDescription">
|
||||
<xsl:param name="baseElement"/>
|
||||
<xsl:variable name="docblocks" select="key('getMetadata', $baseElement)/*[local-name()!='param' and local-name()!='return' and local-name()!='access' and local-name()!='var']"/>
|
||||
|
||||
<xsl:for-each select="ownedComment">
|
||||
<xsl:value-of select="@body"/>
|
||||
<xsl:call-template name="br-replace">
|
||||
<xsl:with-param name="str" select="body/text()"/>
|
||||
</xsl:call-template>
|
||||
<div>
|
||||
<xsl:for-each select="$docblocks">
|
||||
<xsl:call-template name="htmlDocblock"/>
|
||||
</xsl:for-each>
|
||||
</div>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Displays the description/params. Used for method parameters detailing -->
|
||||
<xsl:template name="htmlDescriptionParam">
|
||||
<xsl:param name="baseElement"/>
|
||||
<xsl:variable name="docblocks" select="key('getMetadata', $baseElement)/*[local-name()='param' or local-name()='return']"/>
|
||||
|
||||
<xsl:for-each select="ownedComment">
|
||||
<p>
|
||||
<xsl:value-of select="@body"/>
|
||||
<xsl:call-template name="br-replace">
|
||||
<xsl:with-param name="str" select="body/text()"/>
|
||||
</xsl:call-template>
|
||||
</p>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Displays a docblock element (in general) -->
|
||||
<xsl:template name="htmlDocblock">
|
||||
<b>
|
||||
<xsl:call-template name="toUpperCase">
|
||||
<xsl:with-param name="str" select="substring(local-name(),1,1)"/>
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="concat(substring(local-name(),2), ': ')"/></b>
|
||||
<xsl:value-of select="text()"/>
|
||||
<xsl:copy-of select="*"/><br/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Displays a docblock param -->
|
||||
<xsl:template name="htmlDocblockParam">
|
||||
<xsl:value-of select="substring-after(substring-after(text(), ' '), ' ')"/>
|
||||
<xsl:copy-of select="*"/>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Replace breaklines by <br/> -->
|
||||
<xsl:template name="br-replace">
|
||||
<xsl:param name="str"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($str,$cr)">
|
||||
<xsl:value-of select="substring-before($str,$cr)"/>
|
||||
<br/>
|
||||
<xsl:call-template name="br-replace">
|
||||
<xsl:with-param name="str" select="substring-after($str,$cr)"/>
|
||||
</xsl:call-template>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$str"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<xsl:template name="htmlLinkToElement">
|
||||
<xsl:param name="relPathTop" />
|
||||
<xsl:param name="context" />
|
||||
<xsl:param name="style" select="string('linkType')"/>
|
||||
<xsl:variable name="path">
|
||||
<xsl:call-template name="getPackageFilePath">
|
||||
<xsl:with-param name="context" select="$context"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="getPrefix">
|
||||
<xsl:with-param name="context" select="$context"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<a href="{concat($relPathTop,$path,$context/@name,'.html')}" class="{$style}"><xsl:value-of select="$context/@name"/></a>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
@@ -0,0 +1,176 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<xsl:stylesheet version="1.0" exclude-result-prefixes="uml xmi php exslt exslt-set exslt-functions"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:uml="http://schema.omg.org/spec/UML/2.1.2"
|
||||
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
|
||||
xmlns:php="http://php.net/xsl"
|
||||
xmlns:exslt="http://exslt.org/common" xmlns:exslt-set="http://exslt.org/sets"
|
||||
xmlns:exslt-functions="http://exslt.org/functions">
|
||||
|
||||
<xsl:variable name="packageDelimiter">\</xsl:variable>
|
||||
<xsl:variable name="fileprefixDatatype">datatype-</xsl:variable>
|
||||
<xsl:variable name="fileprefixClass">class-</xsl:variable>
|
||||
<xsl:variable name="fileprefixInterface">interface-</xsl:variable>
|
||||
<xsl:variable name="fileAllclassesFrame">allclasses-frame.html</xsl:variable>
|
||||
<xsl:variable name="fileOverviewFrame">overview-frame.html</xsl:variable>
|
||||
<xsl:variable name="fileOverviewSummary">overview-summary.html</xsl:variable>
|
||||
<xsl:variable name="filePackageFrame">package-frame.html</xsl:variable>
|
||||
<xsl:variable name="filePackageSummary">package-summary.html</xsl:variable>
|
||||
<xsl:variable name="fileIndex">index.html</xsl:variable>
|
||||
<xsl:variable name="fileIndexAll">index-all.html</xsl:variable>
|
||||
<xsl:variable name="cr" select="'
'"/>
|
||||
|
||||
<xsl:include href="../common.xsl"/>
|
||||
|
||||
<xsl:template name="top-container">
|
||||
<xsl:call-template name="inner-container">
|
||||
<xsl:with-param name="relPathTop" />
|
||||
</xsl:call-template>
|
||||
|
||||
<xsl:variable name="containerSet" select="//packagedElement[@xmi:type='uml:Package' or @xmi:type='uml:Model']"/>
|
||||
|
||||
<!-- Generation of the overview-summary file -->
|
||||
<xsl:variable name="contentOverviewSummary">
|
||||
<xsl:call-template name="overview-summary">
|
||||
<xsl:with-param name="containerSet" select="$containerSet" />
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:copy-of select="php:function($phpSaveToFile, $fileOverviewSummary, exslt:node-set($contentOverviewSummary)/*)" />
|
||||
|
||||
<!-- Generation of the overview-frame file -->
|
||||
<xsl:variable name="contentOverviewFrame">
|
||||
<xsl:call-template name="overview-frame">
|
||||
<xsl:with-param name="containerSet" select="$containerSet" />
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:copy-of select="php:function($phpSaveToFile, $fileOverviewFrame, exslt:node-set($contentOverviewFrame)/*)" />
|
||||
|
||||
<!-- Generation of the allclasses file -->
|
||||
<xsl:variable name="contentAllclasses">
|
||||
<xsl:call-template name="allclasses" />
|
||||
</xsl:variable>
|
||||
<xsl:copy-of select="php:function($phpSaveToFile, $fileAllclassesFrame, exslt:node-set($contentAllclasses)/*)" />
|
||||
|
||||
<!-- Generation of the index file -->
|
||||
<xsl:variable name="contentIndex">
|
||||
<xsl:call-template name="index" />
|
||||
</xsl:variable>
|
||||
<xsl:copy-of select="php:function($phpSaveToFile, $fileIndex, exslt:node-set($contentIndex)/*)" />
|
||||
|
||||
<!-- Generation of the index-all file -->
|
||||
<xsl:variable name="contentIndexAll">
|
||||
<xsl:call-template name="index-all" />
|
||||
</xsl:variable>
|
||||
<xsl:copy-of select="php:function($phpSaveToFile, $fileIndexAll, exslt:node-set($contentIndexAll)/*)" />
|
||||
</xsl:template>
|
||||
|
||||
|
||||
<!-- Tree walking of containers (uml package/model) -->
|
||||
<xsl:template name="inner-container">
|
||||
<xsl:param name="relPathTop" /> <!-- relative path to root -->
|
||||
|
||||
<!-- Misc initializations -->
|
||||
<xsl:variable name="interfaceSet" select="packagedElement[@xmi:type='uml:Interface']" />
|
||||
<xsl:variable name="classSet" select="packagedElement[@xmi:type='uml:Class']"/>
|
||||
<xsl:variable name="ownedOperationSet" select="ownedOperation"/>
|
||||
<xsl:variable name="ownedAttributeSet" select="ownedAttribute"/>
|
||||
<xsl:variable name="packageNamePart">
|
||||
<xsl:call-template name="getPackageNamePart"/>
|
||||
</xsl:variable>
|
||||
|
||||
<!-- Generation of the package-summary file -->
|
||||
<xsl:variable name="contentSummary">
|
||||
<xsl:call-template name="package-summary">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
<xsl:with-param name="interfaceSet" select="$interfaceSet"/>
|
||||
<xsl:with-param name="classSet" select="$classSet"/>
|
||||
<xsl:with-param name="ownedAttributeSet" select="$ownedAttributeSet"/>
|
||||
<xsl:with-param name="ownedOperationSet" select="$ownedOperationSet"/>
|
||||
<xsl:with-param name="packageNamePart" select="$packageNamePart"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:copy-of select="php:function($phpSaveToFile, $filePackageSummary, exslt:node-set($contentSummary)/*)" />
|
||||
|
||||
<!-- Generation of the package-frame files -->
|
||||
<xsl:variable name="contentFrame">
|
||||
<xsl:call-template name="package-frame">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
<xsl:with-param name="interfaceSet" select="$interfaceSet"/>
|
||||
<xsl:with-param name="classSet" select="$classSet"/>
|
||||
<xsl:with-param name="ownedOperationSet" select="$ownedOperationSet"/>
|
||||
<xsl:with-param name="ownedAttributeSet" select="$ownedAttributeSet"/>
|
||||
<xsl:with-param name="packageNamePart" select="$packageNamePart"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:copy-of select="php:function($phpSaveToFile, $filePackageFrame, exslt:node-set($contentFrame)/*)" />
|
||||
|
||||
<!-- Generation of the classifier files -->
|
||||
<xsl:call-template name="generateClassifierFiles">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop" />
|
||||
<xsl:with-param name="setEntities" select="(packagedElement|nestedClassifier)[@xmi:type='uml:Interface' or @xmi:type='uml:Class' or @xmi:type='uml:DataType']"/>
|
||||
</xsl:call-template>
|
||||
|
||||
<!-- Recursion into the owned containers -->
|
||||
<xsl:for-each select="packagedElement[@xmi:type='uml:Package' or @xmi:type='uml:Model']">
|
||||
<!-- Creation of folders -->
|
||||
<xsl:copy-of select="php:function($phpCreateFolder, string(@name))" />
|
||||
<xsl:call-template name="inner-container">
|
||||
<xsl:with-param name="relPathTop" select="concat($relPathTop, '../')"/>
|
||||
</xsl:call-template>
|
||||
<xsl:copy-of select="php:functionString('chdir', '../')" />
|
||||
</xsl:for-each>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
<!-- Classifier entities handler -->
|
||||
<xsl:template name="generateClassifierFiles">
|
||||
<xsl:param name="relPathTop"/>
|
||||
<xsl:param name="setEntities"/>
|
||||
|
||||
<xsl:for-each select="$setEntities">
|
||||
<xsl:variable name="entity" select="substring-after(@xmi:type,':')"/>
|
||||
<xsl:variable name="xmiType" select="@xmi:type"/>
|
||||
<xsl:variable name="filePrefix">
|
||||
<xsl:call-template name="getPrefix"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="content">
|
||||
<xsl:call-template name="classifier">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop" />
|
||||
<xsl:with-param name="entity" select="$entity"/>
|
||||
<xsl:with-param name="nestingPackageName">
|
||||
<xsl:call-template name="getNestingPackageName">
|
||||
<xsl:with-param name="context" select="."/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
<xsl:with-param name="ownedAttributeSet" select="ownedAttribute"/>
|
||||
<xsl:with-param name="ownedOperationSet" select="ownedOperation"/>
|
||||
<xsl:with-param name="generalization" select="key('getElementById',generalization/@general)"/>
|
||||
<xsl:with-param name="implements" select="key('getElementById', key('getRealizations', current()/@xmi:id)/@supplier)"/>
|
||||
<xsl:with-param name="prevEntity" select="preceding-sibling::packagedElement[@xmi:type=$xmiType][1]/@name"/>
|
||||
<xsl:with-param name="nextEntity" select="following-sibling::packagedElement[@xmi:type=$xmiType][1]/@name"/>
|
||||
<xsl:with-param name="filePrefix" select="$filePrefix"/>
|
||||
<xsl:with-param name="relPathClass">
|
||||
<xsl:call-template name="getPackageFilePath">
|
||||
<xsl:with-param name="context" select="."/>
|
||||
</xsl:call-template>
|
||||
</xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:copy-of select="php:function($phpSaveToFile, string(concat($filePrefix, @name, '.html')), exslt:node-set($content)/*)" />
|
||||
|
||||
<!-- nested entities ? -->
|
||||
<xsl:variable name="setNestedEntities" select="(packagedElement|nestedClassifier)[@xmi:type='uml:Interface' or @xmi:type='uml:Class' or @xmi:type='uml:DataType']"/>
|
||||
<xsl:if test="count($setNestedEntities) > 0">
|
||||
<xsl:copy-of select="php:function($phpCreateFolder, string(@name))" />
|
||||
<xsl:call-template name="generateClassifierFiles">
|
||||
<xsl:with-param name="relPathTop" select="concat('../', $relPathTop)"/>
|
||||
<xsl:with-param name="setEntities" select="$setNestedEntities"/>
|
||||
</xsl:call-template>
|
||||
<xsl:copy-of select="php:functionString('chdir', '../')" />
|
||||
</xsl:if>
|
||||
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="xmi:Documentation"/>
|
||||
</xsl:stylesheet>
|
||||
173
database/php/pear/PHP/UML/Output/Html/index-all.xsl
Normal file
173
database/php/pear/PHP/UML/Output/Html/index-all.xsl
Normal file
@@ -0,0 +1,173 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<xsl:stylesheet version="1.0" exclude-result-prefixes="uml xmi exslt exslt-set exslt-functions"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:uml="http://schema.omg.org/spec/UML/2.1.2"
|
||||
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
|
||||
xmlns:exslt="http://exslt.org/common" xmlns:exslt-set="http://exslt.org/sets"
|
||||
xmlns:exslt-functions="http://exslt.org/functions">
|
||||
|
||||
<!-- Called on the top container. Lists all elements -->
|
||||
<xsl:template name="index-all">
|
||||
|
||||
<html>
|
||||
<xsl:call-template name="htmlStartPage"/>
|
||||
<xsl:call-template name="htmlHead">
|
||||
<xsl:with-param name="path" />
|
||||
<xsl:with-param name="title" select="concat(@name,' - Overview')"/>
|
||||
</xsl:call-template>
|
||||
<body>
|
||||
|
||||
<div id="navigation">
|
||||
<div id="banner">
|
||||
<ul class="sections">
|
||||
<li><a href="{$fileOverviewSummary}" title="Summary of all packages">Overview</a></li>
|
||||
<li>Package</li>
|
||||
<li>Class</li>
|
||||
<li class="active">Index</li>
|
||||
</ul>
|
||||
<ul class="navigFrame">
|
||||
<a href="{concat($fileIndex,'?',$fileIndexAll)}" class="navigFrameElem" target="_top">FRAMES</a>
|
||||
<a href="{$fileIndexAll}" class="navigFrameElem" target="_top">NO FRAMES</a>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<ul>
|
||||
<xsl:variable name="content">
|
||||
<xsl:call-template name="indexAllInnerContainer" mode="indexAll"/>
|
||||
</xsl:variable>
|
||||
<xsl:for-each select="exslt:node-set($content)/*">
|
||||
<xsl:sort select="text()"/>
|
||||
<li><a href="{@href}"><xsl:value-of select="text()"/></a>
|
||||
 - 
|
||||
<xsl:value-of select="comment/text()"/>
|
||||
<xsl:copy-of select="comment/a"/>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template name="indexAllInnerContainer">
|
||||
<xsl:for-each select="packagedElement[@xmi:type='uml:Package' or @xmi:type='uml:Model']">
|
||||
|
||||
<xsl:variable name="setEntities" select="(packagedElement|nestedClassifier)[@xmi:type='uml:Interface' or @xmi:type='uml:Class' or @xmi:type='uml:DataType']"/>
|
||||
<xsl:for-each select="$setEntities">
|
||||
<xsl:variable name="entityName" select="@name"/>
|
||||
<xsl:variable name="path">
|
||||
<xsl:call-template name="getPackageFilePath">
|
||||
<xsl:with-param name="context" select="."/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="fileName">
|
||||
<xsl:value-of select="$path"/>
|
||||
<xsl:call-template name="getPrefix"><xsl:with-param name="context" select="."/></xsl:call-template>
|
||||
<xsl:value-of select="concat(@name, '.html')"/>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="packageName">
|
||||
<xsl:call-template name="getPackageNamePart"/>
|
||||
</xsl:variable>
|
||||
<li>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="$fileName"/>
|
||||
</xsl:attribute>
|
||||
<comment>
|
||||
Class in
|
||||
<a href="{concat($path, $filePackageSummary)}"><xsl:value-of select="$packageName"/></a>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="titleComment"/>
|
||||
</comment>
|
||||
<xsl:value-of select="@name"/>
|
||||
</li>
|
||||
<xsl:for-each select="ownedAttribute">
|
||||
<li>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="concat($fileName, '#', @name)"/>
|
||||
</xsl:attribute>
|
||||
<comment>
|
||||
Variable in
|
||||
<xsl:value-of select="$packageName"/><a href="{$fileName}"><xsl:value-of select="$entityName"/></a>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="titleComment"/>
|
||||
</comment>
|
||||
<xsl:value-of select="@name"/>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="ownedOperation">
|
||||
<li>
|
||||
<xsl:variable name="parameters">
|
||||
<xsl:call-template name="htmlParametersBracket"/>
|
||||
</xsl:variable>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="concat($fileName, '#', @name, $parameters)"/>
|
||||
</xsl:attribute>
|
||||
<comment>
|
||||
Method in
|
||||
<xsl:value-of select="$packageName"/><a href="{$fileName}"><xsl:value-of select="$entityName"/></a>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="titleComment"/>
|
||||
</comment>
|
||||
<xsl:value-of select="@name"/>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</xsl:for-each>
|
||||
|
||||
|
||||
<xsl:call-template name="indexAllInnerContainer"/>
|
||||
</xsl:for-each>
|
||||
<!-- procedural elements -->
|
||||
<xsl:variable name="entityName" select="@name"/>
|
||||
<xsl:variable name="path">
|
||||
<xsl:call-template name="getPackageFilePath">
|
||||
<xsl:with-param name="context" select="."/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="fileName">
|
||||
<xsl:value-of select="$path"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="@xmi:type='uml:Model'">
|
||||
<xsl:value-of select="$fileOverviewSummary"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="concat(@name, '/', $filePackageSummary)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
<xsl:for-each select="ownedOperation">
|
||||
<li>
|
||||
<xsl:variable name="parameters">
|
||||
<xsl:call-template name="htmlParametersBracket"/>
|
||||
</xsl:variable>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="concat($fileName, '#', @name, $parameters)"/>
|
||||
</xsl:attribute>
|
||||
<comment>
|
||||
Method in
|
||||
<a href="{$fileName}"><xsl:value-of select="$entityName"/></a>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="titleComment"/>
|
||||
</comment>
|
||||
<xsl:value-of select="@name"/>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
<xsl:for-each select="ownedAttribute">
|
||||
<li>
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="concat($fileName, '#', @name)"/>
|
||||
</xsl:attribute>
|
||||
<comment>
|
||||
Constant in
|
||||
<a href="{$fileName}"><xsl:value-of select="$entityName"/></a>
|
||||
<xsl:text> </xsl:text>
|
||||
<xsl:call-template name="titleComment"/>
|
||||
</comment>
|
||||
<xsl:value-of select="@name"/>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
46
database/php/pear/PHP/UML/Output/Html/index.xsl
Normal file
46
database/php/pear/PHP/UML/Output/Html/index.xsl
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<xsl:stylesheet version="1.0" exclude-result-prefixes="uml xmi"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:uml="http://schema.omg.org/spec/UML/2.1.2"
|
||||
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1">
|
||||
|
||||
<xsl:template name="index">
|
||||
<xsl:param name="containerName" select="@name"/>
|
||||
<html>
|
||||
<xsl:call-template name="htmlStartPage"/>
|
||||
<xsl:call-template name="htmlHead">
|
||||
<xsl:with-param name="path" />
|
||||
<xsl:with-param name="title" select="concat($containerName, ' API Documentation')"/>
|
||||
</xsl:call-template>
|
||||
|
||||
<script type="text/javascript">
|
||||
<![CDATA[
|
||||
targetPage = "" + window.location.search;
|
||||
if (targetPage != "" && targetPage != "undefined")
|
||||
targetPage = targetPage.substring(1);
|
||||
function loadFrames() {
|
||||
if (targetPage != "" && targetPage != "undefined")
|
||||
top.classFrame.location = top.targetPage;
|
||||
}
|
||||
]]>
|
||||
</script>
|
||||
<frameset cols="20%,80%" title="" onLoad="top.loadFrames()">
|
||||
<frameset rows="30%,70%" title="" onLoad="top.loadFrames()">
|
||||
<frame src="overview-frame.html" name="packageListFrame" title="All Packages" />
|
||||
<frame src="allclasses-frame.html" name="packageFrame" title="All classes and interfaces (except non-static nested types)" />
|
||||
</frameset>
|
||||
<frame src="overview-summary.html" name="classFrame" title="Package, class and interface descriptions" scrolling="yes" />
|
||||
<noframes>
|
||||
<h2>Frame Alert</h2>
|
||||
<p>
|
||||
This document is designed to be viewed using the frames feature.
|
||||
If you see this message, you are using a non-frame-capable web client.<br/>
|
||||
Link to<a HREF="overview-summary.html">Non-frame version.</a>
|
||||
</p>
|
||||
</noframes>
|
||||
</frameset>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
21
database/php/pear/PHP/UML/Output/Html/main.xsl
Normal file
21
database/php/pear/PHP/UML/Output/Html/main.xsl
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
||||
|
||||
<!-- The starting template -->
|
||||
<xsl:include href="documentation-generator.xsl"/>
|
||||
|
||||
<!-- Some common templates for documentation generation -->
|
||||
<xsl:include href="documentation-common.xsl"/>
|
||||
|
||||
<!-- The user templates -->
|
||||
<xsl:include href="classifier.xsl"/>
|
||||
<xsl:include href="package-summary.xsl"/>
|
||||
<xsl:include href="overview-summary.xsl"/>
|
||||
<xsl:include href="overview-frame.xsl"/>
|
||||
<xsl:include href="allclasses-frame.xsl"/>
|
||||
<xsl:include href="package-frame.xsl"/>
|
||||
<xsl:include href="index.xsl"/>
|
||||
<xsl:include href="index-all.xsl"/>
|
||||
|
||||
</xsl:stylesheet>
|
||||
47
database/php/pear/PHP/UML/Output/Html/overview-frame.xsl
Normal file
47
database/php/pear/PHP/UML/Output/Html/overview-frame.xsl
Normal file
@@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<xsl:stylesheet version="1.0" exclude-result-prefixes="uml xmi"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:uml="http://schema.omg.org/spec/UML/2.1.2"
|
||||
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1">
|
||||
|
||||
<!-- Called on the top container. Lists all the container elements, in the left frame -->
|
||||
<xsl:template name="overview-frame">
|
||||
<xsl:param name="containerSet" />
|
||||
|
||||
<html>
|
||||
<xsl:call-template name="htmlStartPage"/>
|
||||
<xsl:call-template name="htmlHead">
|
||||
<xsl:with-param name="path" />
|
||||
<xsl:with-param name="title" select="concat(@name,' - Overview')"/>
|
||||
</xsl:call-template>
|
||||
<body>
|
||||
|
||||
<div id="contentFrame">
|
||||
<a href="{$fileAllclassesFrame}" target="packageFrame">All Classes</a>
|
||||
|
||||
<h3>Packages</h3>
|
||||
<ul>
|
||||
<xsl:for-each select="$containerSet">
|
||||
<li>
|
||||
<xsl:variable name="path">
|
||||
<xsl:call-template name="getPackageFilePath">
|
||||
<xsl:with-param name="context" select="."/>
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="@name"/>
|
||||
</xsl:variable>
|
||||
<a href="{concat('./', $path, '/', $filePackageFrame)}" target="packageFrame">
|
||||
<xsl:call-template name="getPackageNamePart"/>
|
||||
<xsl:value-of select="@name"/>
|
||||
</a>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
144
database/php/pear/PHP/UML/Output/Html/overview-summary.xsl
Normal file
144
database/php/pear/PHP/UML/Output/Html/overview-summary.xsl
Normal file
@@ -0,0 +1,144 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<xsl:stylesheet version="1.0" exclude-result-prefixes="uml xmi"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:uml="http://schema.omg.org/spec/UML/2.1.2"
|
||||
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1">
|
||||
|
||||
<!-- Called on the top container. Lists all the container elements (packages) -->
|
||||
<xsl:template name="overview-summary">
|
||||
<xsl:param name="containerSet"/>
|
||||
|
||||
<html>
|
||||
<xsl:call-template name="htmlStartPage"/>
|
||||
<xsl:call-template name="htmlHead">
|
||||
<xsl:with-param name="path" />
|
||||
<xsl:with-param name="title" select="concat(@name,' - Overview')"/>
|
||||
</xsl:call-template>
|
||||
<body>
|
||||
|
||||
<div id="navigation">
|
||||
<div id="banner">
|
||||
<ul class="sections">
|
||||
<li class="active">Overview</li>
|
||||
<li>Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="{$fileIndexAll}">Index</a></li>
|
||||
</ul>
|
||||
<ul class="navigFrame">
|
||||
<a href="{concat($fileIndex,'?',$fileOverviewSummary)}" class="navigFrameElem" target="_top">FRAMES</a>
|
||||
<xsl:text> </xsl:text>
|
||||
<a href="{$fileOverviewSummary}" class="navigFrameElem" target="_top">NO FRAMES</a>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="classSummary">
|
||||
<h1 id="entityName"><xsl:value-of select="@name" /></h1>
|
||||
</div>
|
||||
<p>
|
||||
<xsl:apply-templates select="ownedComment"/>
|
||||
</p>
|
||||
<hr/>
|
||||
<xsl:if test="count($containerSet) > 0">
|
||||
<h2>Packages</h2>
|
||||
<table border="1" class="tableSummary">
|
||||
<xsl:for-each select="$containerSet">
|
||||
<tr>
|
||||
<td>
|
||||
<xsl:variable name="path">
|
||||
<xsl:call-template name="getPackageFilePath">
|
||||
<xsl:with-param name="context" select="."/>
|
||||
</xsl:call-template>
|
||||
<xsl:value-of select="@name"/>
|
||||
</xsl:variable>
|
||||
<strong><a href="{concat('./', $path, '/', $filePackageSummary)}">
|
||||
<xsl:call-template name="getPackageNamePart"/>
|
||||
<xsl:value-of select="@name"/>
|
||||
</a></strong></td>
|
||||
<td>
|
||||
<xsl:call-template name="titleComment"/>
|
||||
</td>
|
||||
</tr>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</xsl:if>
|
||||
|
||||
<!-- added for the non-OO ("global") functions -->
|
||||
<xsl:variable name="interfaceSet" select="packagedElement[@xmi:type='uml:Interface']" />
|
||||
<xsl:variable name="classSet" select="packagedElement[@xmi:type='uml:Class']"/>
|
||||
<xsl:variable name="ownedOperationSet" select="ownedOperation"/>
|
||||
<xsl:variable name="ownedAttributeSet" select="ownedAttribute"/>
|
||||
<xsl:variable name="relPathTop"/>
|
||||
|
||||
<xsl:if test="count($interfaceSet) > 0">
|
||||
<h2>Interface summary</h2>
|
||||
<xsl:call-template name="htmlTableSummary">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
<xsl:with-param name="set" select="$interfaceSet"/>
|
||||
<xsl:with-param name="filePrefix" select="$fileprefixInterface"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="count($classSet) > 0">
|
||||
<h2>Class summary</h2>
|
||||
<xsl:call-template name="htmlTableSummary">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
<xsl:with-param name="set" select="$classSet"/>
|
||||
<xsl:with-param name="filePrefix" select="$fileprefixClass"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="count($ownedAttributeSet) > 0">
|
||||
<div id="fieldSummary">
|
||||
<h2>Field Summary</h2>
|
||||
<table border="1" class="tableSummary">
|
||||
<xsl:for-each select="$ownedAttributeSet">
|
||||
<xsl:call-template name="class-field-summary">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</div>
|
||||
</xsl:if>
|
||||
<xsl:if test="count($ownedOperationSet) > 0">
|
||||
<div id="methodSummary">
|
||||
<h2>Method Summary</h2>
|
||||
<table border="1" class="tableSummary">
|
||||
<xsl:for-each select="$ownedOperationSet">
|
||||
<xsl:call-template name="class-method-summary">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</div>
|
||||
</xsl:if>
|
||||
<xsl:if test="count($ownedAttributeSet) > 0">
|
||||
<div id="fieldDetail">
|
||||
<h2>Field Detail</h2>
|
||||
<xsl:for-each select="$ownedAttributeSet">
|
||||
<xsl:call-template name="class-field-detail">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
</div>
|
||||
</xsl:if>
|
||||
<xsl:if test="count($ownedOperationSet) > 0">
|
||||
<div id="methodDetail">
|
||||
<h2>Method Detail</h2>
|
||||
<xsl:for-each select="$ownedOperationSet">
|
||||
<xsl:call-template name="class-method-detail">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
<xsl:with-param name="specifiedBy" select="no"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
</div>
|
||||
</xsl:if>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
84
database/php/pear/PHP/UML/Output/Html/package-frame.xsl
Normal file
84
database/php/pear/PHP/UML/Output/Html/package-frame.xsl
Normal file
@@ -0,0 +1,84 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<xsl:stylesheet version="1.0" exclude-result-prefixes="uml xmi"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:uml="http://schema.omg.org/spec/UML/2.1.2"
|
||||
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1">
|
||||
|
||||
<xsl:template name="package-frame">
|
||||
<xsl:param name="relPathTop"/>
|
||||
<xsl:param name="classSet"/>
|
||||
<xsl:param name="interfaceSet"/>
|
||||
<xsl:param name="ownedOperationSet"/>
|
||||
<xsl:param name="ownedAttributeSet"/>
|
||||
<xsl:param name="packageNamePart"/>
|
||||
|
||||
<html>
|
||||
<xsl:call-template name="htmlStartPage"/>
|
||||
<xsl:call-template name="htmlHead">
|
||||
<xsl:with-param name="path" select="$relPathTop"/>
|
||||
<xsl:with-param name="title" select="concat($packageNamePart, @name)"/>
|
||||
</xsl:call-template>
|
||||
<body>
|
||||
|
||||
<div id="contentFrame">
|
||||
<h1>
|
||||
<a href="package-summary.html" target="classFrame">
|
||||
<xsl:value-of select="concat($packageNamePart, @name)" />
|
||||
</a>
|
||||
</h1>
|
||||
<xsl:if test="count($classSet) > 0">
|
||||
<h3>Classes</h3>
|
||||
<ul>
|
||||
<xsl:for-each select="$classSet">
|
||||
<xsl:sort select="@name" data-type="text"/>
|
||||
<li>
|
||||
<a href="{concat($fileprefixClass, @name,'.html')}" target="classFrame"><xsl:value-of select="@name"/></a>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</xsl:if>
|
||||
<xsl:if test="count($interfaceSet) > 0">
|
||||
<h3>Interfaces</h3>
|
||||
<ul>
|
||||
<xsl:for-each select="$interfaceSet">
|
||||
<xsl:sort select="@name" data-type="text"/>
|
||||
<li class="interfaceElement">
|
||||
<a href="{concat($fileprefixInterface, @name, '.html')}" target="classFrame"><xsl:value-of select="@name"/></a>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</xsl:if>
|
||||
<xsl:if test="count($ownedOperationSet) > 0">
|
||||
<h3>Functions</h3>
|
||||
<ul>
|
||||
<xsl:for-each select="$ownedOperationSet">
|
||||
<xsl:sort select="@name" data-type="text"/>
|
||||
<xsl:variable name="parameters">
|
||||
<xsl:call-template name="htmlParametersBracket">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<li>
|
||||
<a href="{concat('package-summary.html#', @name, $parameters)}" target="classFrame"><xsl:value-of select="@name"/></a>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</xsl:if>
|
||||
<xsl:if test="count($ownedAttributeSet) > 0">
|
||||
<h3>Constants</h3>
|
||||
<ul>
|
||||
<xsl:for-each select="$ownedAttributeSet">
|
||||
<xsl:sort select="@name" data-type="text"/>
|
||||
<li>
|
||||
<a href="{concat('package-summary.html#', @name)}" target="classFrame"><xsl:value-of select="@name"/></a>
|
||||
</li>
|
||||
</xsl:for-each>
|
||||
</ul>
|
||||
</xsl:if>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
148
database/php/pear/PHP/UML/Output/Html/package-summary.xsl
Normal file
148
database/php/pear/PHP/UML/Output/Html/package-summary.xsl
Normal file
@@ -0,0 +1,148 @@
|
||||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
|
||||
<xsl:stylesheet version="1.0" exclude-result-prefixes="uml xmi exslt exslt-set exslt-functions"
|
||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
xmlns:uml="http://schema.omg.org/spec/UML/2.1.2"
|
||||
xmlns:xmi="http://schema.omg.org/spec/XMI/2.1"
|
||||
xmlns:exslt="http://exslt.org/common" xmlns:exslt-set="http://exslt.org/sets"
|
||||
xmlns:exslt-functions="http://exslt.org/functions">
|
||||
|
||||
<xsl:template name="package-summary">
|
||||
<xsl:param name="relPathTop" />
|
||||
<xsl:param name="classSet"/>
|
||||
<xsl:param name="interfaceSet"/>
|
||||
<xsl:param name="ownedOperationSet" select="$ownedOperationSet"/>
|
||||
<xsl:param name="ownedAttributeSet" select="$ownedAttributeSet"/>
|
||||
<xsl:param name="packageNamePart"/>
|
||||
<xsl:param name="containerName"/>
|
||||
<xsl:variable name="packageFilePath">
|
||||
<xsl:call-template name="getPackageFilePath">
|
||||
<xsl:with-param name="context" select="."></xsl:with-param></xsl:call-template>
|
||||
</xsl:variable>
|
||||
<xsl:variable name="previousPreceding" select="(preceding::packagedElement|ancestor::packagedElement)[@xmi:type='uml:Package' or @xmi:type='uml:Model'][last()]"/>
|
||||
<xsl:variable name="nextFollowing" select="(descendant::packagedElement|following::packagedElement)[@xmi:type='uml:Package' or @xmi:type='uml:Model'][1]"/>
|
||||
|
||||
<html>
|
||||
<xsl:call-template name="htmlStartPage"/>
|
||||
<xsl:call-template name="htmlHead">
|
||||
<xsl:with-param name="path" select="$relPathTop"/>
|
||||
<xsl:with-param name="title" select="concat($packageNamePart, @name)"/>
|
||||
</xsl:call-template>
|
||||
<body>
|
||||
|
||||
<div id="navigation">
|
||||
<div id="banner">
|
||||
<ul class="sections">
|
||||
<li><a href="{$relPathTop}{$fileOverviewSummary}" title="Summary of all packages">Overview</a></li>
|
||||
<li class="active">Package</li>
|
||||
<li>Class</li>
|
||||
<li><a href="{$relPathTop}{$fileIndexAll}">Index</a></li>
|
||||
</ul>
|
||||
<ul class="navigFrame">
|
||||
<a href="{concat($relPathTop,$fileIndex,'?',$containerName,'/',$packageFilePath,$filePackageSummary)}" class="navigFrameElem" target="_top">FRAMES</a>
|
||||
<xsl:text> </xsl:text>
|
||||
<a href="{$filePackageSummary}" class="navigFrameElem" target="_top">NO FRAMES</a>
|
||||
</ul>
|
||||
</div>
|
||||
<ul class="siblingSections">
|
||||
<xsl:if test="count($previousPreceding) > 0">
|
||||
<xsl:variable name="path">
|
||||
<xsl:call-template name="getPackageFilePath">
|
||||
<xsl:with-param name="context" select="$previousPreceding/@name"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<li class="last"><a href="{concat($relPathTop, $path, $filePackageSummary)}">Prev Package</a></li>
|
||||
</xsl:if>
|
||||
<xsl:if test="count($nextFollowing) > 0">
|
||||
<xsl:variable name="path">
|
||||
<xsl:call-template name="getPackageFilePath">
|
||||
<xsl:with-param name="context" select="$nextFollowing/@name"/>
|
||||
</xsl:call-template>
|
||||
</xsl:variable>
|
||||
<li class="last"><a href="{concat($relPathTop, $path, $filePackageSummary)}">Next Package</a></li>
|
||||
</xsl:if>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div id="content">
|
||||
<div class="classSummary">
|
||||
<h1 id="entityName">Package <xsl:value-of select="concat($packageNamePart, @name)" /></h1>
|
||||
</div>
|
||||
<p>
|
||||
<xsl:call-template name="htmlDescription">
|
||||
<xsl:with-param name="baseElement" select="@xmi:id"/>
|
||||
</xsl:call-template>
|
||||
</p>
|
||||
<hr/>
|
||||
|
||||
<xsl:if test="count($interfaceSet) > 0">
|
||||
<h2>Interface summary</h2>
|
||||
<xsl:call-template name="htmlTableSummary">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
<xsl:with-param name="set" select="$interfaceSet"/>
|
||||
<xsl:with-param name="filePrefix" select="$fileprefixInterface"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="count($classSet) > 0">
|
||||
<h2>Class summary</h2>
|
||||
<xsl:call-template name="htmlTableSummary">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
<xsl:with-param name="set" select="$classSet"/>
|
||||
<xsl:with-param name="filePrefix" select="$fileprefixClass"/>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
|
||||
<!-- added for the non-OO functions -->
|
||||
<xsl:if test="count($ownedAttributeSet) > 0">
|
||||
<div id="fieldSummary">
|
||||
<h2>Field Summary</h2>
|
||||
<table border="1" class="tableSummary">
|
||||
<xsl:for-each select="$ownedAttributeSet">
|
||||
<xsl:call-template name="class-field-summary">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</div>
|
||||
</xsl:if>
|
||||
<xsl:if test="count($ownedOperationSet) > 0">
|
||||
<div id="methodSummary">
|
||||
<h2>Method Summary</h2>
|
||||
<table border="1" class="tableSummary">
|
||||
<xsl:for-each select="$ownedOperationSet">
|
||||
<xsl:call-template name="class-method-summary">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
</table>
|
||||
</div>
|
||||
</xsl:if>
|
||||
<xsl:if test="count($ownedAttributeSet) > 0">
|
||||
<div id="fieldDetail">
|
||||
<h2>Field Detail</h2>
|
||||
<xsl:for-each select="$ownedAttributeSet">
|
||||
<xsl:call-template name="class-field-detail">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
</div>
|
||||
</xsl:if>
|
||||
<xsl:if test="count($ownedOperationSet) > 0">
|
||||
<div id="methodDetail">
|
||||
<h2>Method Detail</h2>
|
||||
<xsl:for-each select="$ownedOperationSet">
|
||||
<xsl:call-template name="class-method-detail">
|
||||
<xsl:with-param name="relPathTop" select="$relPathTop"/>
|
||||
<xsl:with-param name="specifiedBy" select="no"/>
|
||||
</xsl:call-template>
|
||||
</xsl:for-each>
|
||||
</div>
|
||||
</xsl:if>
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
</xsl:template>
|
||||
|
||||
</xsl:stylesheet>
|
||||
BIN
database/php/pear/PHP/UML/Output/Html/resources/inherit.gif
Normal file
BIN
database/php/pear/PHP/UML/Output/Html/resources/inherit.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 65 B |
236
database/php/pear/PHP/UML/Output/Html/resources/style.css
Normal file
236
database/php/pear/PHP/UML/Output/Html/resources/style.css
Normal file
@@ -0,0 +1,236 @@
|
||||
body {
|
||||
margin: 0px;
|
||||
padding: 4px 3px 3px 3px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Titles
|
||||
*/
|
||||
h1 {
|
||||
font-size: 145%;
|
||||
}
|
||||
h1#entityName {
|
||||
padding:0px 0px 18px 0px;
|
||||
margin:0px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 145%;
|
||||
background-color:#CCCCFF;
|
||||
padding:3px 4px 5px 4px;
|
||||
margin:15px 0px 4px 0px;
|
||||
border:1px solid #333;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 95%;
|
||||
}
|
||||
|
||||
h3#entityPackage {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
font-size: 90%;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.detail h4 {
|
||||
margin:15px 3px 4px 3px;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Special for the left frames:
|
||||
*/
|
||||
div#contentFrame {
|
||||
padding:6px 0px 0px 3px;
|
||||
font-family: Arial,Verdana;
|
||||
font-size: 85%;
|
||||
}
|
||||
|
||||
div#contentFrame h1 {
|
||||
font-size: 100%;
|
||||
margin-bottom:2px;
|
||||
}
|
||||
|
||||
div#contentFrame h3 {
|
||||
font-size: 100%;
|
||||
margin-bottom:2px;
|
||||
font-weight:normal;
|
||||
}
|
||||
|
||||
div#contentFrame ul {
|
||||
list-style: none;
|
||||
padding:0px 0px 0px 3px;
|
||||
margin:0px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Navigation
|
||||
*/
|
||||
|
||||
#navigation {
|
||||
margin: 0px 3px 3px 3px;
|
||||
padding: 0px 0px 8px 0px;
|
||||
border-color: #ccc;
|
||||
border-width:0px 0px 1px 0px;
|
||||
border-style:solid;
|
||||
}
|
||||
|
||||
#banner {
|
||||
margin: 3px 0px;
|
||||
padding: 0px;
|
||||
background-color: #EEEEFF;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
ul.sections {
|
||||
list-style: none;
|
||||
margin: 2px 0px 4px 2px;
|
||||
padding: 0px;
|
||||
width: 300px;
|
||||
overflow: hidden;
|
||||
float: left;
|
||||
}
|
||||
|
||||
ul.sections li {
|
||||
display: inline;
|
||||
margin: 2px 2px 2px 2px;
|
||||
padding: 0px 2px;
|
||||
font-size: 100%;
|
||||
font-weight: normal;
|
||||
font-family: Arial,Verdana;
|
||||
color: #000;
|
||||
line-height:15pt;
|
||||
}
|
||||
|
||||
ul.sections li a {
|
||||
color:#000;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
ul.sections li.active {
|
||||
background-color: #44a;
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.siblingSections {
|
||||
list-style: none;
|
||||
margin: 0px;
|
||||
padding: 0px 3px 2px 1px;
|
||||
overflow: hidden;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.siblingSections li {
|
||||
display: inline;
|
||||
margin: 0px;
|
||||
padding: 0px 3px 4px 3px;
|
||||
font-size: 65%;
|
||||
text-transform: uppercase;
|
||||
font-family:Arial,Verdana;
|
||||
}
|
||||
|
||||
.navigFrame {
|
||||
display: block;
|
||||
margin: 6px 0px 0px 0px;
|
||||
padding: 0px;
|
||||
float: right;
|
||||
font-size: 65%;
|
||||
font-family: Arial,Verdana;
|
||||
}
|
||||
|
||||
a.navigFrameElem {
|
||||
padding-right:15px;
|
||||
}
|
||||
|
||||
/**
|
||||
* Main
|
||||
*/
|
||||
|
||||
hr {
|
||||
border-width:0px 0px 1px 0px;
|
||||
border-color:#ccc;
|
||||
border-style:solid;
|
||||
}
|
||||
|
||||
code, pre, .code {
|
||||
font-family: monospace;
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
|
||||
sup {
|
||||
font-size: 60%;
|
||||
}
|
||||
|
||||
dl.classTree {
|
||||
background-color:#f4f4f4;
|
||||
padding:5px;
|
||||
margin:0px 0px 10px 0px;
|
||||
border:1px solid #ccc;
|
||||
}
|
||||
|
||||
dl.classTree dd {
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
font-size: 90%;
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
dl.classTree .currentElem {
|
||||
font-weight:bold;
|
||||
}
|
||||
|
||||
|
||||
#content {
|
||||
clear: both;
|
||||
padding: 16px 0px 0px 5px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.tableSummary {
|
||||
border:1px solid #aaa;
|
||||
border-collapse:collapse;
|
||||
font-size:1em;
|
||||
}
|
||||
.tableSummary td {
|
||||
border:1px solid #aaa;
|
||||
margin:0px;
|
||||
padding:2px 3px;
|
||||
font-size:1em;
|
||||
}
|
||||
|
||||
a.linkSummary, a.linkSummary:visited, a.linkSummary:link {
|
||||
font-weight:bold;
|
||||
text-decoration:underline;
|
||||
}
|
||||
|
||||
a.linkType, a.linkType:visited, a.linkType:link {
|
||||
font-weight:normal;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
a.linkSimple, a.linkSimple:visited, a.linkSimple:link {
|
||||
font-weight:normal;
|
||||
text-decoration:underline;
|
||||
}
|
||||
|
||||
.detailContent {
|
||||
background-color:#f4f4f4;
|
||||
padding:5px;
|
||||
margin:0px;
|
||||
border:1px solid #ccc;
|
||||
}
|
||||
|
||||
h3.titleSmallList {
|
||||
font-weight: bold;
|
||||
padding:0px 0px 0px 0px;
|
||||
margin:0px;
|
||||
}
|
||||
|
||||
div.smallList {
|
||||
padding:0px 0px 10px 25px;
|
||||
margin:0px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user