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
"Sami Marzouki" <Sa***********@alsico.be> wrote in message
news:Ok**************@tk2msftngp13.phx.gbl...
Hi Stan,
Thx for your answer:
So if i did wel understand you:
so must look like:
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified"
targetNamespace="http://berco.com/webservices/WebConfig"
xmlns="http://berco.com/webservices/WebConfig">
I have another question:
in my Web.config , i have put my custom sections into configuration
section like this:
Web.Config
<?xml version="1.0"?>
<!--
Note: As an alternative to hand editing this file you can use the web
admin tool to configure settings for your application. Use
the Website->Asp.Net Configuration option in Visual Studio.
A full list of settings and comments can be found in
machine.config.comments usually located in
\Windows\Microsoft.Net\Framework\v2.x\Config -->
<configuration>
<configSections>
<section name="CDAF.COMMON"
type="System.Configuration.SingleTagSectionHandler "/>
<section name="CDAF.DATABASE"
type="CDAF.Configuration.clsConfigurationHandler,C DAF.Configuration"/>
<section name="CDAF.EVENTLOG"
type="CDAF.Configuration.clsConfigurationHandler,C DAF.Configuration"/>
<section name="CDAF.USERINTERFACE"
type="CDAF.Configuration.clsConfigurationHandler, CDAF.Configuration"/>
<section name="CDAF.HELP"
type="CDAF.Configuration.clsConfigurationHandler, CDAF.Configuration"/>
<section name="CDAF.HOTKEY"
type="CDAF.Configuration.clsConfigurationHandler, CDAF.Configuration"/>
<section name="CDAF.REMOTEOBJECT"
type="CDAF.Configuration.clsConfigurationHandler, CDAF.Configuration"/>
</configSections>
<CDAF.COMMON
SingleElement.ACO.WebEnabled="False"
EventLogs.ACO.WebEnabled="True"
Application.Database.Cache.ACO.WebEnabled="True"
UserInterface.ACO.WebEnabled="True"
Help.ACO.WebEnabled="False"
HotKey.ACO.WebEnabled="True"
RemoteObject.ACO.WebEnabled="True"
/>
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.
Stan Kitsis [MSFT] wrote: 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.