473,406 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Check Schemas are correct

Hi,
I have a lot of schemas to load into a schema collection. I load them in
by reading each one into a XMLTextReader from disk and add them into a
schema collection. I have a couple of issues to contend with.

1. The targetnamespace on all the schemas (except ones which define generic
types) are the same.
2. The DefaultNamespace is the same as the Targetnamespace (I think this
should be ok)
3. Some of the schemas import other sschemas containing type definitions.
How does the schema collection object handle adding a schema that imports
other schemas?? Say I have two schemas A and B which both import C, what
should the schema collection do?
4. My current check is something like

if !schemaColl.contains(currentSchema) { loaditintoSchemaCollection() }

I think because all the targetnamespaces are the same only the first schema
gets loaded.
Is my assumption correct?
If so what is the best way to load in my schemas? If I don't check for
schemas existing currently in the schema collection the addition of schemas
chokes when it comes across a type schema that has already been added.

any help greatly appreciated.
Nov 12 '05 #1
2 1263
"I have a lot of schemas to load into a schema collection"

Yeah, To bad.

reminds me to "Show your papers"

==================


"John Jenkins" <jo**********@yahoo.com> wrote in message
news:et***************@newsfe6-gui.ntli.net...
Hi,
I have a lot of schemas to load into a schema collection. I load them in by reading each one into a XMLTextReader from disk and add them into a
schema collection. I have a couple of issues to contend with.

1. The targetnamespace on all the schemas (except ones which define generic types) are the same.
2. The DefaultNamespace is the same as the Targetnamespace (I think this
should be ok)
3. Some of the schemas import other sschemas containing type definitions.
How does the schema collection object handle adding a schema that imports
other schemas?? Say I have two schemas A and B which both import C, what
should the schema collection do?
4. My current check is something like

if !schemaColl.contains(currentSchema) { loaditintoSchemaCollection() }

I think because all the targetnamespaces are the same only the first schema gets loaded.
Is my assumption correct?
If so what is the best way to load in my schemas? If I don't check for
schemas existing currently in the schema collection the addition of schemas chokes when it comes across a type schema that has already been added.

any help greatly appreciated.


Nov 12 '05 #2
What the hell are you talking about?

"name" <user@nospam> wrote in message
news:eq**************@TK2MSFTNGP12.phx.gbl...
"I have a lot of schemas to load into a schema collection"

Yeah, To bad.

reminds me to "Show your papers"

==================


"John Jenkins" <jo**********@yahoo.com> wrote in message
news:et***************@newsfe6-gui.ntli.net...
Hi,
I have a lot of schemas to load into a schema collection. I load them
in
by reading each one into a XMLTextReader from disk and add them into a
schema collection. I have a couple of issues to contend with.

1. The targetnamespace on all the schemas (except ones which define

generic
types) are the same.
2. The DefaultNamespace is the same as the Targetnamespace (I think this
should be ok)
3. Some of the schemas import other sschemas containing type

definitions. How does the schema collection object handle adding a schema that imports other schemas?? Say I have two schemas A and B which both import C, what
should the schema collection do?
4. My current check is something like

if !schemaColl.contains(currentSchema) { loaditintoSchemaCollection() }

I think because all the targetnamespaces are the same only the first

schema
gets loaded.
Is my assumption correct?
If so what is the best way to load in my schemas? If I don't check for
schemas existing currently in the schema collection the addition of

schemas
chokes when it comes across a type schema that has already been added.

any help greatly appreciated.

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Steve George | last post by:
Hi, I have a scenario where I have a master schema that defines a number of complex and simple types. I then have a number of other schemas (with different namespaces) where I would like to reuse...
1
by: Dmitry Martynov | last post by:
Hi I have a question whether XmlValidatingReader doesn't check keyref constrain (the same with key constraint) or I do smth wrong. I have the following schema <?xml version="1.0"...
6
by: Dennis Gearon | last post by:
This post is as much about getting some questions answered as leaving the following definitions in the archives for the next person. After a quick perview of the web, I came up with the...
5
by: m.e.bruche | last post by:
Hi, In my database, I created a lot of tables before I found out about schemas. It's a mess! Suppose I want to get organised, and create a couple of schemas. How do I move existing tables...
4
by: steve_marjoribanks | last post by:
Does anyone know of any good resources about using multiple schemas? I am having trouble getting me head round a problem! I am writing schema A which imports schema B from another namespace (ns)...
5
by: Donal McWeeney | last post by:
Hi, Using .Net 2.0 what is the best way to determine the list of schemas used by a XmlDocument. Thanks Donal
4
by: Stan R. | last post by:
Hello, I have xmllint and xsltproc installed and running on both my linux and win32 platforms, all seems good. I have a couple questions though. 1) If I have an external dtd file, which is...
0
by: mgoold2002 | last post by:
Hello. I'm new to using XML/HTML. I am trying to learn to validate xml sample docs against schemas. I have an XML and Schema file (.xsd) saved to my desktop. Below is my sample code, which is...
2
by: MikeB | last post by:
Hi I hope that this is the correct place to post this question. I'm looking at developing an application which will enable me to import and process some data that is made available to me as...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.