source: main/trunk/greenstone3/web/interfaces/default/transform/archive2document.xsl@ 32067

Last change on this file since 32067 was 32067, checked in by kjdon, 6 years ago

simple template to convert from archive format into internal gs document format. used for document editing. when we diplay the document in edit mode, we get it from the archives, not the index. So can reflect changes that have been saved but not rebuilt.

File size: 1.1 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<xsl:stylesheet version="1.0"
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns:java="http://xml.apache.org/xslt/java"
5 xmlns:util="xalan://org.greenstone.gsdl3.util.XSLTUtil"
6 xmlns:gslib="http://www.greenstone.org/skinning"
7 xmlns:gsf="http://www.greenstone.org/greenstone3/schema/ConfigFormat"
8 extension-element-prefixes="java util"
9 exclude-result-prefixes="java util gsf">
10
11
12 <!-- identity transform -->
13 <xsl:template match="@*|node()">
14 <xsl:copy>
15 <xsl:apply-templates select="@*|node()"/>
16 </xsl:copy>
17 </xsl:template>
18
19 <!-- rename Section to documentNode -->
20 <xsl:template match="Section">
21 <documentNode><xsl:apply-templates select="@*|node()" /></documentNode>
22 </xsl:template>
23 <!-- rename Description to metadataList -->
24 <xsl:template match="Description">
25 <metadataList><xsl:apply-templates select="@*|node()" /></metadataList>
26 </xsl:template>
27 <!-- rename Content to nodeContent -->
28 <xsl:template match="Content">
29 <nodeContent><xsl:apply-templates select="@*|node()" /></nodeContent>
30 </xsl:template>
31
32</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.