Skip Menu |

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

Report information
The Basics
Id: 104034
Status: open
Priority: 0/
Queue: XML-Pastor

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

Bug Information
Severity: (no value)
Broken in: 1.0.4
Fixed in: (no value)



Subject: Dashes in element names break class generation
I tried to use XML::Pastor on an XSD provided by a customer. When trying to create classes for this XSD, I receive errors, caused by the dash in the names of XML elements. In offline mode, when trying to use the base class: use Exporter::Format::Customer1 Compile error: Can't locate Exporter/Format/Customer1/INH.pm this is, because the created code line looks like this: use Exporter::Format::Customer1::INH-TYP; In eval mode, I get syntax errors: syntax error at (eval 338) line 91, near "#================================================================ package Exporter::Format::Customer1::Type::ANH-" I think, the correct fix is to rewrite any characters that are valid XML element names, but invalid Perl class names.
The same goes for attribute that have dashes in them.