473,796 Members | 2,455 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to define a "blacklist" schema type?

Hi all,
I want to write a schema file to validate my xml file, and
encounter a problem as follow.
the xml file contains a <pathnode£¬whos e value should be a string not
included by a blanklist(for instance, {"/bin", "/root", "/usr"}), how
to define a "blanklist" type use simpleType to
implement this, or any other advices?
Thanks !!

May 15 '07 #1
3 1824
Enumeration won't do it, since you want to enumerate the forbidden
values. You might be able to get this via regular expressions... or it
might make more sense to just check it in the application rather than in
the schema. Given your examples, I suspect that this may actually wind
up wanting to be decided on a per-installation or per-user basis, which
would be another reason to keep it in the application rather than the
schema.

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
May 15 '07 #2
On 5ÔÂ15ÈÕ, ÏÂÎç8ʱ25·Ö, Joe Kesselman <keshlam-nos....@comcast .netwrote:
Enumeration won't do it, since you want to enumerate the forbidden
values. You might be able to get this via regular expressions... or it
might make more sense to just check it in the application rather than in
the schema. Given your examples, I suspect that this may actually wind
up wanting to be decided on a per-installation or per-user basis, which
would be another reason to keep it in the application rather than the
schema.

--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry
thanks for your reply.
Using regular expressions to describe such a "blacklist" is too hard.
Actually, I use an xml as the configure file of my application,
the configuration validation and the configuration loading are
seprated,
so i must do the restriction at the stage of configuration validation.

May 15 '07 #3
Peter Wang wrote:
Using regular expressions to describe such a "blacklist" is too hard.
The only alternative I can think of is application code. I'd love to be
wrong about that. Good luck...

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
May 15 '07 #4

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

Similar topics

5
2078
by: ScratchMonkey | last post by:
I'm working on a system which exposes TCL scripting but looks to be difficult to extend with a native binary. I need to build a "front end" for it that has lots of complicated data structures and can benefit from strong typing, so C++ is a more natural choice for implementation. Does there exist a C++ compiler that generates TCL as its output?
1
2176
by: mike | last post by:
regards: I write java code to simulate my machine as a HTTP server, what is the "MUST REPLY" HTTP response headers? In my small survey,I think there are 2 "MUST REPLY" HTTP response headers. (1)Content-Length: (length of content which will be transmitted) (2)Content-Type: (by
9
7999
by: Yan Vinogradov | last post by:
Hi, Turns out it's possible to spoof another type with Object.GetType method. If you do this: namespace N { class C { public new Type GetType() { return (String.Empty.GetType()); }
4
3903
by: Jason | last post by:
I'm troubleshooting a program that I didn't build, so forgive me on this one. It's called email.php, and it looks like a program that the original developer must have downloaded from somewhere. The part of the program that sends an email states this: $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Additional headers if (isset($_REQUEST)){ $headers .= 'Bcc: '.$bcc....
21
35541
by: Ram Prasad | last post by:
I am trying to write a simple libspf2 plugin code for my postfix ( milter) I am getting this unhelpful error message when I try to compile gcc -g1 -Wall -I/usr/local/include/spf2 -I. -c mfunc.c In file included from mfunc.c:1: mfunc.c:42: error: expected ')' before '*' token make: *** Error 1 my mfunc.c has on the line 42
3
2258
by: anotherjoe | last post by:
Question 1: I have reservation database in access 2007 I have a cabin information table with: cabinid (primarykey) cabinname(text) cabinlocation(text) I have a customer table with: customer id(primary key) last name (text)
5
3290
by: camphor | last post by:
hi, I have found an upload script in hotscripts and have implemented it into the website, I followed the installation steps to 'give write permissions to php on the upload folder (which is _uploadedfiles_xxxx) (php must be allowed to move uploaded files to this folder' - uploadedfiles_xxxx. I typed <?php chmod ('_uploadedfiles_xxxx',640); ?> into notepad and saved it as php in the uploaded_xxxx folder, when I went to test it, the error...
22
2655
by: Voodoo Jai | last post by:
I have a page the uses a form to pass a postcode to another page and I want to test it against an SQL Injection. What would be a safe (i.e NO DELETING of data ) statement to try and how would I format this to try in the form. I have limited the field to 10 chars so I know i would have to test it with a larger field because a hacker could just rewrite the form and use a lerger field for the attempted attack. Many thanks in advance
0
9680
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9528
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10455
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10006
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6788
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5441
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4116
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2925
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.