Re: [mlview-list]patch xslt



Hi Stephane,

I have applied the patch in my tree and it looks fine ;)
I have just made some smallish modifications like renaming the
mlview_xslt_*** functions that are in mlview-xslt-utils.c so that
they comply with the object oriented function naming scheme, e.g:
mlview_xslt_utils_*** .

Apart from that, I noticed that the xslt transformation
does not handle the the xslt:directive yet.
I am okay to commit this in the CVS HEAD right now though.

The only problem is that given the flow of bug reports (and fixes) we have
had since the 0.6.1, I was thinking about releasing a 0.6.2 (a bugfix release)
this week. This release would include your experimental xslt support if I
commit it in HEAD.

A am basically okay with this idea and I would to know how you feel
about it.

Other people on the list are free to give their opinion too ;)


Wishing you all the best,

Dodji.

On Mon, Nov 24, 2003 at 07:22:33AM +0100, Stephane Bonhomme wrote:
> Hi everebody
> 
> Here is a patch that makes mlview link with libxslt from gnome and
> allows user to apply xslt transformations in mlview.
> 
> greetings, have fun
> 
> Stephane.
> 
> -- 
>     Stéphane Bonhomme - Formations, Conseil et Réalisations
>  Ingénierie Documentaire - Technologies Web - Logiciels Libres
>    s bonhomme wanadoo fr - http://perso.wanadoo.fr/s.bonhomme
>               04 76 17 09 40 / 06 88 57 27 08
> 

> ? src/mlview-xslt-utils.c
> ? src/mlview-xslt-utils.h
> Index: configure.in
> ===================================================================
> RCS file: /cvs/gnome/mlview/configure.in,v
> retrieving revision 1.48
> diff -r1.48 configure.in
> 22a23
> > LIBXSLT_VERSION=1.0.33
> 29a31
> > AC_SUBST(LIBXSLT_VERSION)
> 97a100,104
> > dnl checking for libxslt
> > dnl *******************************
> > PKG_CHECK_MODULES(LIBXSLT,[libxslt >= $LIBXSLT_VERSION])
> > 
> > dnl *******************************
> 128,129c135,136
> < MLVIEW_LIBS="$LIBXML2_LIBS $LIBGLADE2_LIBS $LIBGNOMEUI2_LIBS"
> < MLVIEW_CFLAGS="$LIBXML2_CFLAGS $LIBGLADE2_CFLAGS $LIBGNOMEUI2_CFLAGS"
> ---
> > MLVIEW_LIBS="$LIBXML2_LIBS $LIBXSLT_LIBS $LIBGLADE2_LIBS $LIBGNOMEUI2_LIBS"
> > MLVIEW_CFLAGS="$LIBXML2_CFLAGS $LIBXSLT_CFLAGS $LIBGLADE2_CFLAGS $LIBGNOMEUI2_CFLAGS"
> 157c164
> < if test "x$USER" = "xdodji" -o "x$MLVIEW_DEVEL" = "xon" ; then
> ---
> > if test "x$USER" = "waloo_" -o "x$MLVIEW_DEVEL" = "xon" ; then
> Index: src/Makefile.am
> ===================================================================
> RCS file: /cvs/gnome/mlview/src/Makefile.am,v
> retrieving revision 1.29
> diff -r1.29 Makefile.am
> 55c55,57
> < 	mlview-icon-tree.h
> ---
> > 	mlview-icon-tree.h \
> > 	mlview-xslt-utils.c \
> > 	mlview-xslt-utils.h
> Index: src/mlview-app.c
> ===================================================================
> RCS file: /cvs/gnome/mlview/src/mlview-app.c,v
> retrieving revision 1.55
> diff -r1.55 mlview-app.c
> 512a513,526
> > apply_xslt_cb (GtkWidget * a_menu_item,
> >                          MlViewAppContext * a_context)
> > {
> >         MlViewEditor *editor;
> > 
> >         g_return_if_fail (a_context != NULL);
> >         g_return_if_fail (a_menu_item != NULL);
> > 
> >         editor = mlview_app_context_get_element (a_context,
> >                                                  "MlViewEditor");
> >         mlview_xslt_transform_document_interactive (editor) ;
> > }
> > 
> > static void
> 673a688,694
> > 
> >         GNOMEUIINFO_SEPARATOR,
> > 
> >         GNOMEUIINFO_ITEM (N_("Apply XSLT..."),
> >                           N_
> >                           ("transform document using xslt stylesheet"),
> >                           apply_xslt_cb, NULL),
> Index: src/mlview-editor.c
> ===================================================================
> RCS file: /cvs/gnome/mlview/src/mlview-editor.c,v
> retrieving revision 1.63
> diff -r1.63 mlview-editor.c
> 34a35
> > #include "mlview-xslt-utils.h"
> 181a183,184
> > static GList *build_doc_list_from_hashtable (GHashTable * a_docs);
> > 
> 780a784,793
> > static GList *
> > build_doc_list_from_hashtable (GHashTable * a_docs)
> > {
> >         GList *result = NULL;
> > 
> >         g_hash_table_foreach (a_docs,
> >                               (GHFunc) add_hash_key_to_list,
> >                               &result);
> >         return result;
> > }
> 1148a1162,1180
> >  *Getter of the glist of opened docs
> >  *#MlViewXMLDocument *
> >  *
> >  * param a_this the current instance of #MlViewEditor.
> >  * return a GList* of #MlViewXMLDocument, taht the caller 
> >  * is responsble to free
> >  */
> > GList *
> > mlview_editor_get_list_open_doc (MlViewEditor * a_this)
> > {
> >    GList *docs = NULL;
> > 
> >    docs = build_doc_list_from_hashtable
> >                 (PRIVATE (a_this)->mlview_xml_docs);
> > 
> >    return docs;
> > }
> > 
> > /**
> 2305a2338,2366
> > }
> > 
> > 
> > /**
> >  *Applies a XSLT stylesheet to the current document
> >  *displaying a dialog for xslt selection and opens
> >  *the transformation resulting document in the editor
> >  * param a_this the current instance of #MlViewEditor.
> >  *
> >  */
> > gint
> > mlview_xslt_transform_document_interactive (MlViewEditor *a_this)
> > {
> >         MlViewXMLDocument *src_doc = NULL;
> >         MlViewXMLDocument *xsl_doc = NULL;
> >         MlViewXMLDocument *res_doc = NULL;
> > 
> >         g_return_val_if_fail (a_this != NULL, -1);
> >         g_return_val_if_fail (MLVIEW_IS_EDITOR (a_this), -1);
> >         g_return_val_if_fail (PRIVATE (a_this) != NULL, -1);
> >         
> >         src_doc = mlview_editor_get_cur_doc (a_this);
> >         xsl_doc = mlview_xslt_select_xsl_doc (a_this);
> >         if (xsl_doc != NULL) {
> >                 res_doc = mlview_xslt_transform_document(src_doc, xsl_doc);
> >                 mlview_xml_document_unref(xsl_doc);
> >                 if (res_doc != NULL) 
> >                         mlview_editor_create_new_view_on_document (a_this, res_doc, MLVIEW_XML_DOC_TREE_VIEW);
> >         }
> Index: src/mlview-editor.h
> ===================================================================
> RCS file: /cvs/gnome/mlview/src/mlview-editor.h,v
> retrieving revision 1.30
> diff -r1.30 mlview-editor.h
> 115a116,117
> > GList *mlview_editor_get_list_open_doc (MlViewEditor * a_this);
> > 
> 218a221
> > gint mlview_xslt_transform_document_interactive (MlViewEditor *a_this);






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]