SgDotNet
Singapore Professional .NET User Group -For Cool Developers

Including an existing xsd schema into another xsd schema

rated by 0 users
This post has 3 Replies | 1 Follower

Not Ranked
Posts 1
skier17 Posted: 01-17-2006 1:16 AM
I have the 2 xsd schemas. I would like to include one schema (dia.xsd) into the other(didl.xsd) as one of the tag element ("any" in "statement"). How can i achieve this?

Apparently, it seems as if i have different definition for the schema but i do not know how to change it.

Any help would greatly be appreciated.Thank u in advance

I cant seem to upload codes with xml tags onto the forum, if u wanna help me, u may contact me directly at
MSN: erwinliong@hotmail.com
yahoo! : liong_family@yahoo.com
Email : erwinliong@gmail.com

Thanks a lot.
Top 25 Contributor
Posts 442

I know it doesn't help much but... Embarrassed [:$] I myself have learnt alot from this link.

http://www.w3.org/TR/xmlschema-0/

If you have time, you can read thru this article.

Maung Maung

Maung Maung
Top 10 Contributor
Posts 865

 skier17 wrote:

Apparently, it seems as if i have different definition for the schema but i do not know how to change it.Thanks a lot.

The targetNamespace must match for both schemas if they are to be included in one physical file

With included schemas, the included files must all reference the same target namespace. If the schema target namespace don't match, the include won't work:

[?xml version="1.0"?]
[xs:schema mlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://ns.softwaremaker.net/someHospitalSystemSchema"]
[xs:include schemaLocation="http:/schemas.softwaremaker.net/schemas/Patient.xsd"/]
[xs:include schemaLocation="http:/schemas.softwaremaker.net/schemas/Doctor.xsd"/]......[/xs:schema]

~Softwaremaker (BLOG) M. Twain: "I didn't have time to write a short letter, so I wrote a long one instead"

Top 10 Contributor
Posts 2,891

 skier17 wrote:

I cant seem to upload codes with xml tags onto the forum, if u wanna help me, u may contact me directly at
MSN: erwinliong@hotmail.com
yahoo! : liong_family@yahoo.com
Email : erwinliong@gmail.com

Thanks a lot.

Hi skier17,

I hope you won't try to get someone to help you in private again... Let's have everyone helping each other in the forum so that all can benefit. :)

Best Regards, Kit Kai, MVP (SharePoint Portal Server)

Page 1 of 1 (4 items) | RSS
Copyright SgDotNet 2004-2008
Powered by Community Server (Commercial Edition), by Telligent Systems