473,516 Members | 2,865 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML/XSD: Show available attribute values from XSD in Intellisense

Don
Hi:

I want to limit the values that can be entered for particular attributes.

1) I have created an XSD from my XML document.
2) I dropped that XSD file into the following directory C:\Program
Files\Microsoft Visual Studio .NET 2003\Common7\Packages\schemas\xml
3) When I use VS.NET to create a new XML document, I do get the
intellisense working (all attributes and elements show up).

However, I want the intellisense also show the list of possible values that
can be used for particular attributes. How do I do this?

Thanks,

Don
Nov 12 '05 #1
3 5314
I dont think intellisense would perform this for you.
You can manually delve into the schema and find out that values but dont
know if you will be interested in that since it will not show up in
intellisense.
"Don" <do*************@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi:

I want to limit the values that can be entered for particular attributes.

1) I have created an XSD from my XML document.
2) I dropped that XSD file into the following directory C:\Program
Files\Microsoft Visual Studio .NET 2003\Common7\Packages\schemas\xml
3) When I use VS.NET to create a new XML document, I do get the
intellisense working (all attributes and elements show up).

However, I want the intellisense also show the list of possible values that can be used for particular attributes. How do I do this?

Thanks,

Don

Nov 12 '05 #2
Don
So if I add my own enum values manually like this, you're saying they won't
show up in intellisense?:

<xs:element name="car" type="carType"/><xs:simpleType name="carType">
<xs:restriction base="xs:string">
<xs:enumeration value="Audi"/>
<xs:enumeration value="Golf"/>
<xs:enumeration value="BMW"/>
</xs:restriction>
</xs:simpleType>

"Zafar Abbas [MSFT]" <za****@microsoft.com> wrote in message
news:uS**************@tk2msftngp13.phx.gbl...
I dont think intellisense would perform this for you.
You can manually delve into the schema and find out that values but dont
know if you will be interested in that since it will not show up in
intellisense.
"Don" <do*************@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi:

I want to limit the values that can be entered for particular attributes.
1) I have created an XSD from my XML document.
2) I dropped that XSD file into the following directory C:\Program
Files\Microsoft Visual Studio .NET 2003\Common7\Packages\schemas\xml
3) When I use VS.NET to create a new XML document, I do get the
intellisense working (all attributes and elements show up).

However, I want the intellisense also show the list of possible values

that
can be used for particular attributes. How do I do this?

Thanks,

Don


Nov 12 '05 #3
I had misunderstood your problem.

Yes, the enumeration values should show up in the intellisense while you
construct your xml document?
"Don" <do*************@hotmail.com> wrote in message
news:uY**************@TK2MSFTNGP15.phx.gbl...
So if I add my own enum values manually like this, you're saying they won't show up in intellisense?:

<xs:element name="car" type="carType"/><xs:simpleType name="carType">
<xs:restriction base="xs:string">
<xs:enumeration value="Audi"/>
<xs:enumeration value="Golf"/>
<xs:enumeration value="BMW"/>
</xs:restriction>
</xs:simpleType>

"Zafar Abbas [MSFT]" <za****@microsoft.com> wrote in message
news:uS**************@tk2msftngp13.phx.gbl...
I dont think intellisense would perform this for you.
You can manually delve into the schema and find out that values but dont
know if you will be interested in that since it will not show up in
intellisense.
"Don" <do*************@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi:

I want to limit the values that can be entered for particular

attributes.
1) I have created an XSD from my XML document.
2) I dropped that XSD file into the following directory C:\Program
Files\Microsoft Visual Studio .NET 2003\Common7\Packages\schemas\xml
3) When I use VS.NET to create a new XML document, I do get the
intellisense working (all attributes and elements show up).

However, I want the intellisense also show the list of possible values

that
can be used for particular attributes. How do I do this?

Thanks,

Don



Nov 12 '05 #4

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

Similar topics

2
3077
by: Sean Bright | last post by:
Hi there. I'm having a problem which I hope is a simple one... Any help would be appreciated. I think it has something to do with the way attributes are (or are not) inherited in schemas... This is the content of my XML Schema (minus the schema tag): <xsd:complexType name="AType"> <xsd:attribute name="attr1" type="xsd:string" />
1
2491
by: Steve Morrell | last post by:
Hi there, I have a C# object heirarchy and an XSD document to which I wish to match the serialized objects in that heirarchy. I have an abstract parent class called "Test" which has no properties, and a set of derived classed which implement specific functionality, for example "TestUserOnline", "TestUserOnPC" etc. Each of these has...
2
3945
by: Bill Cohagan | last post by:
In my app I'm validating an XML file against an XSD which contains several attribute default value specifications. I'm performing the validation via an xml document load() using a ValidatingXMLReader. After loading the document (and validating it) I assume that the resulting doc will (as appropriate) have elements with attributes set to their...
4
2249
by: Mythran | last post by:
Hrm, I don't think it's possible to create a schema for the following XML, just asking in hopes of some good suggestions for it: <menuBar> <menuBarItem> <menu> <menuItem /> <menuItem /> <menuItem> <menu>
0
3009
by: keith bannister via .NET 247 | last post by:
(Type your message here) -------------------------------- From: keith bannister Hi, I'm new to .net (as of last week) but here goes. I want to serialize/deserialize a file the conforms to an XML schema (xsd).
5
7270
by: Keith Bannister | last post by:
I'm new to .net so here goes. I'm tying to deserialize a class that is associated with an XML schema. I created the C# class with xsd.exe as below: xsd.exe /c /n:somenamespace properties.xsd this creates properties.cs
4
2012
by: Mike Jansen | last post by:
Does anyone know why if I create a complexType based off another complexType using xsd:extension the attributes don't seem to be inherited? Is this a bug/non-implementation in the .NET Schema editor and the XML validator? Thanks, Mike Jansen
0
2644
by: tanish2k | last post by:
hi. I am using c#, visual studio 2003. I need to validate a xml file against schema which itself has 2 more schema imported under it. i have following 2 xsd files : xsd1 ---> ------------------- <?xml version="1.0" encoding="UTF-8"?> <xs:schema
0
3165
by: liuhengyi | last post by:
Hi, I also have a question when using VS 2008 to edit the xml file. In my xml file, I used schemaLocation attribute to specify the xsd. If I put the xsd in our internal sharepoint site such as: xsi:schemaLocation="someNs http://sharepoint/Test.xsd" VS2008 xml editor shows that "this schema referenced from this location in your document...
0
7276
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...
0
7182
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...
0
7581
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
5714
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...
1
5110
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...
0
3267
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3259
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1624
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
0
488
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.