Re: [xsl] Split files with XSLT2.0 xsl:result-document

Subject: Re: [xsl] Split files with XSLT2.0 xsl:result-document
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 6 Dec 2004 15:01:45 GMT
You haven't said how you are calling the transform.
You want the output directory structure to mimic the input structure.
You could either do that by specifying the output directory at the same
time as the input directory, or by accessing the base-uri of the input
and then using replace to replace the input directory name by the output
directory.  Which is easier/most preferable depends rather on how you
are supplying the input file name.


the last part of your output path, a number or the anchor is just
something like

 href="{$outputdir}/{if (anchor) then anchor/@name else position()}.xml">

assuming that your current sequence is the sequence of contentitem
elements, and that you want to number the named ones, even if the number
is not shown, so
1,2,xyz,4
rather than
1,2,xyz,3

Did you really mean bar#xyz.xml (I'm assuming you didn't in the above)
having a # in the filename would be odd, and complicate the mapping
between file names and URI's.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Current Thread