[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: Outputting to separate files.


Subject: RE: Outputting to separate files.
From: Ed Nixon <ed.nixon@xxxxxxxxxxxxxxxxx>
Date: Tue, 23 Mar 1999 20:14:50 -0500

The latest version of SAXON has this capability via an extension <xsl:output />.

	...edN

-----Original Message-----
From:	Alan Kennedy [SMTP:alank@xxxxxx]
Sent:	Tuesday, March 23, 1999 6:49 PM
To:	xsl-list@xxxxxxxxxxxxxxxx
Subject:	Outputting to separate files.

XSL, Love it! Absolutely marvellous!

One small thing that I would love to have is the ability to redirect output
to a set of output files, directed by the StyleSheet.

For example, say I have a dictionary, like so

<DICT>

<ENTRY>
<WORD>Someword</WORD>
<DEF>Definition of someword</DEF>
</ENTRY>

<ENTRY>
....
</ENTRY>

</DICT>

I'd like to be able to

<xsl:template match="DICT">
    <xsl:for-each select="ENTRY">
             <xsl:output-to filename="{.}.htm"/>
                 <xsl:apply-templates select="../DEF"/>
             </xsl:output-to>
    </xsl:for-each>
</xsl:template>

Could I do this with the existing XSL? Or would I have to roll my own using
the DOM? Or am I failing to grasp the concept of declarative transformation
(vs procedural)?

At the moment, I'm just maintaining my "dictionary" in a wodge of little
files and processing them all individually from the command line, which
means there is a lot of file opening and closing overheads.

Thanks for all the great work, XSL folks. You've radically changed the way I
work.

Regards,

Alan.





 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

begin 600 WINMAIL.DAT
M>)\^(C0!`0:0" `$```````!``$``0>0!@`(````Y 0```````#H``$(@ <`
M& ```$E032Y-:6-R;W-O9G0@36%I;"Y.;W1E`#$(`0V ! `"`````@`"``$$
MD 8`V $```$````1`````P``, (````+``\.``````(!_P\!````40``````
M``"!*Q^DOJ,0&9UN`-T!#U0"`````'AS;"UL:7-T0&UU;&)E<G)Y=&5C:"YC
M;VT`4TU44 !X<VPM;&ES=$!M=6QB97)R>71E8V@N8V]M`````!X``C !````
M!0```%--5% `````'@`#, $````:````>'-L+6QI<W1 ;75L8F5R<GET96-H
M+F-O;0````,`%0P!`````P#^#P8````>``$P`0```!P````G>'-L+6QI<W1 
M;75L8F5R<GET96-H+F-O;2<``@$+, $````?````4TU44#I84TPM3$E35$!-
M54Q"15)2651%0T@N0T]-```#```Y``````L`0#H!`````P!Q.@`````>`/9?
M`0```!H```!X<VPM;&ES=$!M=6QB97)R>71E8V@N8V]M`````@'W7P$```!1
M`````````($K'Z2^HQ 9G6X`W0$/5 (`````>'-L+6QI<W1 ;75L8F5R<GET
M96-H+F-O;0!33510`'AS;"UL:7-T0&UU;&)E<G)Y=&5C:"YC;VT``````P#]
M7P$````#`/]?``````(!]@\!````! ````````*0:@$$@ $`(@```%)%.B!/
M=71P=71T:6YG('1O('-E<&%R871E(&9I;&5S+@`-# $%@ ,`#@```,\'`P`7
M`!0`#@`R``(`1@$!(( #``X```#/!P,`%P`4``T`) `"`#<!`0F `0`A````
M13$Q1D9!.$(X-D4Q1#(Q,3DR,$8P,#8P-C<T,SE$-34`# <!`Y &`$ (```B
M````"P`"``$````+`",```````,`)@``````"P`I```````#`"X```````,`
M-@``````0 `Y`-")7+>3=;X!'@!P``$````B````4D4Z($]U='!U='1I;F<@
M=&\@<V5P87)A=&4@9FEL97,N`````@%Q``$````6`````;YUD[=3B_H?XN&&
M$=*2#P!@9T.=50``'@`># $````%````4TU44 `````>`!\,`0```!L```!E
M9"YN:7AO;D!,>6YN4&%R:U!L86-E+F]R9P```P`&$&0PV*,#``<00@0``!X`
M"! !````90```%1(14Q!5$535%9%4E-)3TY/1E-!6$].2$%35$A)4T-!4$%"
M24Q)5%E624%!3D585$5.4TE/3CQ84TPZ3U544%54+T5$3BTM+2TM3U))1TE.
M04Q-15-304=%+2TM+2U&4D]-.D$``````@$)$ $```#^! ``^@0``/H'``!,
M6D9UK&AR13\`"@$#`?<"I /C`@!C:,$*P'-E=# @!Q,"@T,`4 [F<')Q,@]/
M?29]"H (R" ["6\R-98U`H *@78(D'=K"X"T9#0,8&,`4 L#8P!!@0M@;F<Q
M,#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$PHC4!/S @!<!?.71"-3N2!O #(&T:<&\^=P.@-Q P
MH3RU%Z%$3^Y-99-!@#E!9@MP&D PM)L)P!E@<#K#!:!N8S$@[SV#!8$+8#%1
M:3GR,5 `@,]4H5+A&($<E"AV!" ?P4UJX&0(< = *3\<FD'_!4 ZT@1@!X "
M,"I03^!I(/YJ-Q %0 # "X !D$C1,+'U9S$B0L@B-9 #H!JP.7#N9"'P&+(:
M070QP!R4,:/_&L$YL&VC!! XQ%)@&L X<?L586O@:6WP.&$:< -2:F7>;0.!
M4 (G`"I0=QF@#V#_')0'@ 8B.M$)<#J2&K )`/<]@S&B&+!P"? PHG1B:X"6
M;W4#-6%R%Z!A9#'H_QRR%Y GT00@5*%UDSK2"<&[.2%'06LJ4#4!?:%L?8#H
M+B!9"& G-7$Q4$+!WW9C#V$6H#\1.M)W0@(<E.-^TAR+4F5G"Q$^@&YKGQ:!
M'(R%?U.U-0$M3"UAWW)1`A!T4RJ":^$Z5!!90*$<$#HO+W>)@"XMKE]>LEZR
M+4,<FA*1`(R0```#`! 0``````,`$1 `````'@!"$ $````!``````````,`
M@!#_____0 `',,!G`8N3=;X!0 `(,,!G`8N3=;X!"P``@ @@!@``````P ``
M`````$8``````X4````````#``* "" &``````# ````````1@`````0A0``
M``````,`!8 (( 8``````, ```````!&`````%*%``#S%0``'@`E@ @@!@``
M````P ```````$8`````5(4```$````%````."XP- `````#`": "" &````
M``# ````````1@`````!A0````````L`+X (( 8``````, ```````!&````
M``Z%`````````P`P@ @@!@``````P ```````$8`````$84````````#`#* 
M"" &``````# ````````1@`````8A0```````!X`08 (( 8``````, `````
M``!&`````#:%```!`````0`````````>`$* "" &``````# ````````1@``
M```WA0```0````$`````````'@!#@ @@!@``````P ```````$8`````.(4`
K``$````!`````````!X`/0`!````!0```%)%.B ``````P`--/TW``":(H4`
`
end


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords
xsl