source: pmb4.2/trunk/fuentes/pmb/admin/convert/imports/usmarciso2pmbxmlunimarc/clean.xsl @ 815

Last change on this file since 815 was 815, checked in by jrpelegrina, 5 years ago

Initial release of pmb 4.2

  • Property svn:executable set to *
File size: 1.4 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                <xsl:output method="xml" indent='yes'/>
5       
6<xsl:template match="@*">
7        <xsl:copy/>
8</xsl:template>
9
10<xsl:template match="text()">
11        <xsl:choose>
12                <xsl:when test="substring(.,string-length(.))='/'">
13                        <xsl:value-of select="normalize-space(substring(.,1,string-length(.)-1))"></xsl:value-of>
14                </xsl:when>
15                <xsl:when test="substring(.,string-length(.))=':'">
16                        <xsl:value-of select="normalize-space(substring(.,1,string-length(.)-1))"></xsl:value-of>
17                </xsl:when>
18                <xsl:when test="substring(.,string-length(.))=','">
19                        <xsl:value-of select="normalize-space(substring(.,1,string-length(.)-1))"></xsl:value-of>
20                </xsl:when>
21                <xsl:when test="substring(.,string-length(.))=';'">
22                        <xsl:value-of select="normalize-space(substring(.,1,string-length(.)-1))"></xsl:value-of>
23                </xsl:when>
24                <xsl:when test="substring(.,string-length(.))='.'">
25                        <xsl:value-of select="normalize-space(substring(.,1,string-length(.)-1))"></xsl:value-of>
26                </xsl:when>
27                <xsl:otherwise>
28                        <xsl:value-of select="normalize-space(.)"></xsl:value-of>
29                </xsl:otherwise>
30        </xsl:choose>   
31               
32</xsl:template>
33       
34<xsl:template match="*">
35        <xsl:element name="{name()}">
36                <xsl:apply-templates select="* | text() | @*">                 
37                </xsl:apply-templates>
38        </xsl:element>
39</xsl:template>
40
41
42</xsl:stylesheet> 
Note: See TracBrowser for help on using the repository browser.