Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > Re: How to disallow empty string elements using XML Schema?

Reply
Thread Tools

Re: How to disallow empty string elements using XML Schema?

 
 
Jan-Erik Öhman
Guest
Posts: n/a
 
      09-01-2003
Thanks for the hint Bob.

My previous schema looked like this:

<xs:element name="Status" type="xs:string"/>

After your hint I changed it to:

<xs:element name="Status">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:whiteSpace value="collapse"/>
</xs:restriction>
</xs:simpleType>
</xs:element>

Which does exactly what I want.

/Jan-Erik





*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disallow space using regular expression validator Zorik ASP .Net 1 11-15-2006 04:04 PM
Altova Mapforce - xml 2 xml map: empty elements output although input element is not empty Lukas XML 3 11-10-2005 02:25 PM
DataGrid - Disallow Postback? Rich Wallace ASP .Net 8 07-15-2004 08:08 PM
create MAC address database and disallow nonauth'd MACS with cisco switches Mike Cohen Cisco 7 07-10-2004 04:53 AM
How to disallow empty string elements using XML Schema? =?ISO-8859-1?Q?Jan-Erik_=D6hman?= XML 0 08-28-2003 08:25 AM



Advertisments