chunking a very large xml document

Subject: chunking a very large xml document
From: "Munna D" <munna@xxxxxxxxxx>
Date: Fri, 02 Jul 2004 07:40:21 -0500
I have a single large xml file of the following structure:

<product id="m001">
	<record id="m002">
		<el1>aaa</el1>
		<el2>bbb</el2>
	</record>
	
	<record id="m003">
		<el1>ccc</el1>
		<el2>ddd</el2>
	</record>
</product>

I would like to split this up, so that 
(1) each record is saved as a separate file named [value-of-id].xml
(2) each of these new files should have a doctype declaration (ideally one I can change with a parameter)
(3) a manifest file is generated with a list of all record files produced.

I realise this is something like what the chunking stylesheets achieve in docbook, but those are so complex that a newbie like me can't really understand where to start adapting them. I would be really grateful for any pointers or example stylesheets that you may have.

Many thanks,

Munna
-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com
http://promo.mail.com/adsfreejump.htm


Current Thread