comparison software/eXist/webapp/mpdl/presentation/pageXml.xsl @ 7:5589d865af7a

Erstellung XQL/XSL Applikation
author Josef Willenborg <jwillenborg@mpiwg-berlin.mpg.de>
date Tue, 08 Feb 2011 15:16:46 +0100
parents
children
comparison
equal deleted inserted replaced
6:2396a569e446 7:5589d865af7a
1 <?xml version="1.0"?>
2 <xsl:stylesheet version="2.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:xlink="http://www.w3.org/1999/xlink"
5 xmlns:xs="http://www.w3.org/2001/XMLSchema"
6 xmlns:functx="http://www.functx.com"
7 xmlns:saxon="http://saxon.sf.net/"
8 xmlns:text="http://www.mpiwg-berlin.mpg.de/ns/mpdl/text"
9 xmlns:de="http://www.mpiwg-berlin.mpg.de/ns/de/1.0/"
10 xmlns:dc="http://purl.org/dc/elements/1.1/"
11 xmlns:dcq="http://purl.org/dc/qualifiers/1.0/"
12 xmlns:dct="http://purl.org/dc/terms/1.0/"
13 xmlns:echo="http://www.mpiwg-berlin.mpg.de/ns/echo/1.0/"
14 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
15 xmlns:xhtml="http://www.w3.org/1999/xhtml">
16
17 <xsl:output method="xml" encoding="utf-8"/>
18
19 <xsl:variable name="mode" select="/result/page/mode"/>
20 <xsl:variable name="queryType" select="/result/query/type"/>
21
22 <xsl:template match="result">
23 <xsl:choose>
24 <xsl:when test="$mode = 'pureXml' and ($queryType = 'xpath' or $queryType = 'xquery')">
25 <query-result>
26 <xsl:sequence select="/result/query/result/hits/*"/>
27 </query-result>
28 </xsl:when>
29 <xsl:otherwise><xsl:sequence select="/result/page/content/*"/></xsl:otherwise>
30 </xsl:choose>
31 </xsl:template>
32
33 </xsl:stylesheet>