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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T06:26:39+00:00 2026-05-13T06:26:39+00:00

I am thinking about rewriting a schema with lots of standalone complex types in

  • 0

I am thinking about rewriting a schema with lots of standalone complex types in it, into one where the complex types extend other base types more sensibly. The rationale for this is partly conceptual – because most of these types are specific instances of a domain object with a definite hierarchical structure – and partly practical, because we’re using JAXB-generated classes to handle the XML reading logic and it’s impossible to write methods for common functionality without either reflection or a lot of instanceof and casting. Bleh.

So my primary question is whether anyone is aware of a good way to test two XSD schemas for functional equivalence? If I perform this schema refactoring correctly, the set of documents considered valid should be exactly the same for the two schemas despite the fact the files themselves would be very different. This sounds like the kind of thing that a testing framework could help with; I know there are tools that will suggest test inputs for JUnit tests, and I was wondering whether there might be any tools to generate edge case XML documents to test for validity against the old and new schemata?

And as an aside – if this is a terrible idea (or if there are better alternatives), then stop me now. 🙂

Thanks for your attention.

  • 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-13T06:26:39+00:00Added an answer on May 13, 2026 at 6:26 am

    After some investigation, I’ve come across the Liquid XML Sample Generator, which sounds like exactly the kind of thing I’d be looking for (though I’m not sure quite how good this would be for testing edge cases).

    I also stumbled across SUT: XML Schema Unit Test which does not look to be actively maintained any more, or well documented, but takes a more programmatic approach to defining what should be valid or invalid XML documents for a given schema, and testing this. Unfortunately test cases seem to be interpreted linearly rather than permuting the possibilities for each distinct node as the above XML sample generator would do. Consequently while it would be possible to enforce better coverage it would likely be a lot of work to do so.

    So at least I have what appears to be a workable fallback – generating a bunch of documents from the old schema and then validating them against the new schema, and vice versa. It’s not definitive (well, unit tests never are anyway) but running a few hundred or thousand tests in each direction should give some pretty good confidence that the schemata are equivalent.

    I would still be very happy to have an elegant testing solution presented, but after an hour of Googling I’m not holding out much hope that something along those lines exists.

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

Sidebar

Related Questions

I'm thinking about rewriting an MS Access db I wrote years ago into a
Thinking about getting into .net technology project management I've had plenty of experience with
Thinking about my other problem , i decided I can't even create a regular
I've been thinking about using shared pointers, and I know how to implement one
I'm rewriting my password hashing function. It currently uses sha1. I'm thinking about using
Just thinking about my page titles and wondering which one to have keyword |
Thinking about a Windows-hosted build process that will periodically drop files to disk to
Thinking about avoiding code replication, I got a question that catches me every time
Thinking about if we modify the definition of Hamiltonian path as we need to
Without thinking about it at all I just want to say I should allow

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.