r2556 - in packages/libxml-mini-perl/trunk: . debian lib/XML/Mini lib/XML/Mini/Element

Raphaël Hertzog hertzog at costa.debian.org
Thu Apr 13 21:19:45 UTC 2006


Author: hertzog
Date: 2006-04-13 21:19:44 +0000 (Thu, 13 Apr 2006)
New Revision: 2556

Added:
   packages/libxml-mini-perl/trunk/debian/
   packages/libxml-mini-perl/trunk/debian/changelog
   packages/libxml-mini-perl/trunk/debian/compat
   packages/libxml-mini-perl/trunk/debian/control
   packages/libxml-mini-perl/trunk/debian/copyright
   packages/libxml-mini-perl/trunk/debian/rules
   packages/libxml-mini-perl/trunk/debian/watch
Modified:
   packages/libxml-mini-perl/trunk/INSTALL
   packages/libxml-mini-perl/trunk/lib/XML/Mini/Document.pm
   packages/libxml-mini-perl/trunk/lib/XML/Mini/Element/Header.pm
   packages/libxml-mini-perl/trunk/lib/XML/Mini/Node.pm
Log:
Load libxml-mini-perl-1.2.8 into packages/libxml-mini-perl/trunk.



Property changes on: packages/libxml-mini-perl/trunk/INSTALL
___________________________________________________________________
Name: svn:executable
   - 
   + *

