<transform
xmlns="http://www.w3.org/1999/XSL/Transform"
xmlns:catalog="urn:oasis:names:tc:entity:xmlns:xml:catalog"
+ xmlns:exslstr="http://exslt.org/strings"
xmlns:书社="urn:fdc:ladys.computer:20231231:Shu1She4"
+ extension-element-prefixes="exslstr"
version="1.0"
>
<template match="/">
<text>|</text>
<choose>
<when test="$destination">
- <value-of select="$destination"/>
+ <variable name="dir">
+ <for-each select="exslstr:tokenize($destination, '/')[not(position()=last())]">
+ <value-of select="."/>
+ <text>/</text>
+ </for-each>
+ </variable>
+ <variable name="name" select="string(exslstr:tokenize($destination, '/')[last()])"/>
+ <value-of select="$dir"/>
+ <choose>
+ <when test="contains($name, '%s')">
+ <value-of select="substring-before($name, '%s')"/>
+ <value-of select="substring-after($name, '%s')"/>
+ </when>
+ <otherwise>
+ <value-of select="$name"/>
+ </otherwise>
+ </choose>
</when>
<otherwise>
<value-of select="substring-after(@name, 'about:shushe?source=')"/>