473,381 Members | 1,443 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,381 software developers and data experts.

how to define min and max number of characters for a complexType?

2
i have my complexType element .have no idea how to set min and max number of characters allowed to use for element "author".

here is my complexType element from schema
Expand|Select|Wrap|Line Numbers
  1. <xsd:element name="author">
  2.  <xsd:complexType>
  3.              <xsd:simpleContent>
  4.               <xsd:extension base="xsd:string">
  5.                <xsd:attribute type="xsd:string" name="gender" use="required"/>
  6.               </xsd:extension>
  7.              </xsd:simpleContent>
  8.             </xsd:complexType>
  9.            </xsd:element>
  10.  
for simpleType i already made this
Expand|Select|Wrap|Line Numbers
  1. <xsd:element name="original_title">
  2.             <xsd:simpleType>
  3.              <xsd:restriction base="xsd:string">
  4.               <xsd:minLength value="3"/>
  5.               <xsd:maxLength value="22"/>
  6.              </xsd:restriction>
  7.             </xsd:simpleType>
  8.            </xsd:element>
  9.  
Nov 6 '12 #1
1 2293
Luuk
1,047 Expert 1GB
(source: http://www.w3schools.com/schema/schema_facets.asp)
This example defines another element called "password" with a restriction. The value must be minimum five characters and maximum eight characters:


Expand|Select|Wrap|Line Numbers
  1.  <xs:element name="password">
  2.   <xs:simpleType>
  3.      <xs:restriction base="xs:string">
  4.        <xs:minLength value="5"/>
  5.        <xs:maxLength value="8"/>
  6.      </xs:restriction>
  7.    </xs:simpleType>
  8. </xs:element>
Nov 10 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Avnish | last post by:
Hi, I am looking for some form of validation for all the alphanumeric characters in the entire unicode range e.g. the validation should also accept japanese characters but should restrict...
22
by: johny smith | last post by:
I have never really understood the difference between 1.) #define NUMBER 1.653 vs. 2.) const double NUMBER = 1.653 I know that the #define is taken care of by the pre-processor and the...
6
by: johkar | last post by:
I am in the process of editing the below code I found online, I have a from multi-select list and a to multi-select list. Before rewriting the to list, I want to sort it but ignore the "F - " and...
6
by: Nick | last post by:
Hi, How can I check if a number exists by itself in this string by using the RegExp object? --- var mystring = "11,111,01,011"; var match = "1"; var re = new RegExp( match );
1
by: Faree | last post by:
I am workign on a news portal which needs paginaiton as usual.but all the code i got depends on the number of records that will come from database :( .it is working well too. But i need...
9
by: pozz | last post by:
Hi all, I have the below #defines #define NUMBER1 30 #define NUMBER2 50 #define SUM (NUMBER1+NUMBER2) #define STRING1 "Byte: \x30" #define STRING2 "Byte: \x50"...
7
by: Peng Yu | last post by:
I'm not very clear about when to use #define and when to use const? #define number 4 const int number = 4; If I just want to define a global constant, which way of the above is better? ...
0
by: Darren | last post by:
Hello, I am trying to design an ASP system which will submit the contents of a feedback form to a partner, based on a daily maximum number of feedback forms per day. For example, if...
6
by: nycjay | last post by:
I am tring to clean up data in some of our fields. The requirement is to only have letter (a-z,A-Z) and number (0-9) characters in the field... So, if we select from the non-cleaned-up field, we...
25
by: Umesh | last post by:
Please try to do it while I try myself!
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.