Skip Menu |

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

Report information
The Basics
Id: 103494
Status: new
Priority: 0/
Queue: XML-Pastor

People
Owner: Nobody in particular
Requestors: nonsolosoft [...] diff.org
Cc:
AdminCc:

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



bash-4.3$ perl scritps/mypastorize.pl ../dati/schemi/schemaeac.xsd ../lib/ SAN::EAC Pastor : Processing schema : '../dati/schemi/schemaeac.xsd' ... Pastor : Fetching schema : 'file:///home/from_bsd/ferz/gittery/Promemoria/dati/schemi/schemaeac.xsd' ... Pastor : Parsing schema ... Pastor : Parsing ended Pastor : Processing schema : 'http://www.w3.org/XML/2008/06/xlink.xsd' ... Pastor : Fetching schema : 'http://www.w3.org/XML/2008/06/xlink.xsd' ... Pastor : Parsing schema ... Pastor : Parsing ended Pastor : Processing schema : 'http://www.w3.org/2001/xml.xsd' ... Pastor : Fetching schema : 'http://www.w3.org/2001/xml.xsd' ... Pastor : Parsing schema ... Pastor : Parsing ended Pastor : Unexpected element 'div' in schema! <documentation > <div > <h1 /> <div class="bodytext" > <p /> <p > <a href="http://www.w3.org/XML/1998/namespace.html" /> <a href="http://www.w3.org/TR/REC-xml" /> </p> <p /> <p > <a href="#usage" /> <a href="#nsversioning" /> </p> </div> </div> </documentation> --- mypastorize.pl --- #!/usr/bin/env perl use strict; use warnings; use Modern::Perl; if (@ARGV < 1) { say "Usage: "; say " " . $0 . " path/schema.xsd"; say " " . $0 . " path/schema.xsd destination_path"; say " " . $0 . " path/schema.xsd destination_path class_prefix"; say "Default:"; say " destination_path = /tmp/lib/perl"; say " class_prefix = MyApp::Data"; exit(1); } use XML::Pastor; my $pastor = XML::Pastor->new(); # Generate MULTIPLE modules, one module for each class, and put them under destination. my $schema = $ARGV[0]; my $destination = $ARGV[1] || '/tmp/lib/perl'; my $class_prefix = $ARGV[2] || 'MyApp::Data::'; `mkdir -p $destination` unless (-e $destination); eval { $pastor->generate( mode =>'offline', style => 'multiple', schema=>$schema, class_prefix=>$class_prefix, destination=>$destination, verbose=>9, ); }; if ($@) { say $@; } exit;
Subject: xml.xsd
From: nonsolosoft [...] diff.org
I've tried to avoid this blocking bug with: } else { + return undef if (grep {$_ eq $name} (qw/div h1 h2 h3 h4 p span a blockquote code pre ul li ol strong /)); die "Pastor : Unexpected element '$name' in schema!\n" . sprint_xml_element($node->parentNode() || $node) . "\n"; } at line 955 of XML::Paster::Schema::Parser.pm but I get: Pastor : Processing schema : 'http://www.w3.org/XML/2008/06/xlink.xsd' ... Pastor : Fetching schema : 'http://www.w3.org/XML/2008/06/xlink.xsd' ... Pastor : Parsing schema ... Pastor : Parsing ended Pastor : Processing schema : 'http://www.w3.org/2001/xml.xsd' ... Pastor : Fetching schema : 'http://www.w3.org/2001/xml.xsd' ... Pastor : Parsing schema ... Pastor : Parsing ended Fixing up namespaces for 'memberTypes' ('xs:language')... Pastor : Process ENDED : 'http://www.w3.org/2001/xml.xsd' ... Pastor : Unexpected element 'any' in schema! <sequence > <any processContents="lax" minOccurs="0" maxOccurs="unbounded" /> </sequence> On Mon Apr 13 09:23:25 2015, nonsolosoft@diff.org wrote: Show quoted text
> Pastor : Processing schema : 'http://www.w3.org/XML/2008/06/xlink.xsd' > ... > Pastor : Fetching schema : 'http://www.w3.org/XML/2008/06/xlink.xsd' > ... > Pastor : Parsing schema ... > Pastor : Parsing ended > Pastor : Processing schema : 'http://www.w3.org/2001/xml.xsd' ... > Pastor : Fetching schema : 'http://www.w3.org/2001/xml.xsd' ... > Pastor : Parsing schema ... > Pastor : Parsing ended > Pastor : Unexpected element 'div' in schema! > > <documentation > > <div > > <h1 /> > <div class="bodytext" > > <p /> > <p > > <a href="http://www.w3.org/XML/1998/namespace.html" /> > <a href="http://www.w3.org/TR/REC-xml" /> > </p> > <p /> > <p > > <a href="#usage" /> > <a href="#nsversioning" /> > </p> > </div> > </div> > </documentation>