[XML-DEV Mailing List Archive Home]
[By Thread]
[By Date]
RE: [xml-dev] What should TrAX look like? (Was: Re: [xml-dev] Article on JAXP 1.3 "Fast and Easy XML Processing")
- To: "'Elliotte Harold'" <elharo@...>,<kjones@...>
- Subject: RE: [xml-dev] What should TrAX look like? (Was: Re: [xml-dev] Article on JAXP 1.3 "Fast and Easy XML Processing")
- From: "Michael Kay" <mike@...>
- Date: Sat, 19 Feb 2005 11:23:33 -0000
- Cc: <xml-dev@...>
- In-reply-to: <42171F07.8090304@...>
- Thread-index: AcUWdBErYC3t9wCYRO2V1wSrn3IJ5gAAO7Xg
>
> I suspect it would be much cleaner to take an approach like
> Jaxen's. In
> this approach there's a core set of basic operations that all
> model-connectors must implement (getChild, getAttribute, getParent,
> etc.). However most other axes have default implementations
> that build
> on top of the basic operations. For instance, the ancestor axis is
> easily implemented on top of getParent. Thus a minimal implementation
> only has to provide about 20 fairly straight-forward operations.
This is similar to the design of Saxon's NodeInfo interface, except that in
NodeInfo there are no methods such as getParent and getChild, instead the
provider must implement a minimum set of axes: ancestor, child, attribute.
For other axes, the provider can call on helper implementations provided by
Saxon.
Michael Kay
|