xsl-list
[Top] [All Lists]

RE: [xsl] deduplicating information in XML files

2012-10-23 09:00:46
Hi people,

Good news.  I just wrapped up this requirement.  

I managed to 
- merge topics with same body into 1 topic
- rewrite the topicrefs to point to the newly created merged topics
- merged maps if they have same subtitle and topicrefs
- export a flat text file containing linking info.

That linking info was needed to correct the current situation in a scripted way 
(Alfresco). E.g.
[mapId].zip [productId1];[ProductId2];... 

The merged maps have timestamp based names as they no longer 1-on-1 map to a 
single product.

vp_2N7002.zip 2N7002
vp_1350996120783.zip 2N7002AK;ON5257;ON5258;ON5520


As a bonus.. it's blazingly fast ;-)
 
So I followed the same approach as Wendell described.  

I first generated all maps and topics to the filesystem.
Next I managed to do the complete merging in memory  using Apache Cocoon 
pipelines which as a side effect exported the files with the correct DocType.

Thx for the great input,
Robby


-----Original Message-----
From: G. Ken Holman [mailto:g(_dot_)ken(_dot_)holman(_at_)gmail(_dot_)com] On 
Behalf Of G. Ken Holman
Sent: Saturday, October 13, 2012 12:28 AM
To: XSL List
Subject: Re: [xsl] deduplicating information in XML files

At 2012-10-12 16:20 -0400, I wrote:
I think this is directly translatable to XQuery, and so I will post 
such a solution to that list.

It slipped my mind that there is no XQuery equivalent to <xsl:result-document> 
in order to create the needed multiple output files.  Of course I didn't think 
of this until I was in the middle of transliterating the code and encountered 
the instruction.

I was able to recreate all of the necessary grouping ... I just couldn't do 
what I wanted with it.

. . . . . . . . . Ken


--
Contact us for world-wide XML consulting and instructor-led training Free 
5-hour lecture: http://www.CraneSoftwrights.com/links/udemy.htm
Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/s/
G. Ken Holman                   mailto:gkholman(_at_)CraneSoftwrights(_dot_)com
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--