Solved

XML Schema alphanumeric

Posted on 2008-09-30
3
1,859 Views
Last Modified: 2012-05-05
I am designing an XML schema. Below is how i can restrict on element to string only. How can restrict the element to alphanumeric?  


                    <xs:simpleType>
                        <xs:restriction base="xs:string">
                              <xs:pattern value="\[.+\].*"/>
                        </xs:restriction>
                  </xs:simpleType>
0
Comment
Question by:komlaaa
3 Comments
 
LVL 9

Accepted Solution

by:
mbodewes earned 500 total points
ID: 22609634
What does this have to do with Java? This is an XML question only. As the answer is simple, I'll give it here, but please do ask your questions in the correct zone.

Either specify: <"xsd:decimal"/>  or if you are looking for an alphanumeric string, use the regex [0-9]+
0
 

Author Comment

by:komlaaa
ID: 22613818
you sound pist man!
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
rhino JavaScript import, load 25 85
map related example 6 49
fibonacci ten numbers 4 39
hibernate example for saving data 19 43
For customizing the look of your lightweight component and making it look opaque like it was made of plastic.  This tip assumes your component to be of rectangular shape and completely opaque.   (CODE)
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question