Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   Re: Newb Q: How define element in XML Schema which forces it to be empty? (http://www.velocityreviews.com/forums/t164954-re-newb-q-how-define-element-in-xml-schema-which-forces-it-to-be-empty.html)

gabriel 06-25-2003 08:39 AM

Re: Newb Q: How define element in XML Schema which forces it to be empty?
 
Try this:

<?xml version="1.0">
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">

<xs:element name="myEmptyElement">
<xs:complexType></xs:complexType>
</xs:element>
</xs:schema>



"Rich Weed" <weed_richard@NOhotmSPAMail.com> skrev i meddelandet
news:Xns93A3DA691C76BweedrichardNOhotmSPA@24.24.2. 166...
> I currently set the type to xs:string and length to 0. Is this the proper
> way to define an element so that it must be empty if it's present?
>
> --
>
> Remove NO SPAM to reply




Nobody 06-25-2003 01:53 PM

Re: Newb Q: How define element in XML Schema which forces it to be empty?
 
ok, thanks!

"gabriel" <gabriel.klappenbach@mirakel.nu> wrote in
news:HadKa.38$DS1.919@news3.global-ip.net:

> Try this:
>
> <?xml version="1.0">
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified" attributeFormDefault="unqualified">
>
> <xs:element name="myEmptyElement">
> <xs:complexType></xs:complexType>
> </xs:element>
> </xs:schema>
>
>
>
> "Rich Weed" <weed_richard@NOhotmSPAMail.com> skrev i meddelandet
> news:Xns93A3DA691C76BweedrichardNOhotmSPA@24.24.2. 166...
>> I currently set the type to xs:string and length to 0. Is this the
>> proper way to define an element so that it must be empty if it's
>> present?
>>



All times are GMT. The time now is 04:45 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.