Re: [pcgen-xml] Quick question from new monkey - negative logic
- On Mon, Mar 17, 2003 at 11:38:28PM +0000, Robert Henneise wrote:
> Ok, I'm sure this has come up previously somewhere, but the existingwell, that's not valid XML anyway. What we're going to do, I think --
> lst files uses a bit of negative logic (especially PRExxx), and it
> has become quickly apparent to me that just a tag conversion isn't
> going to work for those.
> !PRERACE becomes <!PRERACE>
> which generates some problems with XML (at least, for me)
> So how would I go about using negative logic in XML?
and it's not going to work everywhere... yet -- is to add an 'op'
attribute to all prereq-type tags that inverts the truth of the
statement. To use your example above, you could have
<prerace refname="Dwarf" />
character *is* a dwarf
<prerace refname="Dwarf" op="not" />
character *is not* a dwarf
As I said, it won't work everywhere yet, but it will work where we
already allow !.
PCGen: <reaper/>, smartass
"You just can't argue with a moron. It's like handling Nuclear
waste. It's not good, it's not evil, but for Christ's sake, don't
get any on you!!" -- Chuck, PCGen mailing list