all groups > dotnet xml > march 2006 >
You're in the

dotnet xml

group:

Web.config with multiple schemas


Re: Web.config with multiple schemas Stan Kitsis [MSFT]
3/29/2006 1:06:35 PM
dotnet xml: Hi Sami,

You need to declare a namespace in your "MyCustomSchema.xsd". The XML
Editor does not support having two schemas with the same namespace listed in
the schemas property - in your case you have two schemas with no
targetNamespace.

--
Stan Kitsis
Program Manager, XML Technologies
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

[quoted text, click to view]

Web.config with multiple schemas Sami Marzouki
3/29/2006 3:13:07 PM
Hi,
What I'm trying to do is:

- To write a Web.config with custom sections. (Done)
- To write a xsd schema for this custom sections.(Done)
- Tell the Web.config to take the two schemas.

When i specify the two schemas in the schemas property of the
web.config, it seems that only one is token.

For now, what i found is to add a line in the DotnetConfig.xsd
<xs:include schemaLocation="MyCustomSchema.xsd" />

Aren't they anyway to not modify the DotnetConfig.xsd, but instead,
to modify the customschema??

Greetz,
Re: Web.config with multiple schemas Sami Marzouki
3/30/2006 12:00:00 AM
Hi Stan,
Thx for your answer:

So if i did wel understand you:
so must look like:

[quoted text, click to view]

I have another question:

in my Web.config , i have put my custom sections into configuration
section like this:

Web.Config

[quoted text, click to view]

But, the intellisense won't give my custom sections in configuration
section, i mean, that i must be out <configuration> section to see my
sections in intellisense.


[quoted text, click to view]
Re: Web.config with multiple schemas Stan Kitsis [MSFT]
3/30/2006 1:21:57 PM
Hi Sami,

Once you've added a target namespace to your schema, you'll also need to
declare it in the instance document:

<configuration xmlns:myNS="http://berco.com/webservices/WebConfig">
</configuration>

When you do this, you'll get intellisense for your own namespace under
configuration section. This complication is related to the fact that
configuration element has xs:any as a child. This will be changed in the
next release so that you don't have to declare the namespace in your XML,
but for now you have to do it.
--
Stan Kitsis
Program Manager, XML Technologies
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

[quoted text, click to view]

AddThis Social Bookmark Button