|
From: Bruce M. <br...@mc...> - 2003-07-15 22:29:07
|
All,
Good - it appears that this is adequately taken care of - does anyone have an
issue with this solution?
regards,
Bruce
On Tuesday 15 July 2003 05:59 pm, Leech, Jonathan wrote:
> Stefan,
>
> I implemented the "splitAttributes" option in PipelineStage.java, so any
> PipelineStage that can split up documents can use it. I had the same
> requirement for XPathSplitter... splitAttributes defaults to false. The
> code I commited looks almost identical to your patch -- One difference and
> something to watch out for is to not copy the DomifyPipelineStage.DOM_KEY
> -- this is used to cache the DOM representation of a document, to avoid
> reparsing, and if you copy this attribute, you will get weird results down
> the line if you use any of the XML parsing pipelines. They will be
> effectively running against the XML document before you split it up... I
> like the name "copyAttributes" better than "splitAttributes". Should I
> change it?
> I too had problem with the config files initially, but I think I've got a
> handle on it now.
>
> -Jonathan
>
> -----Original Message-----
> From: Stefan Krieger [mailto:ste...@co...]
> Sent: Tuesday, July 15, 2003 2:41 PM
> To: bab...@li...
> Subject: [Babeldoc-devel] Splitting Document with Attributes
>
>
> Hello,
>
> I have seen that the new RouterPipelineStage has an option wether to copy
> the attributes to the new document or not.
> I think this should be done generally for all PipelineStage that can split
> up documents.
> I have the same requirement for XPathSpillter and fixed it into the base
> PiplineStage method.
>
> What do you think about introducing a new "standard" stage option, i.e.
> "copyAttributes" ?
> This could be defaulted to false, so it want break with the existing way.
>
> BTW: During our project we have had tremendous trouble with your
> configuration appending mechanism.
> I can't give you any more details, I am just happy that we have it now
> running.
> We ended up with copies of some "config.properties" in our config dir and
> removed some from the babeldoc JARs.
> We are still on version 1.0, so I am not sure if this is already fixed.
>
> Stefan
>
> protected PipelineStageResult[] processHelper(String[] results)
> throws PipelineException, JournalException {
>
> IJournal journal = JournalFactory.getJournal();
> PipelineStageResult[] psresults = new
> PipelineStageResult[results.length];
> String name = this.getNextPipelineStageName();
> //Process each of the documents
> for (int i = 0; i < results.length; ++i) {
> IJournalTicket newTicket = journal.forkTicket(ticket);
> PipelineDocument newDoc = new
> PipelineDocument(results[i].getBytes()); // PATCH: copy attributes
> PipelineDocument doc = getDocument() ;
> for ( Iterator it = doc.keys().iterator(); it.hasNext() ; ) {
> String key = (String) it.next() ;
> newDoc.put( key, doc.get( key ) ) ;
> }
> psresults[i] = new PipelineStageResult(name, newDoc, newTicket);
> }
> return psresults;
> }
>
>
>
> -------------------------------------------------------
> This SF.Net email sponsored by: Parasoft
> Error proof Web apps, automate testing & more.
> Download & eval WebKing and get a free book.
> www.parasoft.com/bulletproofapps1
> _______________________________________________
> Babeldoc-devel mailing list
> Bab...@li...
> https://lists.sourceforge.net/lists/listinfo/babeldoc-devel
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: VM Ware
> With VMware you can run multiple operating systems on a single machine.
> WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
> same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
> _______________________________________________
> Babeldoc-devel mailing list
> Bab...@li...
> https://lists.sourceforge.net/lists/listinfo/babeldoc-devel
|