On Fri, 05 Jan 2007 15:32:26 +0100, Philippe Jausions
<Philippe.Jausions 11abacus.com> wrote:
> Tom,
>
> Very good indeed. What might be done is to have the
Structure_ISBN or
> Numeric_ISBN
> package for the conversion & version
identification, and reuse that
> package in
> Validate_ISPN to do more thorough validation. Although
it would probably
> be
> Validate2_ISPN instead due to PHP 4 vs. 5...
>
> One thing that is a little bit odd to me is your
syntax: new ISBN('ISBN
> 992-2878783-0');
Yeah that's because as of the defintion by the yearbook 2001
even this is
a valid ISBN because "ISBN" should be printed
before any ISBN. this is the
main fact i put it in. there is even something related to a
specific
language for the languages which do not use latin chars
normally.
>
> Why put the "ISBN" in the string at all? That
seems out of place.
you do not need to anyway. the minimum requirement in this
case would be
99228787830.
-Tom
>
> -Philippe
>
>
> Tom Klingenberg wrote:
>
> hi phillipe,
>
> shure i did. that was the first thing i was doing back
in july 2006 to
> find out
> where it fits in and if it's possible to extend an
existing package.
> validate_ISPN
> takes it only on the checksum side, meaning, that it
validates against
> the
> checkdigit only. the isbn class i linked to handles
this kind of
> validation as
> well as validation of the different parts. it can even
tell if the isbn
> is about
> an german, english or publication in azerbaijanian
language and if the
> registrants number is correct in terms of length.
comparing both
> validations
> with each other, Validate_ISPN would return TRUE on
ISBN numbers ISBN
> would
> strictly tell you FALSE. don't get me wrong,
validate_ISPN does the job
> it
> claims on ISBN numbers (checksum validation) and often
this is the
> needed check.
>
> what is complementary next to the differences in
validation is the fact
> that
> Validate_ISPN takes care about validation only. my
suggested ISBN draft
> does a
> few things more:
>
> * conversion - convert ISBN 10 to ISBN 13 numbers right
away
> * version identification - pass an ISBN and the class
can guess and
> validtate
> its ISBN version
> * extraction - get prefix, groupidentifier, registrant
and title as well
> as the
> checkdigit (that can lead to many more stuff like
reformatting etc. but
> is
> mainly read only right now)
>
> these are the main differences by functionality. by
code, ISBN is
> compatible to
> php 5 and up, validate_ISPN is php4 compatible. i think
it's the main
> difference
> there.
>
> --tom
>
> On Thu, 04 Jan 2007 19:34:11 +0100, Philippe Jausions
> <Philippe.Jausions 11abacus.com>
> wrote:
>
> Tom,
>
> Have you already looked at http://pear
.php.net/package/Validate_ISPN ?
> Without your code it's impossible to tell if it's
complementary to that
> package...
>
> -Philippe
>
>
--
PEAR Development Mailing List (http://pear.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|