Mercurial > hg > mpdl-group
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/software/eXist/webapp/mpdl/presentation/pageXml.xsl Tue Feb 08 15:16:46 2011 +0100 @@ -0,0 +1,33 @@ +<?xml version="1.0"?> +<xsl:stylesheet version="2.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:functx="http://www.functx.com" + xmlns:saxon="http://saxon.sf.net/" + xmlns:text="http://www.mpiwg-berlin.mpg.de/ns/mpdl/text" + xmlns:de="http://www.mpiwg-berlin.mpg.de/ns/de/1.0/" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:dcq="http://purl.org/dc/qualifiers/1.0/" + xmlns:dct="http://purl.org/dc/terms/1.0/" + xmlns:echo="http://www.mpiwg-berlin.mpg.de/ns/echo/1.0/" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:xhtml="http://www.w3.org/1999/xhtml"> + +<xsl:output method="xml" encoding="utf-8"/> + +<xsl:variable name="mode" select="/result/page/mode"/> +<xsl:variable name="queryType" select="/result/query/type"/> + +<xsl:template match="result"> + <xsl:choose> + <xsl:when test="$mode = 'pureXml' and ($queryType = 'xpath' or $queryType = 'xquery')"> + <query-result> + <xsl:sequence select="/result/query/result/hits/*"/> + </query-result> + </xsl:when> + <xsl:otherwise><xsl:sequence select="/result/page/content/*"/></xsl:otherwise> + </xsl:choose> +</xsl:template> + +</xsl:stylesheet>