Skip Menu |

This queue is for tickets about the XML-Compile CPAN distribution.

Report information
The Basics
Id: 27992
Status: resolved
Priority: 0/
Queue: XML-Compile

People
Owner: Nobody in particular
Requestors: peimann+cpan [...] fileyourtaxes.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.18
Fixed in: (no value)



Subject: XML::Compile Does Not Handle Recursive Schemata Correctly
This is a bug with XML::Compile v0.18. Per e-mail exchange with the module author, and at his request, this bug report documents the module's incorrect handling of recursive schemata. My test case was the schema for the XML-schema. Although I can load the schema, I am unable to a compile a "READER" for either "schema" or "element". The system apparently infinite loops recursively. I have a copy of the run, and the program here for completeness. Please note that the "Deep recursion" message does not repeat at the same location, the recursion is actually threaded through a series of co-recursive routines. Following are some diagnostics. If more are required, please ask... [peimann@office22 ~/lib.perl]$ ./XML-Compile.002.pl ====================Experiments ... ====================compile a portion of the schema ... Deep recursion on subroutine "XML::Compile::Schema::Translate::particle" at XML-Compile-0.18/lib/XML/Compile/Schema/Translate.pm line 462. Deep recursion on subroutine "XML::Compile::Schema::Translate::particle" at XML-Compile-0.18/lib/XML/Compile/Schema/Translate.pm line 462. Deep recursion on subroutine "XML::Compile::Schema::Translate::particle" at XML-Compile-0.18/lib/XML/Compile/Schema/Translate.pm line 462. Deep recursion on subroutine "XML::Compile::Schema::Translate::particle" at XML-Compile-0.18/lib/XML/Compile/Schema/Translate.pm line 462. Deep recursion on subroutine "XML::Compile::Schema::Translate::particles" at XML-Compile-0.18/lib/XML/Compile/Schema/Translate.pm line 484. Deep recursion on subroutine "XML::Compile::Schema::Translate::particles" at XML-Compile-0.18/lib/XML/Compile/Schema/Translate.pm line 484. Deep recursion on subroutine "XML::Compile::Schema::Translate::particles" at XML-Compile-0.18/lib/XML/Compile/Schema/Translate.pm line 484. Deep recursion on subroutine "XML::Compile::Schema::Translate::complexType" at XML-Compile-0.18/lib/XML/Compile/Schema/Translate.pm line 869. Deep recursion on subroutine "XML::Compile::Schema::Translate::complexContent" at XML-Compile-0.18/lib/XML/Compile/Schema/Translate.pm line 755. Deep recursion on subroutine "XML::Compile::Schema::Translate::complexType" at XML-Compile-0.18/lib/XML/Compile/Schema/Translate.pm line 421. [snip] [peimann@office22 ~/lib.perl]$ uname -a Linux office22.fileyourtaxes.com 2.6.9-42.ELsmp #1 SMP Wed Jul 12 23:27:17 EDT 2006 i686 i686 i386 GNU/Linux [peimann@office22 ~/lib.perl]$ perl --version This is perl, v5.8.5 built for i386-linux-thread-multi Copyright 1987-2004, Larry Wall [snip] [peimann@office22 ~/lib.perl]$ cat XML-Compile.002.pl #! /usr/bin/perl ## ## XML-Compile.002.pl ## example of XML-Compile use and structures ## use strict; use warnings; use Data::Dumper; $Data::Dumper::Indent=1; $Data::Dumper::Terse=1; $Data::Dumper::Sortkeys=1; $Data::Dumper::Deparse=1; use lib './XML-Compile-0.18/lib'; use XML::Compile::Schema; our $schemaDirs = './XML-Compile-0.18/xsd'; ##---------------------------------------------------------- print '='x20, "Experiments ... \n"; my $schema ; $schema = XML::Compile::Schema->new(); $schema->addSchemaDirs($schemaDirs); $schema->importDefinitions('http://www.w3.org/2001/XMLSchema'); $schema->importDefinitions('http://www.w3.org/2000/10/XMLSchema'); $schema->importDefinitions('http://www.w3.org/1999/part2.xsd'); $schema->importDefinitions('http://www.w3.org/1999/XMLSchema'); $schema->importDefinitions('http://www.w3.org/XML/1998/namespace'); #print '='x10, "schema object after load. \n"; #print "\n"; #print '$schema: ', Dumper($schema), "\n"; print '='x20, "compile a portion of the schema ... \n"; #y $obj = $schema->compile('READER', '{http://www.w3.org/2001/XMLSchema}schema'); my $obj = $schema->compile('READER', '{http://www.w3.org/2001/XMLSchema}element'); print '='x10, "compiler object after load. \n"; print "\n"; print '== $obj: ', Dumper($obj), "\n";
Subject: XML-Compile.002.pl
#! /usr/bin/perl ## ## XML-Compile.002.pl ## example of XML-Compile use and structures ## use strict; use warnings; use Data::Dumper; $Data::Dumper::Indent=1; $Data::Dumper::Terse=1; $Data::Dumper::Sortkeys=1; $Data::Dumper::Deparse=1; use lib './XML-Compile-0.18/lib'; use XML::Compile::Schema; our $schemaDirs = './XML-Compile-0.18/xsd'; ##---------------------------------------------------------- print '='x20, "Experiments ... \n"; my $schema ; $schema = XML::Compile::Schema->new(); $schema->addSchemaDirs($schemaDirs); $schema->importDefinitions('http://www.w3.org/2001/XMLSchema'); $schema->importDefinitions('http://www.w3.org/2000/10/XMLSchema'); $schema->importDefinitions('http://www.w3.org/1999/part2.xsd'); $schema->importDefinitions('http://www.w3.org/1999/XMLSchema'); $schema->importDefinitions('http://www.w3.org/XML/1998/namespace'); #print '='x10, "schema object after load. \n"; #print "\n"; #print '$schema: ', Dumper($schema), "\n"; print '='x20, "compile a portion of the schema ... \n"; #y $obj = $schema->compile('READER', # '{http://www.w3.org/2001/XMLSchema}schema'); my $obj = $schema->compile('READER', '{http://www.w3.org/2001/XMLSchema}element'); print '='x10, "compiler object after load. \n"; print "\n"; print '== $obj: ', Dumper($obj), "\n";
Solved in 1.55, to be released later today.
CC: "Peimann, S.M." <peimann [...] FileYourTaxes.com>
Subject: Re: [rt.cpan.org #27992] XML::Compile Does Not Handle Recursive Schemata Correctly
Date: Fri, 21 Sep 2007 09:05:05 -0700
To: bug-XML-Compile [...] rt.cpan.org
From: "Peimann, S. M." <peimann [...] FileYourTaxes.com>
Mark, Thank you for working this out. Scott On Fri, 2007-09-21 at 06:52 -0400, Mark Overmeer via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=27992 > > > Solved in 1.55, to be released later today.
-- Warm Regards, Peimann, Scott Meyer FileYourTaxes.com (805)644-9398 ======================================================= Circular 230 Disclosure: The items contained in this communication are provided as general information and are not intended to be tax preparation or tax planning advice and should not be used for the purposes of avoidance of penalties. For proper guidance with your specific concern, you should contact a tax professional in good standing. Privacy Notice: The content of this eMail is solely directed to the addressee and/or the referenced person, and may contain privileged and confidential information protected by state and Federal laws. If you are not the intended recipient, or an authorized employee or agent of the intended recipient, you are not authorized to receive, copy, disseminate or distribute the contents in or parts thereof to any other person or entity. If this communication arrived in error, please immediately contact the sender.
closed