libgsf r997 - in trunk: . doc doc/tmpl gsf
- From: jody svn gnome org
- To: svn-commits-list gnome org
- Subject: libgsf r997 - in trunk: . doc doc/tmpl gsf
- Date: Fri, 29 Aug 2008 01:01:57 +0000 (UTC)
Author: jody
Date: Fri Aug 29 01:01:56 2008
New Revision: 997
URL: http://svn.gnome.org/viewvc/libgsf?rev=997&view=rev
Log:
2008-08-28 Jody Goldberg <jody gnome org>
* gsf/gsf-libxml.c (gsf_xml_in_doc_add_nodes) : new, split from
gsf_xml_in_doc_new to facilitate splitting node sets so that they
can be used in multiple situations.
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/doc/gsf-sections.txt
trunk/doc/tmpl/gsf-unused.sgml
trunk/doc/tmpl/infile.sgml
trunk/doc/tmpl/output.sgml
trunk/doc/tmpl/xml.sgml
trunk/gsf/gsf-infile.h
trunk/gsf/gsf-libxml.c
trunk/gsf/gsf-libxml.h
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Fri Aug 29 01:01:56 2008
@@ -10,6 +10,7 @@
* Add additional MS OpenPkg support to facilitate pivots.
* gtk-doc improvements.
* Make the VBA extractor more accessible.
+ * Extensions for the xml parser to allow modularization.
Morten:
* Use g_base64_-routines from glib when available.
Modified: trunk/doc/gsf-sections.txt
==============================================================================
--- trunk/doc/gsf-sections.txt (original)
+++ trunk/doc/gsf-sections.txt Fri Aug 29 01:01:56 2008
@@ -86,6 +86,8 @@
gsf_infile_child_by_index
gsf_infile_child_by_name
gsf_infile_child_by_vname
+gsf_infile_child_by_aname
+gsf_infile_child_by_vaname
gsf_infile_name_by_index
<SUBSECTION Standard>
GSF_INFILE_TYPE
@@ -642,6 +644,7 @@
gsf_xml_in_doc_new
gsf_xml_in_doc_free
+gsf_xml_in_doc_add_nodes
gsf_xml_in_doc_parse
gsf_xml_in_doc_set_unknown_handler
Modified: trunk/doc/tmpl/gsf-unused.sgml
==============================================================================
--- trunk/doc/tmpl/gsf-unused.sgml (original)
+++ trunk/doc/tmpl/gsf-unused.sgml Fri Aug 29 01:01:56 2008
@@ -134,45 +134,6 @@
gsf
-<!-- ##### FUNCTION gsf_output_close ##### -->
-<para>
-
-</para>
-
- output:
- Returns:
-
-<!-- ##### FUNCTION gsf_output_container ##### -->
-<para>
-
-</para>
-
- output:
- Returns:
-
-<!-- ##### FUNCTION gsf_output_error ##### -->
-<para>
-
-</para>
-
- output:
- Returns:
-
-<!-- ##### FUNCTION gsf_output_error_id ##### -->
-<para>
-
-</para>
-
- Returns:
-
-<!-- ##### FUNCTION gsf_output_is_closed ##### -->
-<para>
-
-</para>
-
- output:
- Returns:
-
<!-- ##### FUNCTION gsf_output_memory_get_type ##### -->
<para>
@@ -180,105 +141,3 @@
@Returns:
-<!-- ##### FUNCTION gsf_output_name ##### -->
-<para>
-
-</para>
-
- output:
- Returns:
-
-<!-- ##### FUNCTION gsf_output_printf ##### -->
-<para>
-
-</para>
-
- output:
- format:
- Varargs:
- Returns:
-
-<!-- ##### FUNCTION gsf_output_puts ##### -->
-<para>
-
-</para>
-
- output:
- line:
- Returns:
-
-<!-- ##### FUNCTION gsf_output_seek ##### -->
-<para>
-
-</para>
-
- output:
- offset:
- whence:
- Returns:
-
-<!-- ##### FUNCTION gsf_output_set_error ##### -->
-<para>
-
-</para>
-
- output:
- code:
- format:
- Varargs:
- Returns:
-
-<!-- ##### FUNCTION gsf_output_size ##### -->
-<para>
-
-</para>
-
- output:
- Returns:
-
-<!-- ##### FUNCTION gsf_output_tell ##### -->
-<para>
-
-</para>
-
- output:
- Returns:
-
-<!-- ##### FUNCTION gsf_output_unwrap ##### -->
-<para>
-
-</para>
-
- wrapper:
- wrapee:
- Returns:
-
-<!-- ##### FUNCTION gsf_output_vprintf ##### -->
-<para>
-
-</para>
-
- output:
- format:
- args:
- Returns:
-
-<!-- ##### FUNCTION gsf_output_wrap ##### -->
-<para>
-
-</para>
-
- wrapper:
- wrapee:
- Returns:
-
-<!-- ##### FUNCTION gsf_output_write ##### -->
-<para>
-
-</para>
-
- output:
- num_bytes:
- data:
- Returns:
-
Modified: trunk/doc/tmpl/infile.sgml
==============================================================================
--- trunk/doc/tmpl/infile.sgml (original)
+++ trunk/doc/tmpl/infile.sgml Fri Aug 29 01:01:56 2008
@@ -62,6 +62,26 @@
@Returns:
+<!-- ##### FUNCTION gsf_infile_child_by_aname ##### -->
+<para>
+
+</para>
+
+ infile:
+ names:
+ Returns:
+
+
+<!-- ##### FUNCTION gsf_infile_child_by_vaname ##### -->
+<para>
+
+</para>
+
+ infile:
+ names:
+ Returns:
+
+
<!-- ##### FUNCTION gsf_infile_name_by_index ##### -->
<para>
Modified: trunk/doc/tmpl/output.sgml
==============================================================================
--- trunk/doc/tmpl/output.sgml (original)
+++ trunk/doc/tmpl/output.sgml Fri Aug 29 01:01:56 2008
@@ -43,6 +43,105 @@
</para>
+<!-- ##### FUNCTION gsf_output_size ##### -->
+<para>
+
+</para>
+
+ output:
+ Returns:
+
+
+<!-- ##### FUNCTION gsf_output_close ##### -->
+<para>
+
+</para>
+
+ output:
+ Returns:
+
+
+<!-- ##### FUNCTION gsf_output_tell ##### -->
+<para>
+
+</para>
+
+ output:
+ Returns:
+
+
+<!-- ##### FUNCTION gsf_output_seek ##### -->
+<para>
+
+</para>
+
+ output:
+ offset:
+ whence:
+ Returns:
+
+
+<!-- ##### FUNCTION gsf_output_write ##### -->
+<para>
+
+</para>
+
+ output:
+ num_bytes:
+ data:
+ Returns:
+
+
+<!-- ##### FUNCTION gsf_output_puts ##### -->
+<para>
+
+</para>
+
+ output:
+ line:
+ Returns:
+
+
+<!-- ##### FUNCTION gsf_output_printf ##### -->
+<para>
+
+</para>
+
+ output:
+ format:
+ Varargs:
+ Returns:
+
+
+<!-- ##### FUNCTION gsf_output_vprintf ##### -->
+<para>
+
+</para>
+
+ output:
+ format:
+ args:
+ Returns:
+
+
+<!-- ##### FUNCTION gsf_output_container ##### -->
+<para>
+
+</para>
+
+ output:
+ Returns:
+
+
+<!-- ##### FUNCTION gsf_output_name ##### -->
+<para>
+
+</para>
+
+ output:
+ Returns:
+
+
<!-- ##### FUNCTION gsf_output_set_name_from_filename ##### -->
<para>
@@ -53,3 +152,61 @@
@Returns:
+<!-- ##### FUNCTION gsf_output_error_id ##### -->
+<para>
+
+</para>
+
+ Returns:
+
+
+<!-- ##### FUNCTION gsf_output_set_error ##### -->
+<para>
+
+</para>
+
+ output:
+ code:
+ format:
+ Varargs:
+ Returns:
+
+
+<!-- ##### FUNCTION gsf_output_error ##### -->
+<para>
+
+</para>
+
+ output:
+ Returns:
+
+
+<!-- ##### FUNCTION gsf_output_is_closed ##### -->
+<para>
+
+</para>
+
+ output:
+ Returns:
+
+
+<!-- ##### FUNCTION gsf_output_wrap ##### -->
+<para>
+
+</para>
+
+ wrapper:
+ wrapee:
+ Returns:
+
+
+<!-- ##### FUNCTION gsf_output_unwrap ##### -->
+<para>
+
+</para>
+
+ wrapper:
+ wrapee:
+ Returns:
+
+
Modified: trunk/doc/tmpl/xml.sgml
==============================================================================
--- trunk/doc/tmpl/xml.sgml (original)
+++ trunk/doc/tmpl/xml.sgml Fri Aug 29 01:01:56 2008
@@ -169,6 +169,15 @@
@doc:
+<!-- ##### FUNCTION gsf_xml_in_doc_add_nodes ##### -->
+<para>
+
+</para>
+
+ doc:
+ nodes:
+
+
<!-- ##### FUNCTION gsf_xml_in_doc_parse ##### -->
<para>
Modified: trunk/gsf/gsf-infile.h
==============================================================================
--- trunk/gsf/gsf-infile.h (original)
+++ trunk/gsf/gsf-infile.h Fri Aug 29 01:01:56 2008
@@ -39,7 +39,7 @@
GsfInput *gsf_infile_child_by_index (GsfInfile *infile, int i);
GsfInput *gsf_infile_child_by_name (GsfInfile *infile, char const *name);
GsfInput *gsf_infile_child_by_vname (GsfInfile *infile, ...);
-GsfInput *gsf_infile_child_by_aname (GsfInfile *infile, char const *name[]);
+GsfInput *gsf_infile_child_by_aname (GsfInfile *infile, char const *names[]);
GsfInput *gsf_infile_child_by_vaname (GsfInfile *infile, va_list names);
G_END_DECLS
Modified: trunk/gsf/gsf-libxml.c
==============================================================================
--- trunk/gsf/gsf-libxml.c (original)
+++ trunk/gsf/gsf-libxml.c Fri Aug 29 01:01:56 2008
@@ -915,8 +915,6 @@
gsf_xml_in_doc_new (GsfXMLInNode const *nodes, GsfXMLInNS const *ns)
{
GsfXMLInDoc *doc;
- GsfXMLInNode const *e_node;
- GsfXMLInNodeInternal *tmp, *node;
g_return_val_if_fail (nodes != NULL, NULL);
@@ -926,6 +924,33 @@
NULL, (GDestroyNotify) gsf_xml_in_node_internal_free);
doc->ns = ns;
+ gsf_xml_in_doc_add_nodes (doc, nodes);
+
+ if (NULL == doc->root_node) {
+ gsf_xml_in_doc_free (doc);
+ g_return_val_if_fail (NULL != doc->root_node, NULL);
+ }
+
+ return doc;
+}
+
+/**
+ * gsf_xml_in_doc_add_nodes :
+ * @doc : #GsfXMLInDoc
+ * @nodes : %NULL terminated array of #GsfXMLInNode
+ *
+ * Adds additional nodes to the structure of @doc
+ **/
+void
+gsf_xml_in_doc_add_nodes (GsfXMLInDoc *doc,
+ GsfXMLInNode const *nodes)
+{
+ GsfXMLInNode const *e_node;
+ GsfXMLInNodeInternal *tmp, *node;
+
+ g_return_if_fail (doc != NULL);
+ g_return_if_fail (nodes != NULL);
+
for (e_node = nodes; e_node->id != NULL ; e_node++ ) {
node = g_hash_table_lookup (doc->symbols, e_node->id);
if (node != NULL) {
@@ -952,7 +977,7 @@
g_hash_table_insert (doc->symbols,
(gpointer)node->pub.id, node);
}
- if (e_node == nodes) /* first valid node is the root */
+ if (NULL == doc->root_node && e_node == nodes) /* first valid node is the root */
doc->root_node = node;
/* NOTE : use e_node for parent_id rather than node
@@ -978,8 +1003,6 @@
continue;
}
}
-
- return doc;
}
/**
Modified: trunk/gsf/gsf-libxml.h
==============================================================================
--- trunk/gsf/gsf-libxml.h (original)
+++ trunk/gsf/gsf-libxml.h Fri Aug 29 01:01:56 2008
@@ -112,6 +112,8 @@
void gsf_xml_in_doc_free (GsfXMLInDoc *doc);
gboolean gsf_xml_in_doc_parse (GsfXMLInDoc *doc, GsfInput *input,
gpointer user_state);
+void gsf_xml_in_doc_add_nodes (GsfXMLInDoc *doc,
+ GsfXMLInNode const *nodes);
void gsf_xml_in_doc_set_unknown_handler (GsfXMLInDoc *doc,
GsfXMLInUnknownFunc handler);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]