Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Sam,

Thanks for posting!
Yes, I made sure to read the documentation very closely but it didn't seem to shed any light on this particular error - other than "SimpleTypes must come after their base types in the schema body."

I searched through the module source and found where the error was being generated:

_err("Found <simpleType> illegally combined with complexType>.") if $mother->{is_complex};

By "illegally combined" does the error mean simpleType cannot be a child (or parent) of complexType?

I hope the following .xsd snippet will be helpful as it seem s exemplary of the file as a whole.

SAMPLE XSD MARKUP

<xsd:element name="Phone" type="PhoneType" minOccurs="0"/> <xsd:element name="Fax" minOccurs="0"> <xsd:complexType> <xsd:sequence> <xsd:element name="F_AreaCode" nillable="1"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:length value="3"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:element name="F_Prefix" nillable="1"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:length value="3"/> </xsd:restriction> </xsd:simpleType> </xsd:element> <xsd:element name="F_Suffix" nillable="1"> <xsd:simpleType> <xsd:restriction base="xsd:string"> <xsd:length value="4"/> </xsd:restriction> </xsd:simpleType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:element>

END SAMPLE XSD

Any help is appreciated.

j


In reply to Re^2: .XSD (schema) Validation issue by jeyroz
in thread .XSD (schema) Validation issue by jeyroz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2023-12-03 23:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (20 votes). Check out past polls.

    Notices?