473,659 Members | 2,934 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 DefaultNamespac e 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.con tains(currentSc hema) { loaditintoSchem aCollection() }

I think because all the targetnamespace s 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 1278
"I have a lot of schemas to load into a schema collection"

Yeah, To bad.

reminds me to "Show your papers"

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


"John Jenkins" <jo**********@y ahoo.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 DefaultNamespac e 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.con tains(currentSc hema) { loaditintoSchem aCollection() }

I think because all the targetnamespace s 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******** ******@TK2MSFTN GP12.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**********@y ahoo.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 DefaultNamespac e 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.con tains(currentSc hema) { loaditintoSchem aCollection() }

I think because all the targetnamespace s 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
2231
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 some of these master complex and simple types. This I believe will assist me in transforming between the master schema and the other smaller schemas that contain a subset of the elements in the master schema. I understand that I can import an...
1
2859
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" encoding="utf-8"?> <xs:schema id="module" targetNamespace="http://tempuri.org/module.xsd"
6
3520
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 following: tablespaces are a hardware issue, and totally transparent to SQL execution. It is for optimization for IO, recovery, and separating user and application usage amongst disks even in the same databases. schemas are a logical issue, and NOT...
5
1806
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 into my newly created schemas? e.g.
4
1203
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) and in S1 I define an element as being <element name="top" type="ns:geometry" />. If the 'geometry' complex type is a 'top level' complex type which contains lots of other complex types which can describe any object, do I need to define all of...
5
2154
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
7739
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 included in my xml file, like <!DOCTYPE userlist SYSTEM "test.dtd">
0
220
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 borrowed from the .NET help files. It blows up when I try to refererence a schema that is on my desktop. If you can, please correct my misunderstanding about referencing schemas, as evidenced in the below example. Am I attempting the...
2
2314
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 XML. One complication is that the providers of the data have published two different schema versions. Whilst effectively describing the same data, the 2nd schema is a significant refactoring of the first and so is
0
8427
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8332
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8627
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7356
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6179
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4335
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2750
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.