the left side nav comes from an xml file in xdocs/stylesheets.
Robert Koberg wrote:
Here is an XSL that should transform the xdocs. I took a quick look at
the user docs xdoc and the source of the rendered page. I did not see
where the left menu/nav came from. I assume it is just well formed html
and can be included as is shown in the XSL below (does this look painful
:). If the source XML was in its own directory, you could just use ant's
Xslt task to transform the site:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output encoding="UTF-8" indent="yes" method="html"/>
<!-- Identity template - copies stuff not overridden below -->
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
<!-- basic page layout -->
<xsl:template match="/">
<html>
<head>
<title>
<xsl:value-of select="document/properties/title"/>
</title>
<meta name="author" value="Velocity Documentation Team"/>
<link rel="stylesheet"
href="http://jakarta.apache.org/velocity/site.css" type="text/css"/>
<link rel="stylesheet" href="./site.css" type="text/css"/>
</head>
<body>
<div id="container">
<div id="header">
<div id="logo1">
<a href="http://jakarta.apache.org">
<img
src="http://jakarta.apache.org/images/jakarta-logo.gif" border="0"/>
</a>
</div>
<div id="logo2">
<a href="http://jakarta.apache.org/velocity/">
<img src="./images/newlogo.png" alt="Velocity" border="0"/>
</a>
</div>
<div class="menusection">
<span class="menuheader">Velocity</span>
<!-- copy in the nav -->
<xsl:apply-templates select="document('nav.xml')"/>
</div>
<!-- fill in body content -->
<xsl:apply-templates select="document/body"/>
</div>
</div>
</body>
</html>
</xsl:template>
<!-- override identity transformation -->
<xsl:template match="section | subsection">
<div id="[EMAIL PROTECTED]" class="{local-name()}">
<xsl:choose>
<xsl:when test="local-name()='section'">
<h2>
<xsl:value-of select="@name"/>
</h2>
</xsl:when>
<xsl:when test="local-name()='subsection'">
<h3>
<xsl:value-of select="@name"/>
</h3>
</xsl:when>
<xsl:otherwise>
<strong style="color:red">Have not accounted for elements
name: <xsl:value-of select="local-name()"/></strong>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="source">
<pre>
<xsl:apply-templates/>
</pre>
</xsl:template>
</xsl:stylesheet>
Nathan Bubna wrote:
On 3/6/06, Mike Kienenberger <[EMAIL PROTECTED]> wrote:
On 3/5/06, Nathan Bubna <[EMAIL PROTECTED]> wrote:
any great ideas for a new doc tool? anyone know much about APT?
[First off, I've only glanced at some converted APT documents.]
We started converting from xdocs to apt for MyFaces, but I think we're
going to abandon that effort. apt is more like a wiki markup -- once
you convert to it, there's no XML transformation to convert to another
format if you change your methodology.
There's also been reports that there are limitations on what you can
do with apt (again, like a wiki.)
I'd recommend keeping the docs in an xml format -- documentation
standards seem to change every year.
very good advice. between this and the option to use Anakia, i think
we'll be keeping them basically as they are, just adapting the
transformation process as needed.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]