OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: ModSAX: Proposed Core Features

[ Lists Home | Date Index | Thread Index ]
  • From: James Clark <jjc@jclark.com>
  • To: "Duffy, Bruce" <Bruce.Duffy@westgroup.com>
  • Date: Sat, 20 Mar 1999 09:04:41 +0700

"Duffy, Bruce" wrote:
> 
> Hi folks,
> 
> One feature I'd really like to see is a Locator.getByteOffset()
> method.  Obviously this feature would have to be optional, since not
> all XML inputs are indexable files.
> 
> James Clark's non-SAX API for XP implements this method for startElement(),
> but not for the characters() callback, which unfortunately is exactly what
> I need it for.  I could hack XP or another parser, but I'd much rather work
> within the context of SAX.

XP makes this available via SAX by subclassing the SAX Locator class. 
Just cast the Locator to object to com.jclark.xml.sax.Locator.  If you
want to standardize this in SAX, I would suggest adding a Locator2 with
additional methods.

James



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





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS