473,545 Members | 1,956 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is there any way to get min/maxOccurs during validation?

I understand that I can get the SchemaType from XmlValidatingRe ader
during Read() and that is cool. But is there any way to get the
current XmlSchemaElemen t (or XmlSchemaAttrib ute for that matter)?

I need this because I am setting up my UI dynamically based on the
schema, and I need to know whether a field is required or not. :(

Any help greatly appreciated.

--
Aaron
Nov 12 '05 #1
3 1059
Not in the current version of .Net framwork. Next version should shave this
feature
Yan

"Aaron Boodman" <bo***@youngpup .net> wrote in message
news:91******** *************** ***@posting.goo gle.com...
I understand that I can get the SchemaType from XmlValidatingRe ader
during Read() and that is cool. But is there any way to get the
current XmlSchemaElemen t (or XmlSchemaAttrib ute for that matter)?

I need this because I am setting up my UI dynamically based on the
schema, and I need to know whether a field is required or not. :(

Any help greatly appreciated.

--
Aaron

Nov 12 '05 #2
> Not in the current version of .Net framwork. Next version should shave this
feature


Do you happen to know which class? I was looking through the longhorn
docs and didn't see anything like that. This is a very high priority
problem, so I would even consider using beta bits if it was going to
be made real in the future.

--
Aaron
Nov 12 '05 #3
public interface IXmlSchemaInfo {
...
XmlSchemaElemen t SchemaElement { get; }
....
}

You understand that I cannot guarantee this will not change in the final
product
Yan

"Aaron Boodman" <bo***@youngpup .net> wrote in message
news:91******** *************** **@posting.goog le.com...
Not in the current version of .Net framwork. Next version should shave
this
feature


Do you happen to know which class? I was looking through the longhorn
docs and didn't see anything like that. This is a very high priority
problem, so I would even consider using beta bits if it was going to
be made real in the future.

--
Aaron

Nov 12 '05 #4

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

Similar topics

5
4286
by: Galen Harris | last post by:
I'm getting weird errors during transformations -- "System.Net.WebException. The remote server returned an error: (500) Internal Server Error." I'm on the 1.0 Framework. I've looked through the stack trace and it seems to be happending at a call to .Transform as follows (see stack trace below):...
0
1264
by: Pete Beech | last post by:
Hi, I've looked all over for any information about this, and either this is a bug that I cannot find reported or I've misunderstood something. Lets say, in the XML Designer in VS.NET 2003, you drag over an element (call it MyElement) and add another element of type string (call it NormalElement) as a member. If you look at the generated...
0
1327
by: Kurt | last post by:
Hi, (sorry if I'm cross posting - not quite sure where to put) I am basically trying to force the user of my web service to only send a valid dataset that is based on a schema I have created. I have created a schema which references another schema (like a library of complex and simple types) that has a complex typed defined called...
0
1001
by: Robert Rae | last post by:
Does anyone know of a way to set minoccurs and maxoccurs from an attribute. An example would be: public string HelloWorld(DataInput dataInput) { return "Hello World"; } public class DataInput
2
1659
by: hooomee | last post by:
Given: <xs:choice maxOccurs=5> <xs:element name="Foo" type="bar" /> <xs:element name="Foo1" type="bar" /> <xs:element name="Foo2" type="bar" /> </xs:choice> Is the choice made once and then the choosen element can occur 5 times, or is the choice made once for each occurance?
4
2711
by: kschneider | last post by:
Assume there's a form with it's action attribute all set to post to a URL, but without a submit control. Form submission is done via a link and I want to prevent the classic "double submit". Ignoring the server side of things, does anyone see any holes with the following script? It seems to work, but I'd appreciate other eyes on it. Maybe a...
3
1733
by: Sebastian Stein | last post by:
Hi, I have the following XSD file (XML Schema 1.0): <xs:element maxOccurs="1" minOccurs="1" name="header"> <xs:complexType> <xs:sequence> <xs:element name="id" type="xs:positiveInteger"/> <xs:element name="name" type="xs:string"/> <xs:element name="parentId" type="xs:positiveInteger"/>
3
3185
by: jlauman | last post by:
I'm getting an error on line 6 of the code shown below. The error is: Value 'unbounded' is not allowed for attribute 'maxOccurs' I'd appreciate any help in resolving this. Thanks, Jack <-- SNIP -->
3
2428
by: foolproofplan | last post by:
Maybe I am looking to far into a simple problem, but I am having quite a hard time figuring this out: I am currently trying to create a schema to represent an Element which contains other Elements (some of which have a restriction on how many can occur). Here is an example of what I have done if that seems confusing: <xsd:element...
0
7484
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
7415
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
7675
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7440
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...
0
7775
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...
0
5997
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...
0
4963
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...
0
3470
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...
1
1902
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

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.