Go Back   Velocity Reviews > Newsgroups > XML
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

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

 
Thread Tools Search this Thread
Old 06-25-2003, 09:39 AM   #1
Default Re: Newb Q: How define element in XML Schema which forces it to be empty?


Try this:

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

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



"Rich Weed" <> 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





gabriel
  Reply With Quote
Old 06-25-2003, 02:53 PM   #2
Nobody
 
Posts: n/a
Default Re: Newb Q: How define element in XML Schema which forces it to be empty?

ok, thanks!

"gabriel" <> wrote in
news:HadKa.38$:

> Try this:
>
> <?xml version="1.0">
> <xs:schema xmlnss="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified" attributeFormDefault="unqualified">
>
> <xs:element name="myEmptyElement">
> <xs:complexType></xs:complexType>
> </xs:element>
> </xs:schema>
>
>
>
> "Rich Weed" <> 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?
>>

  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump