Commits

Anonymous committed 3722cae

Log: Modified Files:
Changes
o information updates

Makefile.PL
+ updated blacklist

LibXML.xs LibXML.pm
+ code cleanups
+ nodeName for CDATA sections.

t/05text.t
+ tests for nodeName() on text nodes.

TODO
o TODO notes.

Comments (0)

Files changed (6)

 Revision history for Perl extension XML::LibXML
 
+1.58
+   - minor code cleanups
+   - updated libxml2 blacklist.
+   - fixed croak while requesting nodeName() of CDATA sections (bug 1694).
+
 1.57
    - added cloneNode to XML::LibXML::Document
    - include Schema/RelaxNG code only with libxml2 >= 2.6.0 (to support old libxml2)
      * general error reporting code cleanup/rewrite, try preventing 
        possible memory leaks
      * recover(1) now triggers warnings (disable with $SIG{__WARN__}=sub {})
+       (fixes bug 1968, too)
      * slighlty more strict parse_string behavior (now same as when
        parsing fh, etc): e.g. parse_string("<foo:bar>"), i.e prefix without 
        NS declaration, raises error unless recover(1) is used
 use vars qw(@ISA);
 @ISA     = ('XML::LibXML::Text');
 
+sub nodeName {
+    return "cdata";
+}
+
 1;
 
 #-------------------------------------------------------------------------#
 }
 #endif
 
-/* These globals are now declared in libxml2's globals.h */
-#if 0
-#ifdef VMS
-extern int xmlDoValidityCheckingDefaultVal;
-#define xmlDoValidityCheckingDefaultValue xmlDoValidityCheckingDefaultVal
-extern int xmlSubstituteEntitiesDefaultVal;
-#define xmlSubstituteEntitiesDefaultValue xmlSubstituteEntitiesDefaultVal
-#else
-LIBXML_DLL_IMPORT extern int xmlDoValidityCheckingDefaultValue;
-LIBXML_DLL_IMPORT extern int xmlSubstituteEntitiesDefaultValue;
-#endif
-LIBXML_DLL_IMPORT extern int xmlGetWarningsDefaultValue;
-LIBXML_DLL_IMPORT extern int xmlKeepBlanksDefaultValue;
-LIBXML_DLL_IMPORT extern int xmlLoadExtDtdDefaultValue;
-LIBXML_DLL_IMPORT extern int xmlPedanticParserDefaultValue;
-#endif
-
 #define TEST_PERL_FLAG(flag) \
     SvTRUE(perl_get_sv(flag, FALSE)) ? 1 : 0
 
             xmlSaveNoEmptyTags = SvTRUE(internalFlag);
         }
         buffer = xmlBufferCreate();
+
         if ( format <= 0 ) {
             xmlNodeDump( buffer,
                          self->doc,
 
 unless ( $is_Win32 ) { # cannot get config in W32
     my @blacklist = (
-                     [2,4,25,0],
-                     [2,4,30,1],
-                     [2,5,4,1],
+                     [2,4,22,0],
+                     [2,4,28,1],
+                     [2,4,29,0],
+                     [2,4,30,0],
+                     [2,5,0,1],
+                     [2,5,1,0], # all pre 2.5.4 version have broken attr output
                      [2,5,5,0], # tests pass, but known as broken
                      [2,5,11,1],
                      [2,6,0,0],
+for the next release:
+
+* Add information about nested parsers in callbacks to the documenation.
+* add namespace normalization. 
+* corrected catalog support
+* parsed DTD for parser validation.
+
+
+
 I plan the following issues to implemented soon
 
-* interface to the canolization implementation
 * better DTD Support
-* Interface to the schemainterface
-* corrected catalog support
 * more flexible parser interface (in the binding)
 * better module support (for shared code with other XS modules using libxml2)
 
 * xmlReader Interface.
-* RelaxNG, libxml2 Regex interface.
 * structured Error support (Petr Pajas)
 
 use Test;
 
-BEGIN { plan tests => 24 };
+BEGIN { plan tests => 29 };
 use XML::LibXML;
 
 my $doc = XML::LibXML::Document->new();
     my $foo = "foobar";
     my $textnode = $doc->createTextNode($foo);
     ok( $textnode );
+    ok( $textnode->nodeName(), text );
     ok( $textnode->nodeValue(), $foo );
 
     print "# 2. substring\n";
     my $node = XML::LibXML::Text->new("foo");
     ok($node);
     ok($node->nodeValue, "foo" );
+}
+
+{
+    print "# CDATA node name test\n";
+
+    my $node = XML::LibXML::CDATASection->new("test");
+
+    ok( $node->string_value(), "test" );
+    ok( $node->nodeName(), "cdata" );
+}
+
+{
+    print "# Comment node name test\n";
+
+    my $node = XML::LibXML::Comment->new("test");
+
+    ok( $node->string_value(), "test" );
+    ok( $node->nodeName(), "comment" );
 }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.