1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
| <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xi="http://www.w3.org/2001/XInclude" xmlns:svg="http://www.w3.org/2000/svg"
xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns="http://www.tei-c.org/ns/1.0"
xmlns:dbp="http://site.fr/ns/1.0" version="1.0">
<xsl:template match="/">
<xsl:for-each select="//termes/*">
REGUL : INSERT INTO tmp_termes_indexation VALUES ('<xsl:call-template name="regul"></xsl:call-template>');
DIPLO : INSERT INTO tmp_termes_indexation VALUES ('<xsl:call-template name="diplo"></xsl:call-template>');
</xsl:for-each>
</xsl:template>
<xsl:template match="*[ancestor::termes]">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="record">
</xsl:template>
<xsl:template match="bibl3"></xsl:template>
<xsl:template match="//termes"></xsl:template>
<xsl:template name="regul" match="//term/choice">
<xsl:choose>
<xsl:when test="abbr[@type='conventionnel']">
<xsl:choose>
<xsl:when test="reg">
<xsl:apply-templates select="reg[last()]" />
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="abbr" />
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<xsl:when test="abbr and expan and reg">
<xsl:apply-templates select="reg" />
</xsl:when>
<xsl:when test="abbr and expan">
<xsl:apply-templates select="expan" />
</xsl:when>
<xsl:when test="orig and reg">
<xsl:apply-templates select="reg" />
</xsl:when>
<xsl:when test="sic and corr">
<xsl:apply-templates select="corr" />
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="diplo" match="//term/choice">
<xsl:choose>
<xsl:when test="abbr">
<xsl:apply-templates select="abbr"/>
</xsl:when>
<xsl:when test="orig">
<xsl:apply-templates select="orig"/>
</xsl:when>
<xsl:when test="sic">
<xsl:apply-templates select="sic"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="lb">*</xsl:template>
</xsl:stylesheet> |
Partager