Top DevX Stories
Creating Custom Export Filters for StarOffice with XSLT
WPF Wonders: Using DataTemplates
Crystal Reports Family Offers Options for Developers
Avaya Aura Session Manager video
Avaya Aura Overview video
Search the forums:
  #1  
Old 06-20-2001, 06:00 AM
Jaco de Villiers
Guest
 
Posts: n/a
xsd:string


Does anyone know if you can asign a maxlength for an type="xsd:string" element
in a XML schema? I need to limit the length of the value for a particular
element in my document

Regards

Jaco de Villiers
Reply With Quote
  #2  
Old 06-20-2001, 07:24 AM
Jaco de Villiers
Guest
 
Posts: n/a
Re: xsd:string


The new W3C XSD definition supports it

"Jaco de Villiers" <jacodv_32@hotmail.com> wrote:
>
>Does anyone know if you can asign a maxlength for an type="xsd:string" element
>in a XML schema? I need to limit the length of the value for a particular
>element in my document
>
>Regards
>
>Jaco de Villiers


Reply With Quote
  #3  
Old 06-20-2001, 10:04 AM
rdbms
Guest
 
Posts: n/a
Re: xsd:string


"Jaco de Villiers" <jacodv_32@hotmail.com> wrote:
>
>The new W3C XSD definition supports it
>
>"Jaco de Villiers" <jacodv_32@hotmail.com> wrote:
>>
>>Does anyone know if you can asign a maxlength for an type="xsd:string"

element
>>in a XML schema? I need to limit the length of the value for a particular
>>element in my document
>>
>>Regards
>>
>>Jaco de Villiers

>


Both XML Schema (W3C) and XML Data Reduced (xdr) support constraining "facets"
for the string data type (and both techniques are very similar).

In the case of XML Schemas "xsd:string", the most common facets are:
1) <xsd:length = ""> where the length facet value is a bounded constraint
(representing both minium and maximum)
2) <xsd:minLength = ""> where the minLength facet value is the minimum
length (fairly obvious from the facet name).
3) <xsd:maxLength = ""> where the maxLength facet value is the maximum
length (again, fairly obvious from the facet name).

In the case of XML Data Reduced "dt:type="string", the most common facets
are:
1) dt:minLength = "" (declared as an attribute of the ElementType)
2) dt:maxLength = "" (declared as an attribute of the ElementType)

There are also other facets available for "xsd:string". Best advice...
take a look at the current W3C recommendation for XML Schemas.

As you might expect, parser support for xdr data typing and facets varies.

Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 11:12 PM.


Sponsored Links



Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.