[Home] [By Thread] [By Date] [Recent Entries]

  • From: John Cowan <cowan@l...>
  • To: xml-dev@i...
  • Date: Fri, 1 Oct 1999 11:56:26 -0400 (EDT)

David Megginson scripsit:
> 
> Toshimitsu Suzuki <tsuzu@f...> writes:
> 
> > I have a question the behavier of getColumnNumber in Locator.  I
> > want to get the end position of some xml
> > fragment(ie.<element>content</element>) in startElement().  But, one
> > SAX parser replies the end tag's ">", another SAX parser replies
> > "c".  Which is correct?
> 
> The idea of Locator was simply to help get a user close to an error in
> a document: exactly how it works is deliberately unspecified, mainly
> to keep life easy for parser writers (since different parsers use
> different tokenization and look-ahead schemes).  Locator is not
> designed to let you extract text strings from the original document.

Yes, but it would have been nice to define whether the first column
in each line is column 1 or column 0, which is obviously the problem
above.  Ditto with line 1 or line 0.

-- 
John Cowan                                   cowan@c...
       I am a member of a civilization. --David Brin

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@i... the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)



Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member