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 8780107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T19:57:36+00:00 2026-06-13T19:57:36+00:00

I am having a bit of a problem with empty values failing validation on

  • 0

I am having a bit of a problem with empty values failing validation on one server, but it works on all my other servers. The problem occurs on a newer PHP version (5.3.8) and works on a slightly older version (5.2.4).

Here are a couple of isolated elements which fail:

XML Input:

<clbburnfuelbias></clbburnfuelbias>
<clbburntimebias></clbburntimebias>

XSD Validation:

  <xs:element name="clbburnfuelbias"  type="data-fuelbias"/>
  <xs:element name="clbburntimebias"  type="data-timebias"/>

  <xs:simpleType name="data-fuelbias">
    <xs:restriction base="xs:integer">
      <xs:minInclusive value="-9900"/>
      <xs:maxInclusive value="9900"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="data-timebias">
    <xs:restriction base="xs:integer">
      <xs:minInclusive value="-59"/>
      <xs:maxInclusive value="59"/>
    </xs:restriction>
  </xs:simpleType>

Error:

Error 1824: Element ‘clbburnfuelbias’: The value is not a valid value
of the atomic type ‘data-fuelbias’. Error 1824: Element
‘clbburntimebias’: The value is not a valid value of the atomic type
‘data-timebias’.

Using the exact same input and XSD files on different servers running 5.2.4 I get no errors and the xml is valid.

I have tried adding minOccurs=”0″ to the elements, I have tried specifying nullable=”true” as well but still get the errors.

UPDATE:

It appears that null values are ignored on my servers using PHP 5.2.4, and rejected using 5.3.8. A work around that I’ve used which was suggested is to use a union of two definitions, one for the integer type, and one for a null value:

XSD:

<xs:element name="clbburnfuelbias" minOccurs="0">
  <xs:simpleType>
    <xs:union memberTypes="data-fuelbias null-string"/>
  </xs:simpleType>
</xs:element>

<xs:simpleType name="data-fuelbias">
  <xs:restriction base="xs:integer">
    <xs:minInclusive value="-9900"/>
    <xs:maxInclusive value="9900"/>
  </xs:restriction>
</xs:simpleType>

<xs:simpleType name="null-string">
  <xs:restriction base="xs:string">
    <xs:length value="0"/>
  </xs:restriction>
</xs:simpleType>
  • 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-13T19:57:38+00:00Added an answer on June 13, 2026 at 7:57 pm

    Making an element optional (minOccurs="0") doesn’t make its contents a wildcard. If the element appears, it must match the declared type.

    Making an element nillable (nillable="true") allows the element to be empty if it has the xsi:nil="true" attribute, where xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance":

    <clbburnfuelbias xsi:nil="true"></clbburnfuelbias>
    <clbburntimebias xsi:nil="true"></clbburntimebias>
    

    You may also use a union type, which only has the same meaning for validation purposes:

    <xs:simpleType name="data-fuelbias">
      <xs:union>
        <xs:restriction base="xs:integer">
          <xs:minInclusive value="-9900"/>
          <xs:maxInclusive value="9900"/>
        </xs:restriction>
        <xs:restriction base="xs:string">
          <xs:length value="0"/>
        </xs:restriction>
      </xs:union>
    </xs:simpleType>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know I've come across this problem before, but I'm having a bit of
I'm having a bit of a problem with one particular CSS3 transition ( here
I'm having a bit of a problem keeping values from appearing in scope for
Having a bit of a problem with mysql... Mysql 5.1 on windows 2008 server
I'm having a bit problem with reading argument value in haskell: I'm having options
Having a bit of a problem, Due to the source-control set-up we use, each
Having a bit of a problem creating an instance of an object. Bear in
I'm having a bit of a problem, drawing text on an image. When I'm
I'm having a bit of a problem using FieldOffset correctly with arrays. The code
I'm having a bit of a problem with getting JBoss working across networks. As

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.