[MKDoc-commit] release 2.15.

bruno at mkdoc.demon.co.uk bruno at mkdoc.demon.co.uk
Wed Jan 5 15:33:48 GMT 2005


Log Message:
-----------
release 2.15. Added support for non-alphanumeric xml attribute names in
tal:attributes + tests.

Modified Files:
--------------
    Petal:
        Changes
        MANIFEST
        META.yml
        README
    Petal/lib/Petal/Canonicalizer:
        XML.pm

Added Files:
-----------
    Petal:
        .cvsignore
    Petal/t:
        083_test_attributes_chars.t
    Petal/t/data/test_attributes_chars:
        test_attributes_chars1.xml

-------------- next part --------------
--- /dev/null
+++ .cvsignore
@@ -0,0 +1,5 @@
+.swp
+Makefile
+blib
+pm_to_blib
+
Index: MANIFEST
===================================================================
RCS file: /var/spool/cvs/Petal/MANIFEST,v
retrieving revision 1.45
retrieving revision 1.46
diff -LMANIFEST -LMANIFEST -u -r1.45 -r1.46
--- MANIFEST
+++ MANIFEST
@@ -1,3 +1,4 @@
+.cvsignore
 Changes
 lib/Petal.pm
 lib/Petal/Cache/Disk.pm
@@ -85,6 +86,7 @@
 t/080_Petal_TranslationService_h4x0r.t
 t/081_Petal_I18NProcessor.t
 t/082_Petal_Gettext.t
+t/083_test_attributes_chars.t
 t/benchmark.pl
 t/data/access_obj_array.html
 t/data/access_obj_hash.html
@@ -178,6 +180,7 @@
 t/data/string_count.html
 t/data/style_andamp.html
 t/data/test_attributes2.xml
+t/data/test_attributes_chars/test_attributes_chars1.xml
 t/data/test_ns_attributes/test_ns_attributes1.xml
 t/data/test_ns_attributes/test_ns_attributes2.xml
 t/data/test_ns_attributes/test_ns_attributes3.xml
Index: META.yml
===================================================================
RCS file: /var/spool/cvs/Petal/META.yml,v
retrieving revision 1.7
retrieving revision 1.8
diff -LMETA.yml -LMETA.yml -u -r1.7 -r1.8
--- META.yml
+++ META.yml
@@ -1,7 +1,7 @@
 # http://module-build.sourceforge.net/META-spec.html
 #XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
 name:         Petal
-version:      2.14
+version:      2.15
 version_from: lib/Petal.pm
 installdirs:  site
 requires:
Index: Changes
===================================================================
RCS file: /var/spool/cvs/Petal/Changes,v
retrieving revision 1.123
retrieving revision 1.124
diff -LChanges -LChanges -u -r1.123 -r1.124
--- Changes
+++ Changes
@@ -1,7 +1,9 @@
 Revision history for Petal.
 
-2.15
+2.15 Wed Jan  5 15:31:00 2005
     - Fixed some 'used of uninitialized values' warnings
+    - Added support for non-alphanumeric xml attribute names in tal:attributes
+    - removed defunct email address
 
 2.14 Thu Sep  2 15:07:39 2004
     - Fixed broken I18N attributes parsing
Index: README
===================================================================
RCS file: /var/spool/cvs/Petal/README,v
retrieving revision 1.41
retrieving revision 1.42
diff -LREADME -LREADME -u -r1.41 -r1.42
--- README
+++ README
@@ -48,6 +48,7 @@
 Sean M. Burke <sburke at cpan.org>
 Chris Croome <chris at webarchitects.co.uk>
 Paul Arzul <patricka at mkdoc.com>
+Bruno Postle <bruno at mkdoc.com>
 Kurt Stephens <kstep at pepsdesign.com>
 Steve Purkis <spurkis at mkdoc.com>
 Holland, Mark <Mark.Holland at commerzbankib.com>
Index: XML.pm
===================================================================
RCS file: /var/spool/cvs/Petal/lib/Petal/Canonicalizer/XML.pm,v
retrieving revision 1.34
retrieving revision 1.35
diff -Llib/Petal/Canonicalizer/XML.pm -Llib/Petal/Canonicalizer/XML.pm -u -r1.34 -r1.35
--- lib/Petal/Canonicalizer/XML.pm
+++ lib/Petal/Canonicalizer/XML.pm
@@ -544,7 +544,7 @@
     {
 	next unless (defined $string);
 	next if ($string =~ /^\s*$/);
-	my ($attr, $expr) = $string =~ /^\s*((?:\w|\:)+)\s+(.*?)\s*$/;
+	my ($attr, $expr) = $string =~ /^\s*([A-Za-z_:][A-Za-z0-9_:.-]*)\s+(.*?)\s*$/;
         if (not defined $attr or not defined $expr)
         {
             warn "Attributes expression '$string' does not seem valid - Skipped";
--- /dev/null
+++ t/083_test_attributes_chars.t
@@ -0,0 +1,24 @@
+#!/usr/bin/perl
+use warnings;
+use strict;
+use lib ('lib');
+use Test::More 'no_plan';
+use Petal;
+
+$Petal::DISK_CACHE = 0;
+$Petal::MEMORY_CACHE = 0;
+$Petal::TAINT = 1;
+$Petal::BASE_DIR = './t/data/test_attributes_chars/';
+
+my $template;
+
+
+#####
+
+$template = new Petal('test_attributes_chars1.xml');
+
+my $string = $template->process (value1 => 'new_value1', value2 => 'new_value2');
+like ($string => qr/new_value1/);
+like ($string => qr/new_value2/);
+
+__END__
--- /dev/null
+++ t/data/test_attributes_chars/test_attributes_chars1.xml
@@ -0,0 +1,4 @@
+<foo>
+    <aaa baz-baz="default" petal:attributes="baz-baz value1" />
+    <bbb foo_2.BAR="default" petal:attributes="foo_2.BAR value2" />
+</foo>


More information about the MKDoc-commit mailing list