Added: packages/libxml-mini-perl/trunk/debian/changelog
===================================================================
--- packages/libxml-mini-perl/trunk/debian/changelog	2006-04-13 21:19:14 UTC (rev 2555)
+++ packages/libxml-mini-perl/trunk/debian/changelog	2006-04-13 21:19:44 UTC (rev 2556)
@@ -0,0 +1,24 @@
+libxml-mini-perl (1.2.8-3) unstable; urgency=low
+
+  * Include patches from Marc Laue <marc.laue at schlund.de> for better
+    conformance with the XML norm.
+    Closes: #335841, #335846
+
+ -- Raphael Hertzog <hertzog at debian.org>  Thu, 27 Oct 2005 21:40:58 +0200
+
+libxml-mini-perl (1.2.8-2) unstable; urgency=low
+
+  * Include patch from Eric Bollengier <eric at eb.homelinux.org> to handle
+    better parsing of empty attributes or attributes containing "=".
+    Closes: #278669
+  * Fixed myself the bad parsing when nested nodes had leading text in front
+    of them. Closes: #292987
+
+ -- Raphael Hertzog <hertzog at debian.org>  Wed,  4 May 2005 17:42:50 +0200
+
+libxml-mini-perl (1.2.8-1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Raphael Hertzog <hertzog at debian.org>  Mon,  9 Jun 2003 13:22:47 +0000
+

Added: packages/libxml-mini-perl/trunk/debian/compat
===================================================================
--- packages/libxml-mini-perl/trunk/debian/compat	2006-04-13 21:19:14 UTC (rev 2555)
+++ packages/libxml-mini-perl/trunk/debian/compat	2006-04-13 21:19:44 UTC (rev 2556)
@@ -0,0 +1 @@
+4

Added: packages/libxml-mini-perl/trunk/debian/control
===================================================================
--- packages/libxml-mini-perl/trunk/debian/control	2006-04-13 21:19:14 UTC (rev 2555)
+++ packages/libxml-mini-perl/trunk/debian/control	2006-04-13 21:19:44 UTC (rev 2556)
@@ -0,0 +1,21 @@
+Source: libxml-mini-perl
+Section: perl
+Priority: optional
+Build-Depends-Indep: debhelper (>= 4), perl (>= 5.8.0-7)
+Maintainer: Raphael Hertzog <hertzog at debian.org>
+Standards-Version: 3.6.1
+
+Package: libxml-mini-perl
+Architecture: all
+Depends: ${perl:Depends}, ${misc:Depends}
+Description:  Perl implementation of the MiniXML XML generator and parser
+ XML::Mini is a set of Perl classes that allow you to access
+ XML data and create valid XML output with a tree-based hierarchy of
+ elements.
+ .
+ It provides an easy, object-oriented interface for manipulating XML
+ documents and their elements. It is currently being used to send
+ requests and understand responses from remote servers in Perl
+ applications.
+ .
+ XML::Mini does not require any external libraries or modules and is pure Perl.

Added: packages/libxml-mini-perl/trunk/debian/copyright
===================================================================
--- packages/libxml-mini-perl/trunk/debian/copyright	2006-04-13 21:19:14 UTC (rev 2555)
+++ packages/libxml-mini-perl/trunk/debian/copyright	2006-04-13 21:19:44 UTC (rev 2556)
@@ -0,0 +1,39 @@
+This is the debian package for the XML::Mini perl module.
+It was created by Raphael Hertzog <hertzog at debian.org>.
+
+The upstream author is: Patrick Deegan
+
+Copyright:
+
+Copyright (C) 2002-2003 Patrick Deegan, Psychogenic Inc.
+
+Programs that use this code are bound to the terms and conditions of the GNU
+GPL. If you wish to include these modules in non-GPL code, you need prior
+written authorisation from the authors.
+
+        XML::Mini module, part of the XML::Mini XML parser/generator package.
+        Copyright (C) 2002, 2003 Patrick Deegan,  Psychogenic.com
+        All rights reserved
+    
+        This program is free software; you can redistribute it and/or modify
+        it under the terms of the GNU General Public License as published by
+        the Free Software Foundation; either version 2 of the License, or
+        (at your option) any later version.
+
+        This program is distributed in the hope that it will be useful,
+        but WITHOUT ANY WARRANTY; without even the implied warranty of
+        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+        GNU General Public License for more details.
+
+        You should have received a copy of the GNU General Public License
+        along with this program; if not, write to the Free Software
+        Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+Official XML::Mini site: http://minixml.psychogenic.com
+
+Contact page for author available at
+http://www.psychogenic.com/
+
+
+The full text of the GPL is available on Debian systems in
+/usr/share/common-licenses/GPL

Added: packages/libxml-mini-perl/trunk/debian/rules
===================================================================
--- packages/libxml-mini-perl/trunk/debian/rules	2006-04-13 21:19:14 UTC (rev 2555)
+++ packages/libxml-mini-perl/trunk/debian/rules	2006-04-13 21:19:44 UTC (rev 2556)
@@ -0,0 +1,96 @@
+#!/usr/bin/make -f
+#-*- makefile -*-
+# Made with the aid of dh_make, by Craig Small
+# Sample debian/rules that uses debhelper. GNU copyright 1997 by Joey Hess.
+# Some lines taken from debmake, by Christoph Lameter.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+PACKAGE=$(shell dh_listpackages)
+
+ifndef PERL
+PERL = /usr/bin/perl
+endif
+
+ifndef DESTDIR
+DESTDIR=..
+endif
+TMP     =`pwd`/debian/$(PACKAGE)
+
+ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS)))
+CFLAGS = -g
+endif
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+CFLAGS += -O0
+else
+CFLAGS += -O2
+endif
+
+
+build: build-stamp
+build-stamp:
+	dh_testdir
+
+	
+	# Add here commands to compile the package.
+	$(PERL) Makefile.PL INSTALLDIRS=vendor
+	$(MAKE) OPTIMIZE="-Wall $(CFLAGS)"
+	$(MAKE) test
+
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+
+	# Add here commands to clean up after the build process.
+	-$(MAKE) realclean
+
+	dh_clean
+
+install: 
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	# Add here commands to install the package into debian/tmp.
+	#$(MAKE) install DESTDIR=`pwd`/debian/tmp
+	$(MAKE) install PREFIX=$(TMP)/usr
+
+
+# Build architecture-dependent files here.
+binary-arch: build install
+# We have nothing to do by default.
+
+# Build architecture-independent files here.
+binary-indep: build install
+	dh_testdir
+	dh_testroot
+	dh_installdocs README
+	dh_installexamples
+	dh_installmenu
+#	dh_installemacsen
+#	dh_installinit
+	dh_installcron
+	dh_installman
+	dh_installchangelogs Changes
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+#	dh_makeshlibs
+	dh_installdeb
+	dh_perl 
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb --destdir=$(DESTDIR)
+
+source diff:                                                                  
+	@echo >&2 'source and diff are obsolete - use dpkg-source -b'; false
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary


Property changes on: packages/libxml-mini-perl/trunk/debian/rules
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libxml-mini-perl/trunk/debian/watch
===================================================================
--- packages/libxml-mini-perl/trunk/debian/watch	2006-04-13 21:19:14 UTC (rev 2555)
+++ packages/libxml-mini-perl/trunk/debian/watch	2006-04-13 21:19:44 UTC (rev 2556)
@@ -0,0 +1,3 @@
+version=2
+
+http://search.cpan.org/CPAN/authors/id/P/PD/PDEEGAN/XML-Mini-(.*).tar.gz

