From: Adam R. <ad...@ex...> - 2014-01-25 21:11:21
|
> +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. SaxDocumentTrigger should be changed to an interface, with the current abstractions from FilteringTrigger placed into a class called IdentitySaxDocumentTrigger which implements SaxDocumentTrigger. The following methods should also be moved from DocumentTrigger to SaxDocumentTrigger- public boolean isValidating(); public void setValidating(boolean validating); public void setOutputHandler(ContentHandler handler); public void setLexicalOutputHandler(LexicalHandler handler); public ContentHandler getOutputHandler(); public ContentHandler getInputHandler(); public LexicalHandler getLexicalOutputHandler(); public LexicalHandler getLexicalInputHandler(); By doing this, we will have a clean separation between document triggers which handle SAX events, and document triggers which do not. This allows people to ignore SAX if they just want to implement the simple Document Trigger events of 'before...' and 'after...'. -- Adam Retter eXist Developer { United Kingdom } ad...@ex... irc://irc.freenode.net/existdb |