summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun McCance <shaunm@src.gnome.org>2003-12-27 04:43:57 +0000
committerShaun McCance <shaunm@src.gnome.org>2003-12-27 04:43:57 +0000
commitb77da39d254a1ce48ddd0123a09e0da1a880e796 (patch)
tree3a57b39cc1edf1b3be9ffccd2b72286f1e239a87
parent01e9403ab7141babb3c37e4e83bda81e5f3a25b4 (diff)
downloadyelp-b77da39d254a1ce48ddd0123a09e0da1a880e796.tar.gz
- Added myself to AUTHORS.
* AUTHORS: - Added myself to AUTHORS. * src/yelp-db-pager.c: - Fixed memory leak in params. * src/yelp-uri.c: * src/yelp-uri.h: * src/yelp-window.c: - Re-added Hallski's copyright statements. * test/testdoc1/testdoc1.xml: - Put actual content in, including admonition section.
-rw-r--r--AUTHORS1
-rw-r--r--ChangeLog16
-rw-r--r--src/yelp-db-pager.c18
-rw-r--r--src/yelp-uri.c3
-rw-r--r--src/yelp-uri.h3
-rw-r--r--src/yelp-window.c3
-rw-r--r--test/testdoc1/testdoc1.xml87
7 files changed, 123 insertions, 8 deletions
diff --git a/AUTHORS b/AUTHORS
index 779f41e2..4cde4752 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,2 +1,3 @@
Mikael Hallendal <micke@imendio.com>
Alexander Larsson <alexl@redhat.com>
+Shaun McCance <shaunm@gnome.org>
diff --git a/ChangeLog b/ChangeLog
index d4b579f3..4ca28cff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,21 @@
2003-12-26 Shaun McCance <shaunm@gnome.org>
+ * AUTHORS:
+ - Added myself to AUTHORS.
+
+ * src/yelp-db-pager.c:
+ - Fixed memory leak in params.
+
+ * src/yelp-uri.c:
+ * src/yelp-uri.h:
+ * src/yelp-window.c:
+ - Re-added Hallski's copyright statements.
+
+ * test/testdoc1/testdoc1.xml:
+ - Put actual content in, including admonition section.
+
+2003-12-26 Shaun McCance <shaunm@gnome.org>
+
* configure.in:
* test/testdoc1/Makefile.am:
* test/testdoc1/legal.xml:
diff --git a/src/yelp-db-pager.c b/src/yelp-db-pager.c
index ab7b6c3e..c16936d0 100644
--- a/src/yelp-db-pager.c
+++ b/src/yelp-db-pager.c
@@ -207,6 +207,8 @@ db_pager_process (YelpPager *pager)
xsltStylesheetPtr stylesheet;
xsltTransformContextPtr tctxt;
+ gchar *p_doc_name, *p_doc_path, *p_sty_path;
+
YelpDBPagerPriv *priv = YELP_DB_PAGER (pager)->priv;
gchar *uri_slash;
@@ -269,12 +271,16 @@ db_pager_process (YelpPager *pager)
doc_name = g_strndup (uri_str, uri_slash - uri_str + 1);
doc_path = g_strdup (uri_slash + 1);
+ p_doc_name = g_strconcat("\"", doc_name, "\"", NULL);
+ p_doc_path = g_strconcat("\"file://", doc_path, "/\"", NULL);
+ p_sty_path = g_strconcat("\"file://", DB_STYLESHEET_PATH, "/\"", NULL);
+
params[0] = "doc_name";
- params[1] = g_strconcat("\"", doc_name, "\"", NULL) ;
+ params[1] = p_doc_name;
params[2] = "doc_path";
- params[3] = g_strconcat("\"file://", doc_path, "/\"", NULL) ;
+ params[3] = p_doc_path;
params[4] = "stylesheet_path";
- params[5] = g_strconcat("\"file://", DB_STYLESHEET_PATH, "/\"", NULL) ;
+ params[5] = p_sty_path;
params[6] = "chunk_depth";
params[7] = "2";
params[8] = "html_extension";
@@ -282,7 +288,7 @@ db_pager_process (YelpPager *pager)
params[10] = "resolve_xref_chunk";
params[11] = "0";
params[12] = "mediaobject_path";
- params[13] = doc_path;
+ params[13] = p_doc_path;
params[14] = "color_gray_background";
params[15] = yelp_theme_get_gray_background ();
params[16] = "color_gray_border";
@@ -311,6 +317,10 @@ db_pager_process (YelpPager *pager)
NULL, NULL,
tctxt);
+
+ g_free (p_doc_name);
+ g_free (p_doc_path);
+ g_free (p_sty_path);
xmlFreeDoc (doc);
xsltFreeStylesheet (stylesheet);
xmlFreeParserCtxt (ctxt);
diff --git a/src/yelp-uri.c b/src/yelp-uri.c
index 0819bca7..55f42742 100644
--- a/src/yelp-uri.c
+++ b/src/yelp-uri.c
@@ -1,5 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/*
+ * Copyright (C) 2001-2002 Mikael Hallendal <micke@imendio.com>
* Copyright (C) 2003 Shaun McCance <shaunm@gnome.org>
*
* This program is free software; you can redistribute it and/or
@@ -17,8 +18,8 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
+ * Author: Mikael Hallendal <micke@imendio.com>
* Author: Shaun McCance <shaunm@gnome.org>
- * Based on implementation by Mikael Hallendal <micke@imendio.com>
*/
#include <string.h>
diff --git a/src/yelp-uri.h b/src/yelp-uri.h
index 6552973e..0d9373bb 100644
--- a/src/yelp-uri.h
+++ b/src/yelp-uri.h
@@ -1,5 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/*
+ * Copyright (C) 2001-2002 Mikael Hallendal <micke@imendio.com>
* Copyright (C) 2003 Shaun McCance <shaunm@gnome.org>
*
* This program is free software; you can redistribute it and/or
@@ -17,8 +18,8 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
+ * Author: Mikael Hallendal <micke@imendio.com>
* Author: Shaun McCance <shaunm@gnome.org>
- * Based on implementation by Mikael Hallendal <micke@imendio.com>
*/
#ifndef __YELP_URI_H__
diff --git a/src/yelp-window.c b/src/yelp-window.c
index 204f92f4..2f07dd3b 100644
--- a/src/yelp-window.c
+++ b/src/yelp-window.c
@@ -1,5 +1,6 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/*
+ * Copyright (C) 2001-2002 Mikael Hallendal <micke@imendio.com>
* Copyright (C) 2003 Shaun McCance <shaunm@gnome.org>
*
* This program is free software; you can redistribute it and/or
@@ -17,8 +18,8 @@
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*
+ * Author: Mikael Hallendal <micke@imendio.com>
* Author: Shaun McCance <shaunm@gnome.org>
- * Based on implementation by Mikael Hallendal <micke@imendio.com>
*/
#ifdef HAVE_CONFIG_H
diff --git a/test/testdoc1/testdoc1.xml b/test/testdoc1/testdoc1.xml
index a1fcfcf0..07e918b8 100644
--- a/test/testdoc1/testdoc1.xml
+++ b/test/testdoc1/testdoc1.xml
@@ -35,8 +35,93 @@
<sect1 id="td-introduction">
<title>Introduction</title>
<para>
- This document tests the DocBook transformations in &yelp;.
+ This document tests the DocBook transformations in &yelp;. Each section in
+ this document tests a particular element or group of elements from DocBook.
</para>
</sect1>
+<sect1 id="td-admonitions">
+ <title>Admonitions</title>
+ <para>
+ This sections tests the admonition elements in DocBook.
+ Here is a <sgmltag>caution</sgmltag>:
+ </para>
+
+ <caution>
+ <title>Look Out!</title>
+ <para>
+ If you don't understand the difference between <sgmltag>caution</sgmltag>
+ and <sgmltag>warning</sgmltag>, you will die. Since no mortal understands
+ the difference, it stands to reason that all mortals will die. QED.
+ </para>
+ </caution>
+
+ <para>
+ Here we have an <sgmltag>important</sgmltag> and a <sgmltag>important</sgmltag>
+ right next to each other. This is a nice thing to test, but it should generally
+ be considered bad style.
+ </para>
+
+ <important>
+ <title>This Is Important.</title>
+ <para>
+ Here is a really important piece of information. Do not forget this
+ information, or you'll be in really bad shape.
+ </para>
+ </important>
+
+ <note>
+ <title>That Was Important.</title>
+ <para>
+ Please note that the previous piece of self-referential information,
+ though seemingly meaningless, was extremely important, just as it
+ claimed to be.
+ </para>
+ </note>
+
+ <para>
+ And finally, we'll have a <sgmltag>warning</sgmltag>. Just to mix things
+ up a bit, we'll put this one <emph>inside</emph> the paragraph.
+
+ <warning>
+ <title>DocBook Is a Beast</title>
+ <para>
+ Before you start doing stuff like this, you should be warned that
+ DocBook is a beast. It's very difficult to wrap your head around
+ all of the elements.
+ </para>
+ </warning>
+
+ Note that we are still inside of the same paragraph as above. After this
+ sentence, however, we will not be.
+ </para>
+</sect1>
+
+<sect1 id="td-lists">
+ <title>Lists</title>
+ <para>
+ This sections tests the list elements in DocBook.
+ </para>
+
+ <sect2 id="td-itemizedlist">
+ <title>Itemized Lists</title>
+ </sect2>
+
+ <sect2 id="td-orderedlist">
+ <title>Ordered Lists</title>
+ </sect2>
+
+ <sect2 id="td-segmentedlist">
+ <title>Segmented Lists</title>
+ </sect2>
+
+ <sect2 id="td-simplelist">
+ <title>Simple Lists</title>
+ </sect2>
+
+ <sect2 id="td-variablelist">
+ <title>Variable Lists</title>
+ </sect2>
+</sect1>
+
</article>