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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T02:59:07+00:00 2026-05-28T02:59:07+00:00

I am processing a third party xml file and validating it against an xsd

  • 0

I am processing a third party xml file and validating it against an xsd provided by the third party. Their xsd is incomplete (imo). For instance they have an attribute defined as follows:

<xsd:attribute name="debit_flag" type="string_1" use="required"></xsd:attribute>

But it can only have the value “1” or “0”:

<xs:element name="debit_flag_type">
  <xs:simpleType>
    <xs:restriction base="xs:string">
      <xs:enumeration value="1"/>
      <xs:enumeration value="0"/>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

I can’t change their xsd (as they might update it in the future) so can I add a second xsd schema from which I can add extra checks as above and will there be a major overhead?

Thanks,
Patrick

  • 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-05-28T02:59:08+00:00Added an answer on May 28, 2026 at 2:59 am

    Your best option is, as always, to inform the third party of the inconsistencies in their schema. After all, if they use that schema to validate their data before they send it to you, there’s no use expanding on it, because the datatypes are guaranteed equal to the (limited) definitions in the schema.

    However, XML Schema Definitions allow to import a schema. What you can do is write your own XSD that imports the schema of the third party using <xsd:import />. Unfortunately, it depends on the definitions in the imported XSD whether or not you can indeed override them. In other words, even in this scenario, your options are limited.

    Testing your input data against two different schema’s: I wouldn’t do it. If your schema is widening definition (i.e., allows more) then it is useless in all scenarios. If it is a narrowing definition, it might have benefit, but only for your own application.

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

Sidebar

Related Questions

Evaluating a third party data processing tool, I have bumped into a case where
I am processing an XML file where I want to keep count of the
Using axis2's wsdl2java tool and a third-party wsdl I have generated service stub and
We have a situation where Excel's XML 2003 format is widely used for file
There is a bug in a third party .DLL file that we're using and
OK, so here's the background: We have a third-party piece of software that does
Given a third party system that streams XML to me via TCP. The TOTAL
I have an ASP.NET app running on a webserver. A third party is created
I'm processing a huge file with (GNU) awk , (other available tools are: Linux
I'm processing a file, line-by-line, and I'd like to do an inverse match. For

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.