473,395 Members | 1,948 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,395 software developers and data experts.

Pattern facet in Schema

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

Oct 28 '05 #1
1 1144
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...

Oct 28 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Ashton | last post by:
Hello, I am fairly new to all this XML stuff. I have recently taken over some coding on a project that involves reading in xml documents and validating them based on some schema files. The...
2
by: David Nedrow | last post by:
OK, I have a problem which I'm guessing is simply my inability to figure out a select pattern in XSL. I have an XML file similar to the following: <?xml version="1.0"?> <?xml-stylesheet...
2
by: Johann Sijpkes | last post by:
Hi, Just before going mad I thought asking this newsgroup would be a good idea. I want to validate dates using a schema but somehow the regexp is not performed by the validator? (at w3c..). I...
1
by: Jeff | last post by:
For the life of me, I can't create a working regular expression for a schema pattern to do the following: Validates if an entire word does NOT match the entire word in the pattern. For...
4
by: aevans1108 | last post by:
expanding this message to microsoft.public.dotnet.xml Greetings Please direct me to the right group if this is an inappropriate place to post this question. Thanks. I want to format a...
0
by: ashoksharma2621 | last post by:
I'm using Xerces-J-2.6.2 it barks at me with org.xml.sax.SAXParseException: InvalidRegex: Pattern value '?(\d+|\d+(\.\d+)?%)(,\s*?(\d+|\d+(\.\d+)?%))*' is not a valid regular expression. The...
2
by: hil12345 | last post by:
Hello I Wonder if any one could give me a hand, I am trying to implement a numeric type restriction on an xml scheme. Somehow in doesn't work, while string restriction on length do work to...
1
by: Daniel Serodio | last post by:
Is it possible to have an element which is both restricted by a pattern and nillable? Example schema: <xs:simpleType name="cpfType"> <xs:restriction base="xs:string"> <xs:pattern...
2
by: Nerds | last post by:
I declared one element in my XML Schema by restriction base= "xs:dateTime", with the Pattern value as dd/mm/yyyy, when I validate the XML with this format, it shows the error that the give value is...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.