RE: substring: explanation of negative or zero $startingLoc behaviour

Whoops, meant to reply-all on this ...
Howard

> -----Original Message-----
> From: Howard Katz [mailto:howardk@fatdog.com]
> Sent: Friday, March 12, 2004 2:53 PM
> To: Ashok Malhotra
> Subject: RE: substring: explanation of negative or zero $startingLoc
> behaviour
>
> That's closer. Or possibly: *If $startingLoc is zero or negative,
> only those characters in non-negative positions are actually
> returned.* The sentence several lines down, "If startingLoc is
> zero or negative, the substring ..." could then be removed.
>
> Nit-picky work, isn't it? It takes a eye to detail and a degree
> of patience I only have in very limited amounts. Good on you
> (collectively) for doing this and still remaining sane. (Or am I
> making an unjustified assumption? :-)
> Howard
>
> > -----Original Message-----
> > From: Ashok Malhotra [mailto:ashokma@microsoft.com]
> > Sent: Friday, March 12, 2004 2:18 PM
> > To: Howard Katz; Michael Kay; public-qt-comments@w3.org
> > Subject: RE: substring: explanation of negative or zero $startingLoc
> > behaviour
> >
> >
> > How about the following?  The sentence in bold or within *s, depending
> > on your mailer is a suggested addition to the summary.
> >
> > Summary: Returns the portion of the value of $sourceString beginning at
> > the position indicated by the value of $startingLoc and continuing for
> > the number of characters indicated by the value of $length. *The result
> > string does not include characters corresponding to negative positions.*
> > More specifically, returns the characters in $sourceString whose
> > position $p obeys:
> >
> >
> > All the best, Ashok
> >
> > -----Original Message-----
> > From: public-qt-comments-request@w3.org
> > [mailto:public-qt-comments-request@w3.org] On Behalf Of Howard Katz
> > Sent: Friday, March 12, 2004 10:40 AM
> > To: Michael Kay; public-qt-comments@w3.org
> > Subject: RE: substring: explanation of negative or zero $startingLoc
> > behaviour
> >
> >
> > What would help me I think is an explanation of what a negative position
> > means.
> > Howard
> >
> > > -----Original Message-----
> > > From: Michael Kay [mailto:mhk@mhk.me.uk]
> > > Sent: Friday, March 12, 2004 10:27 AM
> > > To: 'Howard Katz'; public-qt-comments@w3.org
> > > Subject: RE: substring: explanation of negative or zero $startingLoc
> > > behaviour
> > >
> > >
> > > The definitive statement in the spec is:
> > >
> > > More specifically, returns the characters in $sourceString whose
> > > position $p
> > > obeys:
> > >
> > > fn:round($startingLoc) <= $p < fn:round($startingLoc) +
> > fn:round($length)
> > >
> > > The subsequent paragraphs are just trying to be helpful, and
> > > apparently not
> > > succeeding.
> > >
> > > Michael Kay
> > >
> > > # -----Original Message-----
> > > # From: public-qt-comments-request@w3.org [mailto:public-qt-comments-
> > > # request@w3.org] On Behalf Of Howard Katz
> > > # Sent: 12 March 2004 18:08
> > > # To: public-qt-comments@w3.org
> > > # Subject: fn:substring: explanation of negative or zero $startingLoc
> > > # behaviour
> > > #
> > > #
> > > # F and O: 7.4.3 fn:substring()
> > > #
> > > # The explanation of $startingLoc in 7.4.3 reads, "If $startingLoc is
> > zero
> > > # or
> > > # negative, the substring includes characters from the beginning of
> > the
> > > # $sourceString." I find the meaning of the phrase "from the beginning
> > of
> > > # the
> > > # $sourceString" to be unclear and can't find any other reference to
> > the
> > > # concept of negative character positions within a string.
> > > #
> > > # Out-of-band communication on the www-ql list seems to indicate that
> > the
> > > # concept of "imaginary character positions" preceding the
> > > physical start of
> > > # the string might be a useful way of explaining zero or negative
> > > # $startingLoc
> > > # behaviour. I'd suggest the addition of this or a similar explanation
> > to
> > > # 7.4.3.
> > > #
> > > # Howard
> > >
> > >
> >

Received on Friday, 12 March 2004 19:53:20 UTC