Author: jonpryor
Date: 2008-01-02 16:38:48 -0500 (Wed, 02 Jan 2008)
New Revision: 92130
Added:
trunk/monodoc/tools/DocTest/en.expected.importslashdoc/NoNamespace.xml
trunk/monodoc/tools/DocTest/en.expected.importslashdoc/ns-.xml
trunk/monodoc/tools/DocTest/en.expected.since/NoNamespace.xml
trunk/monodoc/tools/DocTest/en.expected.since/ns-.xml
trunk/monodoc/tools/DocTest/en.expected/NoNamespace.xml
trunk/monodoc/tools/DocTest/en.expected/ns-.xml
trunk/monodoc/tools/DocTest/html.expected/NoNamespace.html
Modified:
trunk/monodoc/tools/ChangeLog
trunk/monodoc/tools/DocTest-v1.cs
trunk/monodoc/tools/DocTest/en.expected.importslashdoc/index.xml
trunk/monodoc/tools/DocTest/en.expected.since/index.xml
trunk/monodoc/tools/DocTest/en.expected/index.xml
trunk/monodoc/tools/DocTest/html.expected/Mono.DocTest.Generic/index.html
trunk/monodoc/tools/DocTest/html.expected/Mono.DocTest/index.html
trunk/monodoc/tools/DocTest/html.expected/System/index.html
trunk/monodoc/tools/DocTest/html.expected/index.html
trunk/monodoc/tools/monodocer.cs
trunk/monodoc/tools/overview.xsl
Log:
* DocTest-v1.cs: Add a type to the root namespace.
* monodocer.cs: Permit types to exist in the root namespace. This is
needed
to properly document ../class/Npgsql, though I have no idea how
`monodoc'
will actually display these types...
* overview.xsl: Support types within the root namespace.
* DocTest/en.expected/index.xml, DocTest/en.expected.since/index.xml,
DocTest/en.expected.importslashdoc/index.xml,
DocTest/html.expected/System/index.html,
DocTest/html.expected/Mono.DocTest.Generic/index.html,
DocTest/html.expected/index.html,
DocTest/html.expected/Mono.DocTest/index.html: Flush.
* DocTest/en.expected/NoNamespace.xml,
DocTest/en.expected/ns-.xml,
DocTest/en.expected.importslashdoc/NoNamespace.xml,
DocTest/en.expected.importslashdoc/ns-.xml,
DocTest/en.expected.since/NoNamespace.xml,
DocTest/en.expected.since/ns-.xml,
DocTest/html.expected/NoNamespace.html: Added.
Modified: trunk/monodoc/tools/ChangeLog
===================================================================
--- trunk/monodoc/tools/ChangeLog 2008-01-02 21:30:52 UTC (rev 92129)
+++ trunk/monodoc/tools/ChangeLog 2008-01-02 21:38:48 UTC (rev 92130)
@@ -1,5 +1,26 @@
2008-01-02 Jonathan Pryor <[EMAIL PROTECTED]>
+ * DocTest-v1.cs: Add a type to the root namespace.
+ * monodocer.cs: Permit types to exist in the root namespace. This is
needed
+ to properly document ../class/Npgsql, though I have no idea how
`monodoc'
+ will actually display these types...
+ * overview.xsl: Support types within the root namespace.
+ * DocTest/en.expected/index.xml, DocTest/en.expected.since/index.xml,
+ DocTest/en.expected.importslashdoc/index.xml,
+ DocTest/html.expected/System/index.html,
+ DocTest/html.expected/Mono.DocTest.Generic/index.html,
+ DocTest/html.expected/index.html,
+ DocTest/html.expected/Mono.DocTest/index.html: Flush.
+ * DocTest/en.expected/NoNamespace.xml,
+ DocTest/en.expected/ns-.xml,
+ DocTest/en.expected.importslashdoc/NoNamespace.xml,
+ DocTest/en.expected.importslashdoc/ns-.xml,
+ DocTest/en.expected.since/NoNamespace.xml,
+ DocTest/en.expected.since/ns-.xml,
+ DocTest/html.expected/NoNamespace.html: Added.
+
+2008-01-02 Jonathan Pryor <[EMAIL PROTECTED]>
+
* monodocer.cs:
- Write namespace files as 'ns-<Namespace>.xml', not
'<Namespace>.xml', as
the previous behavior would break monodoc checkout on Win32 (due to
dir
Added: trunk/monodoc/tools/DocTest/en.expected/NoNamespace.xml
===================================================================
--- trunk/monodoc/tools/DocTest/en.expected/NoNamespace.xml 2008-01-02
21:30:52 UTC (rev 92129)
+++ trunk/monodoc/tools/DocTest/en.expected/NoNamespace.xml 2008-01-02
21:38:48 UTC (rev 92130)
@@ -0,0 +1,29 @@
+<Type Name="NoNamespace" FullName="NoNamespace">
+ <TypeSignature Language="C#" Value="public class NoNamespace" />
+ <AssemblyInfo>
+ <AssemblyName>DocTest</AssemblyName>
+ <AssemblyVersion>0.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <Base>
+ <BaseTypeName>System.Object</BaseTypeName>
+ </Base>
+ <Interfaces />
+ <Docs>
+ <summary>To be added.</summary>
+ <remarks>To be added.</remarks>
+ </Docs>
+ <Members>
+ <Member MemberName=".ctor">
+ <MemberSignature Language="C#" Value="public NoNamespace ();" />
+ <MemberType>Constructor</MemberType>
+ <AssemblyInfo>
+ <AssemblyVersion>0.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <Parameters />
+ <Docs>
+ <summary>To be added.</summary>
+ <remarks>To be added.</remarks>
+ </Docs>
+ </Member>
+ </Members>
+</Type>
Modified: trunk/monodoc/tools/DocTest/en.expected/index.xml
===================================================================
--- trunk/monodoc/tools/DocTest/en.expected/index.xml 2008-01-02 21:30:52 UTC
(rev 92129)
+++ trunk/monodoc/tools/DocTest/en.expected/index.xml 2008-01-02 21:38:48 UTC
(rev 92130)
@@ -11,6 +11,9 @@
<Remarks>To be added.</Remarks>
<Copyright>To be added.</Copyright>
<Types>
+ <Namespace Name="">
+ <Type Name="NoNamespace" />
+ </Namespace>
<Namespace Name="Mono.DocTest">
<Type Name="Color" />
<Type Name="DocAttribute" />
Added: trunk/monodoc/tools/DocTest/en.expected/ns-.xml
===================================================================
--- trunk/monodoc/tools/DocTest/en.expected/ns-.xml 2008-01-02 21:30:52 UTC
(rev 92129)
+++ trunk/monodoc/tools/DocTest/en.expected/ns-.xml 2008-01-02 21:38:48 UTC
(rev 92130)
@@ -0,0 +1,6 @@
+<Namespace Name="">
+ <Docs>
+ <summary>To be added.</summary>
+ <remarks>To be added.</remarks>
+ </Docs>
+</Namespace>
Added: trunk/monodoc/tools/DocTest/en.expected.importslashdoc/NoNamespace.xml
===================================================================
--- trunk/monodoc/tools/DocTest/en.expected.importslashdoc/NoNamespace.xml
2008-01-02 21:30:52 UTC (rev 92129)
+++ trunk/monodoc/tools/DocTest/en.expected.importslashdoc/NoNamespace.xml
2008-01-02 21:38:48 UTC (rev 92130)
@@ -0,0 +1,29 @@
+<Type Name="NoNamespace" FullName="NoNamespace">
+ <TypeSignature Language="C#" Value="public class NoNamespace" />
+ <AssemblyInfo>
+ <AssemblyName>DocTest</AssemblyName>
+ <AssemblyVersion>0.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <Base>
+ <BaseTypeName>System.Object</BaseTypeName>
+ </Base>
+ <Interfaces />
+ <Docs>
+ <summary>To be added.</summary>
+ <remarks>To be added.</remarks>
+ </Docs>
+ <Members>
+ <Member MemberName=".ctor">
+ <MemberSignature Language="C#" Value="public NoNamespace ();" />
+ <MemberType>Constructor</MemberType>
+ <AssemblyInfo>
+ <AssemblyVersion>0.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <Parameters />
+ <Docs>
+ <summary>To be added.</summary>
+ <remarks>To be added.</remarks>
+ </Docs>
+ </Member>
+ </Members>
+</Type>
Modified: trunk/monodoc/tools/DocTest/en.expected.importslashdoc/index.xml
===================================================================
--- trunk/monodoc/tools/DocTest/en.expected.importslashdoc/index.xml
2008-01-02 21:30:52 UTC (rev 92129)
+++ trunk/monodoc/tools/DocTest/en.expected.importslashdoc/index.xml
2008-01-02 21:38:48 UTC (rev 92130)
@@ -11,6 +11,9 @@
<Remarks>To be added.</Remarks>
<Copyright>To be added.</Copyright>
<Types>
+ <Namespace Name="">
+ <Type Name="NoNamespace" />
+ </Namespace>
<Namespace Name="Mono.DocTest">
<Type Name="Color" />
<Type Name="DocAttribute" />
Added: trunk/monodoc/tools/DocTest/en.expected.importslashdoc/ns-.xml
===================================================================
--- trunk/monodoc/tools/DocTest/en.expected.importslashdoc/ns-.xml
2008-01-02 21:30:52 UTC (rev 92129)
+++ trunk/monodoc/tools/DocTest/en.expected.importslashdoc/ns-.xml
2008-01-02 21:38:48 UTC (rev 92130)
@@ -0,0 +1,6 @@
+<Namespace Name="">
+ <Docs>
+ <summary>To be added.</summary>
+ <remarks>To be added.</remarks>
+ </Docs>
+</Namespace>
Added: trunk/monodoc/tools/DocTest/en.expected.since/NoNamespace.xml
===================================================================
--- trunk/monodoc/tools/DocTest/en.expected.since/NoNamespace.xml
2008-01-02 21:30:52 UTC (rev 92129)
+++ trunk/monodoc/tools/DocTest/en.expected.since/NoNamespace.xml
2008-01-02 21:38:48 UTC (rev 92130)
@@ -0,0 +1,31 @@
+<Type Name="NoNamespace" FullName="NoNamespace">
+ <TypeSignature Language="C#" Value="public class NoNamespace" />
+ <AssemblyInfo>
+ <AssemblyName>DocTest</AssemblyName>
+ <AssemblyVersion>0.0.0.0</AssemblyVersion>
+ <AssemblyVersion>2.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <Base>
+ <BaseTypeName>System.Object</BaseTypeName>
+ </Base>
+ <Interfaces />
+ <Docs>
+ <summary>To be added.</summary>
+ <remarks>To be added.</remarks>
+ </Docs>
+ <Members>
+ <Member MemberName=".ctor">
+ <MemberSignature Language="C#" Value="public NoNamespace ();" />
+ <MemberType>Constructor</MemberType>
+ <AssemblyInfo>
+ <AssemblyVersion>0.0.0.0</AssemblyVersion>
+ <AssemblyVersion>2.0.0.0</AssemblyVersion>
+ </AssemblyInfo>
+ <Parameters />
+ <Docs>
+ <summary>To be added.</summary>
+ <remarks>To be added.</remarks>
+ </Docs>
+ </Member>
+ </Members>
+</Type>
Modified: trunk/monodoc/tools/DocTest/en.expected.since/index.xml
===================================================================
--- trunk/monodoc/tools/DocTest/en.expected.since/index.xml 2008-01-02
21:30:52 UTC (rev 92129)
+++ trunk/monodoc/tools/DocTest/en.expected.since/index.xml 2008-01-02
21:38:48 UTC (rev 92130)
@@ -11,6 +11,9 @@
<Remarks>To be added.</Remarks>
<Copyright>To be added.</Copyright>
<Types>
+ <Namespace Name="">
+ <Type Name="NoNamespace" />
+ </Namespace>
<Namespace Name="Mono.DocTest">
<Type Name="AddedType" />
<Type Name="Color" />
Added: trunk/monodoc/tools/DocTest/en.expected.since/ns-.xml
===================================================================
--- trunk/monodoc/tools/DocTest/en.expected.since/ns-.xml 2008-01-02
21:30:52 UTC (rev 92129)
+++ trunk/monodoc/tools/DocTest/en.expected.since/ns-.xml 2008-01-02
21:38:48 UTC (rev 92130)
@@ -0,0 +1,6 @@
+<Namespace Name="">
+ <Docs>
+ <summary>To be added.</summary>
+ <remarks>To be added.</remarks>
+ </Docs>
+</Namespace>
Modified: trunk/monodoc/tools/DocTest/html.expected/Mono.DocTest/index.html
===================================================================
--- trunk/monodoc/tools/DocTest/html.expected/Mono.DocTest/index.html
2008-01-02 21:30:52 UTC (rev 92129)
+++ trunk/monodoc/tools/DocTest/html.expected/Mono.DocTest/index.html
2008-01-02 21:38:48 UTC (rev 92130)
@@ -39,8 +39,7 @@
<div class="CollectionTitle">
<a href="../index.html">DocTest</a>
</div>
- <h1 class="PageTitle">Mono.DocTest Namespace
- </h1>
+ <h1 class="PageTitle">Mono.DocTest Namespace</h1>
<p class="Summary">
</p>
<div class="Signature">
Modified:
trunk/monodoc/tools/DocTest/html.expected/Mono.DocTest.Generic/index.html
===================================================================
--- trunk/monodoc/tools/DocTest/html.expected/Mono.DocTest.Generic/index.html
2008-01-02 21:30:52 UTC (rev 92129)
+++ trunk/monodoc/tools/DocTest/html.expected/Mono.DocTest.Generic/index.html
2008-01-02 21:38:48 UTC (rev 92130)
@@ -39,8 +39,7 @@
<div class="CollectionTitle">
<a href="../index.html">DocTest</a>
</div>
- <h1 class="PageTitle">Mono.DocTest.Generic Namespace
- </h1>
+ <h1 class="PageTitle">Mono.DocTest.Generic Namespace</h1>
<p class="Summary">
</p>
<div class="Signature">
Added: trunk/monodoc/tools/DocTest/html.expected/NoNamespace.html
===================================================================
--- trunk/monodoc/tools/DocTest/html.expected/NoNamespace.html 2008-01-02
21:30:52 UTC (rev 92129)
+++ trunk/monodoc/tools/DocTest/html.expected/NoNamespace.html 2008-01-02
21:38:48 UTC (rev 92130)
@@ -0,0 +1,105 @@
+<html>
+ <head>
+ <title>NoNamespace</title>
+ <style>
+ a { text-decoration: none }
+
+ .CollectionTitle { font-weight: bold }
+ .PageTitle { font-size: 150%;
font-weight: bold }
+
+ .Summary { }
+ .Signature { }
+ .Remarks { }
+ .Members { }
+ .Copyright { }
+
+ .Section { font-size: 125%;
font-weight: bold }
+ .SectionBox { margin-left: 2em }
+ .NamespaceName { font-size: 105%;
font-weight: bold }
+ .NamespaceSumary { }
+ .MemberName { font-size: 115%;
font-weight: bold; margin-top: 1em }
+ .MemberSignature { font-family:
monospace; margin-top: 1em; }
+ .MemberBox { }
+ .Subsection { font-size: 105%;
font-weight: bold }
+ .SubsectionBox { margin-left: 2em;
margin-bottom: 1em }
+
+ .SignatureTable { background-color:
#c0c0c0; }
+ .EnumerationsTable th {
background-color: #f2f2f2; }
+ .CodeExampleTable { background-color:
#f5f5dd; border: thin solid black; padding: .25em; }
+
+ .MembersListing td { margin: 0px;
border: 1px solid black; padding: .25em }
+
+ .TypesListing td { margin: 0px;
padding: .25em }
+ .InnerSignatureTable tr {
background-color: #f2f2f2; }
+ .TypePermissionsTable tr {
background-color: #f2f2f2; }
+
+ </style>
+ </head>
+ <body>
+ <div class="CollectionTitle">
+ <a href="../index.html">DocTest</a>
+ :
+ <a href="index.html"> Namespace</a></div>
+ <h1 class="PageTitle">NoNamespace Class</h1>
+ <p class="Summary">To be added.</p>
+ <div class="Signature">
+ <table class="SignatureTable" cellspacing="0" width="100%">
+ <tr>
+ <td>
+ <table class="InnerSignatureTable" cellpadding="10"
cellspacing="0" width="100%">
+ <tr>
+ <td>public class <b>NoNamespace</b></td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ </table>
+ <br>
+ </br>
+ </div>
+ <div class="Remarks">
+ <h4 class="Subsection">Remarks</h4>
+ <div class="SubsectionBox">To be added.</div>
+ <h2 class="Section">Members</h2>
+ <div class="SectionBox">
+ <p>
+ See Also: Inherited members from
+ <a
href="http://www.go-mono.com/docs/monodoc.ashx?link=T:System.Object">object</a>.
+ </p>
+ <h3>Constructors</h3>
+ <div class="SubsectionBox">
+ <table class="MembersListing">
+ <tr valign="top">
+ <td>
+ <div>
+ <b>
+ <a href="#C:NoNamespace">NoNamespace</a>
+ </b>()</div>To be added.</td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div class="Members">
+ <h2 class="Section">Member Details</h2>
+ <div class="SectionBox">
+ <h3 id="C:NoNamespace" class="MemberName">NoNamespace Constructor</h3>
+ <div class="MemberSignature">public <b>NoNamespace</b> ()</div>
+ <div class="MemberBox">
+ <p>To be added.</p>
+ <h4 class="Subsection">Remarks</h4>
+ <div class="SubsectionBox">To be added.</div>
+ <h4 class="Subsection">Required Assembly Versions:</h4>
+ <ul>
+ <li>DocTest 0.0.0.0</li>
+ </ul>
+ <hr size="1">
+ </hr>
+ </div>
+ </div>
+ </div>
+ <hr size="1" />
+ <div class="Copyright">
+ </div>
+ </body>
+</html>
\ No newline at end of file
Modified: trunk/monodoc/tools/DocTest/html.expected/System/index.html
===================================================================
--- trunk/monodoc/tools/DocTest/html.expected/System/index.html 2008-01-02
21:30:52 UTC (rev 92129)
+++ trunk/monodoc/tools/DocTest/html.expected/System/index.html 2008-01-02
21:38:48 UTC (rev 92130)
@@ -39,8 +39,7 @@
<div class="CollectionTitle">
<a href="../index.html">DocTest</a>
</div>
- <h1 class="PageTitle">System Namespace
- </h1>
+ <h1 class="PageTitle">System Namespace</h1>
<p class="Summary">
</p>
<div class="Signature">
Modified: trunk/monodoc/tools/DocTest/html.expected/index.html
===================================================================
--- trunk/monodoc/tools/DocTest/html.expected/index.html 2008-01-02
21:30:52 UTC (rev 92129)
+++ trunk/monodoc/tools/DocTest/html.expected/index.html 2008-01-02
21:38:48 UTC (rev 92130)
@@ -45,6 +45,20 @@
<div class="Signature">
</div>
<div class="Remarks">
+ <h2 class="Section">Root Namespace</h2>
+ <p>To be added.</p>
+ <table class="TypesListing" style="margin-top: 1em">
+ <tr>
+ <th>Type</th>
+ <th>Description</th>
+ </tr>
+ <tr valign="top">
+ <td>
+ <a href="./NoNamespace.html">NoNamespace</a>
+ </td>
+ <td>To be added.</td>
+ </tr>
+ </table>
<h2 class="Section">
<a href="Mono.DocTest/index.html">Mono.DocTest Namespace</a>
</h2>
Modified: trunk/monodoc/tools/DocTest-v1.cs
===================================================================
--- trunk/monodoc/tools/DocTest-v1.cs 2008-01-02 21:30:52 UTC (rev 92129)
+++ trunk/monodoc/tools/DocTest-v1.cs 2008-01-02 21:38:48 UTC (rev 92130)
@@ -2,6 +2,8 @@
using System.Collections;
using System.Collections.Generic;
+public class NoNamespace {}
+
namespace System {
/*
* The System namespace gets special treatment, e.g. instead of
Modified: trunk/monodoc/tools/monodocer.cs
===================================================================
--- trunk/monodoc/tools/monodocer.cs 2008-01-02 21:30:52 UTC (rev 92129)
+++ trunk/monodoc/tools/monodocer.cs 2008-01-02 21:38:48 UTC (rev 92130)
@@ -173,7 +173,8 @@
if (opts.type != null && opts.type.Length > 0)
DoUpdateTypes(opts.path, opts.type, dest_dir);
else if ([EMAIL PROTECTED] != null)
- DoUpdateNS([EMAIL PROTECTED], opts.path + "/" +
[EMAIL PROTECTED], dest_dir + [EMAIL PROTECTED]);
+ DoUpdateNS ([EMAIL PROTECTED], Path.Combine
(opts.path, [EMAIL PROTECTED]),
+ Path.Combine (dest_dir, [EMAIL
PROTECTED]));
else
DoUpdateAssemblies(opts.path, dest_dir);
@@ -347,14 +348,15 @@
public static string DoUpdateType(Type type, string basepath, string
dest, XmlReader ecmaDocsType)
{
if (type.Namespace == null)
- throw new InvalidOperationException ("Types in the root
namespace cannot be documented: " + type.FullName);
+ Error ("warning: The type `{0}' is in the root
namespace. This may cause problems with display within monodoc.",
+ type.FullName);
if (!IsPublic (type))
return null;
// Must get the A+B form of the type name.
string typename = GetTypeFileName(type);
- string reltypefile = type.Namespace + "/" + typename + ".xml";
+ string reltypefile = DocUtils.PathCombine (type.Namespace,
typename + ".xml");
string typefile = Path.Combine (basepath, reltypefile);
System.IO.FileInfo file = new System.IO.FileInfo(basepath + "/"
+ reltypefile);
@@ -384,7 +386,7 @@
if (td == null)
return null;
- System.IO.DirectoryInfo dir = new
System.IO.DirectoryInfo(dest + "/" + type.Namespace);
+ System.IO.DirectoryInfo dir = new
System.IO.DirectoryInfo (DocUtils.PathCombine (dest, type.Namespace));
if (!dir.Exists) {
dir.Create();
Console.WriteLine("Namespace Directory Created:
" + type.Namespace);
@@ -436,7 +438,6 @@
// Stub types not in the directory
foreach (DocsTypeInfo docsTypeInfo in GetTypes (assembly,
null)) {
Type type = docsTypeInfo.Type;
- if (type.Namespace == null) continue;
if (type.Namespace != ns || seenTypes.ContainsKey(type))
continue;
@@ -569,8 +570,8 @@
typenode.RemoveAttribute("DisplayName");
// Ensure the namespace index file exists
- string onsdoc = Path.Combine (dest, type.Namespace +
".xml");
- string nsdoc = Path.Combine (dest, "ns-" +
type.Namespace + ".xml");
+ string onsdoc = DocUtils.PathCombine (dest,
type.Namespace + ".xml");
+ string nsdoc = DocUtils.PathCombine (dest, "ns-" +
type.Namespace + ".xml");
if (File.Exists (onsdoc)) {
File.Move (onsdoc, nsdoc);
}
@@ -753,7 +754,7 @@
{
// Look for type nodes that no longer correspond to types
foreach (XmlElement typenode in
index_types.SelectNodes("Namespace/Type")) {
- string fulltypename =
((XmlElement)typenode.ParentNode).GetAttribute("Name") + "/" +
typenode.GetAttribute("Name") + ".xml";
+ string fulltypename = Path.Combine
(((XmlElement)typenode.ParentNode).GetAttribute("Name"),
typenode.GetAttribute("Name") + ".xml");
if (!goodfiles.ContainsKey(fulltypename))
typenode.ParentNode.RemoveChild(typenode);
}
@@ -2440,6 +2441,15 @@
DocTypeFullMemberFormatter.Default.GetName
(iface),
GetMember (pi.Name)});
}
+
+ public static string PathCombine (string dir, string path)
+ {
+ if (dir == null)
+ dir = "";
+ if (path == null)
+ path = "";
+ return Path.Combine (dir, path);
+ }
}
class DocumentationMember {
@@ -2570,7 +2580,7 @@
protected virtual StringBuilder AppendNamespace (StringBuilder buf,
Type type)
{
- if (type.Namespace != null)
+ if (type.Namespace != null && type.Namespace.Length > 0)
buf.Append (type.Namespace).Append ('.');
return buf;
}
@@ -2778,7 +2788,7 @@
protected override StringBuilder AppendNamespace (StringBuilder buf,
Type type)
{
- if (GetCSharpType (type.FullName) == null && type.Namespace !=
null && type.Namespace != "System")
+ if (GetCSharpType (type.FullName) == null && type.Namespace !=
null && type.Namespace.Length > 0 && type.Namespace != "System")
buf.Append (type.Namespace).Append ('.');
return buf;
}
Modified: trunk/monodoc/tools/overview.xsl
===================================================================
--- trunk/monodoc/tools/overview.xsl 2008-01-02 21:30:52 UTC (rev 92129)
+++ trunk/monodoc/tools/overview.xsl 2008-01-02 21:38:48 UTC (rev 92130)
@@ -16,7 +16,7 @@
<xsl:param name="ext" select="'xml'"/>
<xsl:param name="namespace" select="''"/>
- <xsl:variable name="max-types">21</xsl:variable>
+ <xsl:variable name="max-types">50</xsl:variable>
<xsl:template match="Overview">
<Page>
@@ -38,7 +38,9 @@
<PageTitle>
<xsl:choose>
<xsl:when test="not($namespace='' or
$namespace='all')">
- <xsl:value-of select="$namespace"/>
Namespace
+ <xsl:call-template
name="GetNamespaceName">
+ <xsl:with-param name="ns"
select="$namespace" />
+ </xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="Title"/>
@@ -80,9 +82,9 @@
<Remarks>
<xsl:choose>
- <xsl:when test="Types/[EMAIL
PROTECTED](Type)>0]">
+ <xsl:when test="Types/[EMAIL
PROTECTED](Type)>0] and $namespace != ''">
<!-- show all types within
namespace -->
- <h2
class="Section"><xsl:value-of select="@Name"/> Namespace</h2>
+ <h2
class="Section"><xsl:call-template name="GetNamespaceName" /></h2>
<xsl:call-template
name="CreateNamespaceDetails">
<xsl:with-param
name="ns" select="Types/[EMAIL PROTECTED]" />
</xsl:call-template>
@@ -91,7 +93,7 @@
<!-- index; show all types -->
<xsl:for-each
select="Types/Namespace">
<xsl:sort
select="@Name"/>
- <h2 class="Section"><a
href="[EMAIL PROTECTED]/index.{$ext}"><xsl:value-of select="@Name"/>
Namespace</a></h2>
+ <h2
class="Section"><xsl:call-template name="CreateNamespaceLink" /></h2>
<xsl:call-template
name="CreateNamespaceDetails">
<xsl:with-param
name="ns" select="." />
</xsl:call-template>
@@ -101,7 +103,7 @@
<!-- index; show only
namespaces -->
<xsl:for-each
select="Types/Namespace">
<xsl:sort
select="@Name"/>
- <h2 class="Section"><a
href="[EMAIL PROTECTED]/index.{$ext}"><xsl:value-of select="@Name"/>
Namespace</a></h2>
+ <h2
class="Section"><xsl:call-template name="CreateNamespaceLink" /></h2>
<p><xsl:apply-templates
select="document(concat('ns-',@Name,'.xml'), .)/Namespace/Docs/summary"
mode="notoppara"/></p>
</xsl:for-each>
</xsl:otherwise>
@@ -151,13 +153,45 @@
</a>
</td>
<td>
-
<xsl:apply-templates select="document(concat(parent::Namespace/@Name, '/',
@Name,'.xml'), .)/Type/Docs/summary" mode="notoppara"/>
+ <xsl:variable
name="docdir">
+
<xsl:choose>
+
<xsl:when test="parent::Namespace/@Name = ''">.</xsl:when>
+
<xsl:otherwise>
+
<xsl:value-of select="parent::Namespace/@Name" />
+
</xsl:otherwise>
+
</xsl:choose>
+ </xsl:variable>
+
<xsl:apply-templates select="document(concat($docdir, '/', @Name, '.xml'),
.)/Type/Docs/summary" mode="notoppara"/>
</td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
+
+ <xsl:template name="GetNamespaceName">
+ <xsl:param name="ns" select="@Name" />
+ <xsl:choose>
+ <xsl:when test="$ns = ''">
+ <xsl:text>Root</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$ns" />
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text> Namespace</xsl:text>
+ </xsl:template>
+
+ <xsl:template name="CreateNamespaceLink">
+ <xsl:choose>
+ <xsl:when test="@Name =''">
+ <xsl:call-template name="GetNamespaceName" />
+ </xsl:when>
+ <xsl:otherwise>
+ <a href="[EMAIL
PROTECTED]/index.{$ext}"><xsl:call-template name="GetNamespaceName" /></a>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
</xsl:stylesheet>
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches