* Craig Marchant ([email protected]) [170320 14:29]:
> Having an issue with trying to process xml.

I do not know whether this is the only problem (because chkData is
used on a place with <any>), but at least I see one problem.

The "any" elements are badly defined: you cannot predict which of the other
hundreds of XSD elements will appear on that spot (everyone should use
substitutionGroups)  By default, XML::Compile::Cache has
  "any_element => 'ATTEMPT'" which implies that (at runtime, but cached)
the discovered data type gets compiled.  The data is read, if succesful
you're lucky.  In this case, you are not lucky.

> 
> my $schemas = XML::Compile::Cache->new( [glob "testxsd/*.xsd"],
> 'allow_undeclared' => 1 );

   prefixes => { epp1 => ''urn:ietf:params:xml:ns:epp-1.0' }

> $schemas->declare( READER => pack_type( 'urn:ietf:params:xml:ns:epp-1.0',
> 'epp' ) );

   $schemas->declare( READER => "epp1:epp" );

> $schemas->compileAll;

>       <fee:chkData xmlns:fee="urn:ietf:params:xml:ns:fee-0.7">
>         <fee:cd>
>           <fee:name>1980s.game</fee:name>
>           <fee:currency>USD</fee:currency>
>           <fee:command>create</fee:command>
>           <fee:period unit="y">2</fee:period>
>           <fee:class>standard</fee:class>
>           <fee:fee grace-period="P0D" description="Domain registration (per
> year)" refundable="1">600.00</fee:fee>

The 'fee' and 'class' elements are in the wrong order.
-- 
Success,

               MarkOv

------------------------------------------------------------------------
       Mark Overmeer MSc                                MARKOV Solutions
       [email protected]                          [email protected]
http://Mark.Overmeer.net                   http://solutions.overmeer.net


_______________________________________________
Xml-compile mailing list
[email protected]
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/xml-compile

Reply via email to