473,326 Members | 2,108 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,326 software developers and data experts.

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£¬whose 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 1800
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
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...
1
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....
9
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
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. ...
21
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...
3
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:...
5
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...
22
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...

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.