OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: [xml-dev] Conditional statements in DTD?
• From: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>
• To: rjelliffe@allette.com.au
• Date: Wed, 25 Mar 2009 11:00:01 -0600

```On 24 Mar 2009, at 19:57 , rjelliffe@allette.com.au wrote:

> So a statement like "you cannot test for prime in XPath1" has an
> implicit "with no false positives" which is true; but for Schematron
> the relevant issue is "with no false negatives" which is certainly
> untrue for XPath 1.

This last bit puzzles me; can you explain?

There are certainly cases where we're interested in a set S
(e.g. the set of primes, or the set of composites), but where
it's expensive to decide at the crucial moment (e.g.  during
validation) whether a particular input is in S or not.

And it can certainly be handy, in such cases, to use some
approximation S', which is not quite S but has some useful
relation to it.  Perhaps S' is a subset of S, so knowing that the
input is in S' tells us it's in S.  Or perhaps S is a subset of
S', so knowing it's not in S' tells us the input is not in S.  (I
think these are what you are calling false positives and
negatives, though you seem to suffer from the illusion that it's
obvious which is which.)

And you have certainly illustrated that Schematron can be told to
use such approximations for the case of prime numbers.

But how does you get from the question "is it possible to
distinguish the primes from the composites using a particular
notation?" to the proposition that "the relevant issue" is the
ability to distinguish not primes from composites but numbers
with factors less than 20 from other numbers?

And why assert or assume that when accurate testing for primality
is not feasible we will always prefer to accept some composites
rather than to exclude some primes?  Doesn't it matter what one
are hoping to do with the results of the test?

If the point at issue is whether it is possible to avoid
rejecting any prime numbers as invalid, then of course you are
right that XPath 1.0 is perfectly adequate to the task.  As is
DTD notation: <!ATTLIST foo y CDATA #IMPLIED> shares with your
XPath 1.0 formulation the property of rejecting no primes.

--
****************************************************************
* C. M. Sperberg-McQueen, Black Mesa Technologies LLC
* http://www.blackmesatech.com
* http://cmsmcq.com/mib
* http://balisage.net
****************************************************************

```

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS