Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: PDCAWLEY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 1.19
  • 1.20
  • 1.21
  • 1.22
  • 1.23
  • 1.24
Fixed in: (no value)



Subject: Elements in the VMWare cloud API are uncompileable
I've attached a failing test alongside the the VMWare schema that causes a problem. Specifically, attempting to build a writer for the 'InstantiateVAppTemplateParams' element, instead it throws the error: cannot find HASH(0x7f8d03448998) as simpleType or complexType I'm afraid I don't know enough about the guts of XML::Compile (or the guts of XML schemas for that matter) to diagnose this any further, but it is rather troubling.
Subject: xml-compile-issue.tar.gz
Download xml-compile-issue.tar.gz
application/x-gzip 69.4k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #75235] Elements in the VMWare cloud API are uncompileable
Date: Thu, 23 Feb 2012 11:08:01 +0100
To: PDCAWLEY via RT <bug-XML-Compile [...] rt.cpan.org>
From: Mark Overmeer <solutions [...] overmeer.net>
* PDCAWLEY via RT (bug-XML-Compile@rt.cpan.org) [120223 07:36]: Show quoted text
> Thu Feb 23 02:36:12 2012: Request 75235 was acted upon. > Transaction: Ticket created by PDCAWLEY > Queue: XML-Compile > Subject: Elements in the VMWare cloud API are uncompileable > Broken in: 1.19, 1.20, 1.21, 1.22, 1.23, 1.24 > > cannot find HASH(0x7f8d03448998) as simpleType or complexType
Hi Piers, This is a bug in a construct which is rarely used, main caused by a confusing use of variables named "$type". The problem disappears with this change to XML/Compile/Translate.pm sub simpleContentRestriction($$) { my ($self, $tree) = @_; ... - my $type; + my ($type, $typename); ... elsif(my $basename = $node->getAttribute('base')) - { my $typename = $self->rel2abs($where, $node, $basename); + { $typename = $self->rel2abs($where, $node, $basename); ... - $type->{st} = $self->applySimpleFacets($tree, $st, 0, $type); + $type->{st} = $self->applySimpleFacets($tree, $st, 0, $typename); I took the liberty to change your script a bit... ::Cache is more helpful than ::Schema. Debugging with Test::More is quite hard, where there are just too many exception catchers around. When it works, you may wrap it up in Test::More again. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net

Message body is not shown because sender requested not to inline it.

got fixed in 1.25 (a long time ago)