xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: "Michael Kay" <mike AT saxonica.com>
- To: "'Elliotte Harold'" <elharo AT metalab.unc.edu>, "'Frankpeter Lohse'" <frape AT frapelo.de>
- Cc: xom-interest AT lists.ibiblio.org
- Subject: RE: [XOM-interest] location of elements?
- Date: Mon, 30 May 2005 17:16:20 +0100
> >
> > I would like to show the location (row, column) of XML elements in
> > error messages while dealing with the XOM XML tree.
> Creating my own
> > NodeFactory doesn't help because I don't have access to
> the XOMHandlers
> > Location object.
> >
>
> XOM doesn't provide that. Row-columns are two layers below the
> information XOM exposes. That's down in the lexical layer.
> XOM exposes
> the structure layer. I know it would be useful for error
> reporting, but
> offering it would require contorting the API far too much, not to
> mention writing my own SAX parser.
With respect, those are not very good reasons. SAX parsers already provide
the information, and it can be delivered over the API by a single method
getLocation() with a corresponding return class. The implementation of
course is a bit complicated because you have to store the information "out
of band" so there is zero overhead for people who don't need it.
So by all means reject the requirement, but not for these reasons!
Michael Kay
-
[XOM-interest] location of elements?,
Frankpeter Lohse, 05/30/2005
-
Re: [XOM-interest] location of elements?,
Elliotte Harold, 05/30/2005
- RE: [XOM-interest] location of elements?, Michael Kay, 05/30/2005
- <Possible follow-up(s)>
-
Re: [XOM-interest] location of elements?,
Elliotte Harold, 05/30/2005
- RE: [XOM-interest] location of elements?, Michael Kay, 05/30/2005
- Re: [XOM-interest] location of elements?, Frankpeter Lohse, 05/31/2005
-
Re: [XOM-interest] location of elements?,
Elliotte Harold, 05/30/2005
Archive powered by MHonArc 2.6.24.