Pattern facet in Schema

K

kosaraju.puneeth

hi,

I am writing a pattern facet which will recognise Current/voltages
Values.

example:

<xs:pattern value
="[-]?[[?[0-9]*[\.[0-9]*]?V]|[?[0-9]*[\.[0-9]*]?mV]|[?[0-9]*[\.[0-9]*]?uV]|[?[0-9]*[\.[0-9]*]?nV]"/>

usage : -2.0V, 10.9mV, 7nV,...

i am using Xml spy 2006 and it doesnt find the input as faulty when i
give >>"-2.0A" instead of "-2.0V"<< ,it just says that XML file is
valid!!

can anybody tell whats the problem with the PAttern
 
K

kosaraju.puneeth

hey...i´messed up with the [] and () .. hahahahahaha.

<xs:pattern
value="[\-]?[0-9]+(\.[0-9]*)?V|[\-]?[0-9]+(\.[0-9]*)?mV|[\-]?[0-9]+(\.[0-9]*)?uV|[\-]?[0-9]+(\.[0-9]*)?nV"/>


is the right one...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top