James, On 9 Jul 2003 at 10:32, James Cummings wrote:
> Ok. Basically, I have one huge file that acts as a repository, which > I then burst out into individual files so that they can each be > accessed much quicker than pulling an individual element (by id()) out > of the huge file. I don't want to really get into putting the files > into a database or anything along that line. I'm happy to just do the > bursting on the commandline using saxon, it will be a regular but > probably infrequent event (a couple times a month at most), but it > occurred to me that it might be good to have a map:match which would > do this for me. So I (or later someone) would have to just put the > replacement repository in, and click said link to have all the files > created. Just pure laziness, of course, and I could easily just do a > quick .cgi of some sort to run the command. > > -James > > > > >Regards, Upayavira > > > >On 9 Jul 2003 at 9:39, James Cummings wrote: > > > >> Hiya, > >> > >> Does the version of Xalan included with cocoon 2.1m3-dev allow XSLT > >> 2.0? Specifically does it allow xsl:result-document? > >> > >> Having one large file, I have an xslt stylesheet which bursts > >> it into many individual files. It works on the command line > >> with saxon, but when I run the same stylesheet by doing: > >> > >> <map:match pattern="burst-repository"> > >> <map:generate src="repository/repository.xml"/> > >> <map:transform type="xalan" src="style/xsl/burst-repos.xsl"> > >> <map:parameter name="use-request-parameters" value="true"/> > >> </map:transform> <map:serialize type="html"/> </map:match> > >> > >> The files are not created, and even worse, they appear to be > >> appended to the output. > >> > >> I'm sure there is a way around this, and just something silly I've > >> done. Any suggestions? Simplest way is to use the SourceWritingTransformer (SWT). You can have a pipeline that transforms your big XML file into a single XML that contains a number of nodes for the SWT - each one instructs it to create a file. Then, you transform the results of the SWT into some kind of HTML report explaining what happened. You could wrap this pipeline in some kind of host selector/matcher, so that it can only be activated from your machine. Then you can have pipelines that use your smaller files. Make sense? Regards, Upayavira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