Modified: packages/libxml-mini-perl/trunk/lib/XML/Mini/Document.pm
===================================================================
--- packages/libxml-mini-perl/trunk/lib/XML/Mini/Document.pm	2006-04-13 21:19:14 UTC (rev 2555)
+++ packages/libxml-mini-perl/trunk/lib/XML/Mini/Document.pm	2006-04-13 21:19:44 UTC (rev 2556)
@@ -477,7 +477,9 @@
 	} else {
 	
 		$XMLString =~ s/>\s*\n/>/gsm;
-		if ($XMLString =~ m/^\s*<\s*([^\s>]+)([^>]*>).*<\s*\/\1\s*>/osm)
+		# Removed the "m" switch here otherwise having text lines
+		# before the first tag was causing an infinite loop
+		if ($XMLString =~ m/^\s*<\s*([^\s>]+)([^>]*>).*<\s*\/\1\s*>/os)
 		{
 			# starts with a normal <tag> ... </tag> but has some ?? in it
 			
@@ -761,7 +763,7 @@
     
     return undef unless (defined $attrString);
     my $count = 0;
-    while ($attrString =~ /([^\s]+)\s*=\s*(['"])([^\2]+?)\2/g)
+    while ($attrString =~ /([^\s=]+)\s*=\s*(['"])([^\2]*?)\2/g)
     {
 	my $attrname = $1;
 	my $attrval = $3;

Modified: packages/libxml-mini-perl/trunk/lib/XML/Mini/Element/Header.pm
===================================================================
--- packages/libxml-mini-perl/trunk/lib/XML/Mini/Element/Header.pm	2006-04-13 21:19:14 UTC (rev 2555)
+++ packages/libxml-mini-perl/trunk/lib/XML/Mini/Element/Header.pm	2006-04-13 21:19:44 UTC (rev 2556)
@@ -40,9 +40,32 @@
     my $retString = "$spaces<?". $self->name() . ' ';
     
     my $attribString;
+
+    # ensure the order of attributes inside the header conforms to W3C
+    # Recommendation for XML 1.1
+    my $atValue;
+    $atValue = $self->{'_attributes'}->{'version'};
+    if (defined $atValue)
+    {
+	$attribString .= qq|version="$atValue" |;
+    }
+    $atValue = $self->{'_attributes'}->{'encoding'};
+    if (defined $atValue)
+    {
+	$attribString .= qq|encoding="$atValue" |;
+    }
+    $atValue = $self->{'_attributes'}->{'standalone'};
+    if (defined $atValue)
+    {
+	$attribString .= qq|standalone="$atValue" |;
+    }
+
     foreach my $atName (sort keys %{$self->{'_attributes'}})
     {
-	$attribString .= qq|$atName="$self->{'_attributes'}->{$atName}" |;
+	if (($atName ne 'version') && ($atName ne 'encoding') && ($atName ne 'standalone'))
+	{
+	    $attribString .= qq|$atName="$self->{'_attributes'}->{$atName}" |;
+	}
     }
     
     if (defined $attribString && $attribString =~ m|\S|)
@@ -62,12 +85,36 @@
 {
     my $self = shift;
     
-    my $retString = '<? ' . $self->name();
+    my $retString = '<?' . $self->name() . ' ';
     my $attribString;
+
+    # ensure the order of attributes inside the header conforms to W3C
+    # Recommendation for XML 1.1
+    my $atValue;
+    $atValue = $self->{'_attributes'}->{'version'};
+    if (defined $atValue)
+    {
+	$attribString .= qq|version="$atValue" |;
+    }
+    $atValue = $self->{'_attributes'}->{'encoding'};
+    if (defined $atValue)
+    {
+	$attribString .= qq|encoding="$atValue" |;
+    }
+    $atValue = $self->{'_attributes'}->{'standalone'};
+    if (defined $atValue)
+    {
+	$attribString .= qq|standalone="$atValue" |;
+    }
+
     foreach my $atName (sort keys %{$self->{'_attributes'}})
     {
-	$attribString .= qq|$atName="$self->{'_attributes'}->{$atName}" |;
-    } 
+	if (($atName ne 'version') && ($atName ne 'encoding') && ($atName ne 'standalone'))
+	{
+	    $attribString .= qq|$atName="$self->{'_attributes'}->{$atName}" |;
+	}
+    }
+
     if (defined $attribString && $attribString =~ m|\S|)
     {
     	$retString .= $attribString;

Modified: packages/libxml-mini-perl/trunk/lib/XML/Mini/Node.pm
===================================================================
--- packages/libxml-mini-perl/trunk/lib/XML/Mini/Node.pm	2006-04-13 21:19:14 UTC (rev 2555)
+++ packages/libxml-mini-perl/trunk/lib/XML/Mini/Node.pm	2006-04-13 21:19:44 UTC (rev 2556)
@@ -136,8 +136,12 @@
 
 __END__
 
-=head1 class XML::Mini::Node
+=head1 NAME
 
+XML::Mini::Node - XML node for XML::Midi parser/generator
+
+=head1 DESCRIPTION
+
 Nodes are used as atomic containers for numerical and text data
 and act as leaves in the XML tree.
 




More information about the Pkg-perl-cvs-commits mailing list