Can I have one XML Schema (XSD) include another XML-Schema?

I currently have two XSD schemes and one is a "light" version of the other. Right now I have everything in the "light" version repeated in the "complete" schema, but this becomes a pain when I need to make a change, and it goes against the DRY principle anyways, so I was wondering if there was an element that served to include another schema into a schema, so I can have my "complete" inherit from the "light" schema to reduce maintenance hurdles.

Answers


There are two methods for this.

<xsd:include schemaLocation="pathToFile"> should be used for including files of the same namespace.

<xsd:import namespace="namespace" schemaLocation="pathToFile"> should be used for include files in a different namespace. Usually you will specify the namespace given as the targetNamespace of the imported schema.


Need Your Help

Flash Button (Creating a menu page with flash buttons to open SWF Files)

load adobe flash cs4

Good day to everyone. I'm here today to seek help about Flash CS4 and ActionScript 3.0. The story starts when one day, my boss asked me to make a flash presentation about their upcoming user traini...

Compare variable with integer in shell?

bash shell

I have an if statement I need to run, as long as the value I have stored in my $counter variable is greater than 5.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.