From: Adam R. <ad...@ex...> - 2014-01-26 13:29:16
|
>> > +1 "PS Think that FilteringTrigger must be renamed to SAXDocumentTrigger >> > (SAXTrigger)" >> >> Agreed, in principle. But I think there is more which should be done. >> DocumentTrigger should not extend the ContentHandler and >> LexicalHandler interfaces, instead SaxDocumentTrigger should extend >> those. > > > yeap > >> >> SaxDocumentTrigger should be changed to an interface, with the current >> abstractions from FilteringTrigger placed into a class called >> IdentitySaxDocumentTrigger which implements SaxDocumentTrigger. > > > Why two elements? I don't see requirements for that, plus there must be > super.method calls and "extends" this will simplify things, so abstract > class will be fine here, IMHO. It is a cleaner design. You have an interface for those people that wish to implement their own triggers where they need to implement all methods. And you have an identity transform in the form of IdentitySaxDocumentTrigger (which implements SaxDocumentTrigger) for those people that just wish to override one or two methods. >> The following methods should also be moved from DocumentTrigger to >> SaxDocumentTrigger- >> >> public boolean isValidating(); >> public void setValidating(boolean validating); > > > Well ... >> >> public void setOutputHandler(ContentHandler handler); >> public void setLexicalOutputHandler(LexicalHandler handler); >> public ContentHandler getOutputHandler(); >> public ContentHandler getInputHandler(); >> public LexicalHandler getLexicalOutputHandler(); >> public LexicalHandler getLexicalInputHandler(); > > > this methods going to be deleted. I do not understand how you can remove those methods and not loose functionality? For example how would I know if I am in the validation or storage phase? Also how can I chain handlers without them? Perhaps you could explain? I look forward to seeing the pull-request :-) -- Adam Retter eXist Developer { United Kingdom } ad...@ex... irc://irc.freenode.net/existdb |