[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Conditional statements in DTD?

  • From: "C. M. Sperberg-McQueen" <cmsmcq@b...>
  • To: rjelliffe@a...
  • Date: Wed, 25 Mar 2009 11:00:01 -0600

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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.