I doubt it. Elements can be set to xs:nillable, but not attributes. IMHO, if an attribute or element has a null value, it shouldn't exist in the XML at all. Because if it does, how do you differentiate between a NULL value and an empty string?
On Oct 8, 9:46 am, Jaydeep <[EMAIL PROTECTED]> wrote: > Hi, > > Is it possible to check NULL attribute values using XSD? > > Thank You, > Jaydeep > > On Oct 6, 9:55 pm, Cerebrus <[EMAIL PROTECTED]> wrote: > > > > > There are few things you cannot restrict with XSD: > > > --- > > <xs:attribute name="Create" type="xs:Creation" use="required"/> > > > . > > . > > . > > <xs:simpleType name="Creation"> > > <xs:restriction base="xs:string"> > > <xs:enumeration value="Allow"/> > > <xs:enumeration value="Deny"/> > > </xs:restriction> > > </xs:simpleType> > > --- > > > I think you can also use the xs:list facet instead of xs:restriction, > > but I'm not very sure about that. > > > On Oct 6, 11:27 am, Jaydeep <[EMAIL PROTECTED]> wrote: > > > > Hi, > > > > I am preparing XSD for some XML file required in my application. Snap > > > shot of the XML is shown here: > > > > <ELE1 Create="Allow"> > > > <ELE2="Some value...."/> > > > </ELE1> > > > > For this XML file I am preparing XSD. Validvaluesfor an attribute > > > "Create" of an element "ELE1" is either Allow or Deny. Also value > > > should never be NULL. > > > > Would anybody please let me whether it is possible to assign such > > > rules (for attribute) while preparing XSD or not? > > > > Thank you, > > > Jaydeep- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/DotNetDevelopment You may subscribe to group Feeds using a RSS Feed Reader to stay upto date using following url <a href="http://feeds.feedburner.com/DotNetDevelopment"> http://feeds.feedburner.com/DotNetDevelopment</a> -~----------~----~----~----~------~----~------~--~---
