[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Conditional statements in DTD?
On 24 Mar 2009, at 19:57 , rjelliffe@a... 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] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|