|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Split files with XSLT2.0 xsl:result-document
>>>>> "Robert" == Robert Soesemann <rsoesemann@xxxxxxxxxxx> writes:
Robert> E.g. the input file:
Robert> \in_dir \foo \bar.xml
Robert> Needs to be splitted to
Robert> \out_dir \foo \bar1.xml <-- number unnamed fragments
Robert> \bar2.xml <-- number unnamed fragments \bar#xyz.xml <--
that's not quite right ^
the fragment needs to come after the .xml.
Robert> use /anchor/@name for name extension
Robert> Can anybody help me to solve this? Thanks in advance!
You are right that you can do this with xsl:result-document, as the
href attribute can be an attribute-valued template.
But it's not straight-forward, since the name-relationship you want
between the input documents and the output documents is not a relative
URI.
I think you might want to write an xsl:function to help determine the
output name. Then you can use that function within the href="{expression}".
You can use the base-uri function to get the input file URI.
you can use insert-before to insert the number.
Then if there is an anchor present, use concat to add the fragment-id
--
Colin Paul Adams
Preston Lancashire
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








