473,811 Members | 2,691 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Additional properties of attributes in XSD

How does one define additional attributes for elements in an XSD?

So, I'd like something like this:

....
<xs:element name="ClaimNumb er" type="xs:string "
mycustompropert y="xs:string"/>
....

Ideally, I'd like Visual Studio (2005) to allow the entry of these
"additional properties" while designing it.

Any ideas?

Kind regards,

Abdullah
Mar 1 '06 #1
6 1638


Abdullah Kauchali wrote:
How does one define additional attributes for elements in an XSD?


If you want to allow attributes then the element has complex type e.g.
<xs:element name="ClaimNumb er">
<xs:complexType >
<xs:simpleConte nt>
<xs:extension base="xs:string ">
<xs:attribute name="mycustomp roperty" type="xs:string " />
</xs:extension>
</xs:simpleConten t>
</xs:complexType>
</xs:element>
You could now have e.g.
<ClaimNumber mycustompropert y="Kibo">Xibo </ClaimNumber>
in your XML instance document.
I hope this is what you are looking for, not sure whether you want the
above or whether you want to define additional attributes on schema
elements itself.
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Mar 1 '06 #2
Martin Honnen wrote:
You could now have e.g.
<ClaimNumber mycustompropert y="Kibo">Xibo </ClaimNumber>
in your XML instance document.

Hi Martin!

Thanks for responding. The above is not what I am looking for ...

I hope this is what you are looking for, not sure whether you want the
above or whether you want to define additional attributes on schema
elements itself.


.... it's the latter: looking for ways to define additional attributes
on the schema elements itself. :)

So, if a new schema is being created, I'd like the user to have the
opportunity to enter values in the schema for "mycustomproper ty". (Not
in the XML file, but in the schema.)

Is this possible with Visual Studio?
Mar 1 '06 #3
Hi Abdullah,

You can do it in VS. Here's an example:

<?xml version="1.0" encoding="utf-8" ?>

<xs:schema targetNamespace ="myNS"

elementFormDefa ult="qualified"

xmlns="myNS"

xmlns:xs="http://www.w3.org/2001/XMLSchema"

xmlns:vs
="http://schemas.microso ft.com/Visual-Studio-Intellisense">

<xs:element name="foo" vs:help="help"/>

</xs:schema>
--
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
"Abdullah Kauchali" <no**@none.co m> wrote in message
news:uK******** ******@TK2MSFTN GP09.phx.gbl...
How does one define additional attributes for elements in an XSD?

So, I'd like something like this:

...
<xs:element name="ClaimNumb er" type="xs:string "
mycustompropert y="xs:string"/>
...

Ideally, I'd like Visual Studio (2005) to allow the entry of these
"additional properties" while designing it.

Any ideas?

Kind regards,

Abdullah

Mar 2 '06 #4
Stan Kitsis [MSFT] wrote:
Hi Abdullah,

You can do it in VS. Here's an example:

Thanks Stan! Exactly what I needed.

So, I can create my own namespace definition file with all the relevant
attributes, but one last (minor) question:

Is there any way for Visual Studio to allow entering of these
"properties " in "Designer view"? The intellisense works when viewing
the code, but no additional properties are visible besides the usual.

Any ideas?

Mar 3 '06 #5
I don't think the design view surfaces visual support for this.

--
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

"Abdullah Kauchali" <no**@none.co m> wrote in message
news:eV******** ******@TK2MSFTN GP15.phx.gbl...
Stan Kitsis [MSFT] wrote:
Hi Abdullah,

You can do it in VS. Here's an example:

Thanks Stan! Exactly what I needed.

So, I can create my own namespace definition file with all the relevant
attributes, but one last (minor) question:

Is there any way for Visual Studio to allow entering of these
"properties " in "Designer view"? The intellisense works when viewing
the code, but no additional properties are visible besides the usual.

Any ideas?

Mar 6 '06 #6
Stan Kitsis [MSFT] wrote:
I don't think the design view surfaces visual support for this.

Many thanks Stan!
Mar 7 '06 #7

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

Similar topics

12
5805
by: Pol Bawin | last post by:
Hi All, Did somebody already define attributes for numerical properties to define value : minima, maxima, a number of decimal, ...? This information would be useful to unify syntax Polo
3
5079
by: Martin Montgomery | last post by:
I have, for example, a property called myProperty. I would like, when using a property grid to display the property name as "My Property". Is this possible. Is there an attribute etc Thank Martin
13
3143
by: Patrick * | last post by:
Reading a book on .ASP .NET I am getting a bit mixed up as to the difference between "property" and "attribute" as the terms don't seem to be used consistently in the book I am reading. Can anyone give two good definitions? Both with respect to controls.
5
2576
by: Jon Pope | last post by:
I've got a class which contains properties. I can supply this class to the Properties control, and it will properly display the properties and allow the user to edit them, etc. I would like to be able to programmatically control at runtime which properties are displayed. I've looked at the System.Windows.Forms.Design.ControlDesigner, and specifically looked at the PreFilterProperties() override, but that seems to only work for...
0
9728
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
9605
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
10389
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10402
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10135
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
9205
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...
0
6890
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
5554
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3867
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.