Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8117547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:12:32+00:00 2026-06-06T04:12:32+00:00

xml: <workers xmlns=http://www.zoo.com xmlns:xs=http://www.w3.org/2001/XMLSchema-instance xs:schemaLocation=http://www.zoo.com worker.xsd> <impiegato> <username>mario</username> <password>de2f15d014d40b93578d255e6221fd60</password> <nome>Mario</nome> <sesso>F</sesso> <eta>23</eta> </impiegato> <impiegato>

  • 0

xml:

<workers xmlns="http://www.zoo.com" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" xs:schemaLocation="http://www.zoo.com worker.xsd">
<impiegato>
    <username>mario</username>
    <password>de2f15d014d40b93578d255e6221fd60</password>
    <nome>Mario</nome>
    <sesso>F</sesso>
    <eta>23</eta>
</impiegato>

<impiegato>
    <username>maria</username>
    <password>maria</password>
    <nome>Mariaaa</nome>
    <sesso>F</sesso>
    <eta>443</eta>
</impiegato>

<impiegato>
    <username>mirco</username>
    <password>mirco</password>
    <nome>Mirco</nome>
    <sesso>F</sesso>
    <eta>27</eta>
</impiegato>

<impiegato>
    <username>martina</username>
    <password>martina</password>
    <nome>Martina</nome>
    <sesso>M</sesso>
    <eta>26</eta>
</impiegato>

<manager>
    <username>marco</username>
    <password>marco</password>
    <nome>Marco</nome>
    <sesso>M</sesso>
    <eta>25</eta>
</manager>

<manager>
    <username>giovanna</username>
    <password>zxVcGz0BPdHkY</password>
    <nome>Giovanna</nome>
    <sesso>F</sesso>
    <eta>24</eta>
</manager>
</workers>

xml schema:

<?xml version="1.0"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:zoo="http://www.zoo.com"
targetNamespace="http://www.zoo.com"
elementFormDefault="qualified">

<xs:element name="workers" type="zoo:Tworkers"/>

<xs:complexType name="Tworkers">
<xs:sequence>
    <xs:element name="impiegato" type ="zoo:Timpiegato"/>
    <xs:element name="manager" type ="zoo:Tmanager"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="Timpiegato">
<xs:sequence>
    <xs:element name="username" type ="xs:string"/>
    <xs:element name="password" type ="xs:string"/>
    <xs:element name="nome" type ="xs:string"/>
    <xs:element name="sesso" type ="xs:string"/>
    <xs:element name="eta" type ="xs:integer" default="-1"/>
</xs:sequence>
</xs:complexType>

<xs:complexType name="Tmanager">
<xs:sequence>
    <xs:element name="username" type ="xs:string"/>
    <xs:element name="password" type ="xs:string"/>
    <xs:element name="nome" type ="xs:string"/>
    <xs:element name="sesso" type ="xs:string"/>
    <xs:element name="eta" type ="xs:integer" default="-1"/>
</xs:sequence>
</xs:complexType>

</xs:schema>

code:

my $xmlschema = XML::LibXML::Schema->new( location => "../xml/worker.xsd" );
if (eval { $xmlschema->validate( $doc ); } eq undef) {
  # redirect
}

I think that the problem is in this part of the schema:

<xs:complexType name="Tworkers">
<xs:sequence>
    <xs:element name="impiegato" type ="zoo:Timpiegato"/>
    <xs:element name="manager" type ="zoo:Tmanager"/>
</xs:sequence>
</xs:complexType>

because if I run

xmllint --schema worker.xsd workers.xml

on a terminal I get this error:

workers.xml:10: element impiegato: Schemas validity error : Element '{http://www.zoo.com}impiegato': This element is not expected. Expected is ( {http://www.zoo.com}manager ).

Is there an alternative to xs:sequence to try? Because Impiegato and Managers elements don’t have an order.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T04:12:35+00:00Added an answer on June 6, 2026 at 4:12 am

    fix’d the problem changing Tworkers to

    <xs:complexType name="Tworkers">
        <xs:sequence  maxOccurs="unbounded">
            <xs:element name="impiegato" type ="zoo:Timpiegato" minOccurs="0" />
            <xs:element name="manager" type ="zoo:Tmanager" minOccurs="0"/>
        </xs:sequence>
    </xs:complexType>
    

    Now I have another problem (likely on the namespace), asking a new question

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

apache2 workers.properties: worker.node223.connection_pool_size=100 worker.node223.connection_pool_minsize=50 tomcat server.xml: <Connector address="192.168.0.17" port="8009" maxHttpHeaderSize="64836" maxThreads="350" minSpareThreads="50" maxSpareThreads="200" acceptCount="700"
given the simple xml snipet... <workers> <worker> <name>Fred</name> <dob>19410501</dob> </worker> <worker> <name>Fred</name> <dob>19410501</dob> </worker>
I get this error when I try to deploy to Google AppEngine: com.google.apphosting.utils.config.AppEngineConfigException: XML
When it comes to documenting the structure of XML files... One of my co-workers
I am trying to switch a hosted worker process in Azure to use xml
I have an app on a subdomain, I wish to access like so: http://sub.domain.com/myApp/some.jsp
My co-workers rarely (if ever) use XML Comments when working on our software (I
XML document: <?xml version=1.0 encoding=UTF-8?> <ProcessData> <SOAPAction>urn:echo</SOAPAction> <Content_Type>text/xml;charset=UTF-8</Content_Type> <uname>sarah_brcm</uname> <pwd>BRCM_UVLwNhjrA5fbgqkUNdxQXMfcCDJ</pwd> </ProcessData> XSLT: <?xml version=1.0
xml is not encoding proper - any help List<NameValuePair> formparams = new ArrayList<NameValuePair>(); formparams.add(new
XML Code: <GridLayout android:id=@+id/grid android:layout_width=fill_parent android:layout_height=fill_parent android:layout_above=@+id/step android:layout_alignParentLeft=true android:layout_alignParentRight=true android:layout_below=@+id/menu > </GridLayout> The above

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.