Hi Mark and list,

I upgraded to XML ::Compile 1.44.
I thought I had a testcase working where I could parse a schema and then use 
"template()" to see a framework hash structure.

my $schema = XML::Compile::Schema->new($schema_xml);
print $schema->template('XML', 'node'); exit;

Now I can't get it to work. It always says

error: application requires that element `node' has a targetNamespace

My schema doesn't specify a namespace explicitly. I've tried setting an empty 
namespace like "{}node" or "#node".
I've tried specifying http://www.w3.org/2001/XMLSchema as the namespace.
I've tried various options in my call to new().

Oddly, if I continue my script, I can execute "compile() and pass it in 
(incorrect) hash structure without getting the namespace error.

my $write   = $schema->compile(WRITER => 'node');
my $xml    = $write->($doc, $record_data);

So possibly it's a bug?

Ciaran Deignan
RSD Open Systems Support
_______________________________________________
Xml-compile mailing list
[email protected]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile

Reply via email to