1. Shlomi Fish
  2. XML-LibXML-CData-Bug-Reproduce

Source

XML-LibXML-CData-Bug-Reproduce / t / 21types.t

#!/usr/bin/perl

# Copyrights 2006-2012 by [Mark Overmeer].
#  For other contributors see ChangeLog.
# See the manual pages for details on the licensing terms.
# Pod stripped from pm file by OODoc 2.00.
use warnings;
use strict;

use XML::Compile::Schema;

use Data::Dumper qw/Dumper/;

our $TestNS    = 'http://test-types';
our $SchemaNS  =  'http://www.w3.org/2001/XMLSchema';


my $schema   = XML::Compile::Schema->new( <<"__SCHEMA__" );
<schema xmlns="$SchemaNS"
   targetNamespace="$TestNS">

<element name="test1" type="int" />
<element name="test2" type="boolean" />
<element name="test3" type="float" />
<element name="test4" type="NMTOKENS" />
<element name="test5" type="positiveInteger" />
<element name="test6" type="base64Binary" />
<element name="test7" type="dateTime" />
<element name="test8" type="duration" />
<element name="test9" type="hexBinary" />
<element name="testA" type="string" />

</schema>
__SCHEMA__

my $h2 = XML::LibXML::CDATASection->new('abc');

{ no strict; eval Dumper $h2 }