我这里有一个情况:考虑以下代码作为示例:
<?xml version="1.0" encoding="utf-8"?>
<school id="1" alias="abc" name="St.Josephs" val="">
<teacher id="1">Rose</teacher>
<subject>maths</subject>
</school>
<school id="2" alias="bcd" name="" val="">
<teacher id="2">john</teacher>
<subject>science</subject>
</school>
<school id="3" alias="abc" name="" val="">
<student rollno="12">sarah</student>
<age>13</age>
</school>
<school id="4" alias="bcd" name="St.Mary's" val="">
<student rollno="14">Rosh</student>
<age>14</age>
</school>
现在在这里我需要设计一个 XSLT,它将创建具有来自别名为 abc、bcd 的元素的数据的元素,其输出将是这样的:
<Institutes>
<group>
<content>
<![CDATA[
<html>
<head>
<title>'Rose' is a 'Maths' teacher</title>
</head>
<body>
Rose is a maths teacher for sarah in St.josephs school
</body>
</html>
]]>
</content>
</group>
</Institutes>
<Institutes>
<group>
<content>
<![CDATA[
<html>
<head>
<title>'john' is a 'science' teacher</title>
</head>
<body>
john is a science teacher for Rosh in St.Mary's school
</body>
</html>
]]>
</content>
</group>
</Institutes>
Is there any way to achieve this..??