Permalink
Browse files

Merge branch 'master' of github.com:CDRH/abbot

  • Loading branch information...
2 parents dd512ce + d94ea96 commit dc628e144b7c7490e6800fa5eae3ddf40011ed3e @sramsay sramsay committed May 20, 2013
Showing with 12,031 additions and 11,682 deletions.
  1. +38 −32 resources/config/abbot_config.xml
  2. +2,784 −0 resources/config/abbot_custom.xml
  3. +9,188 −11,643 resources/target/tei_all.rng
  4. +21 −7 resources/xslt/metaStylesheetForRNGschemas.xsl
@@ -6,7 +6,7 @@
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
xmlns:tei="http://www.tei-c.org/ns/1.0">
- <sitemap date="2012-08-28">
+ <sitemap date="2013-04-10">
<transformations default="custom-transformation" loggingType="XPath">
@@ -17,6 +17,43 @@
<custom-transformations>
<transformation type="xslt" activate="yes">
+ <desc>process the root element</desc>
+ <xsl:template match="*[not(parent::*)]" priority="1">
+
+ <xsl:processing-instruction name="xml-model">
+ <xsl:text>href="</xsl:text>
+ <xsl:value-of select="$user-supplied-xml-model"/>
+ <xsl:text>"</xsl:text>
+ </xsl:processing-instruction>
+
+ <!-- retain for testing <xsl:processing-instruction name="user-supplied-namespace">
+ <xsl:text>href="</xsl:text>
+ <xsl:value-of select="$user-supplied-namespace"/>
+ <xsl:text>"</xsl:text>
+ </xsl:processing-instruction>-->
+
+ <xsl:element name="TEI" namespace="{$user-supplied-namespace}">
+ <xsl:for-each select="attribute::*">
+ <xsl:choose>
+ <xsl:when
+ test="name() = 'n'
+ or name() = 'id'
+ or name() = 'xml:id'">
+ <xsl:attribute name="xml:id">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:when>
+ <!--<xsl:otherwise>
+ <xsl:apply-templates/>
+ </xsl:otherwise>-->
+ </xsl:choose>
+ </xsl:for-each>
+ <xsl:apply-templates/>
+ </xsl:element>
+ </xsl:template>
+ </transformation>
+
+ <transformation type="xslt" activate="yes">
<desc>add 'div' around 'stage' where lacking</desc>
<xsl:template match="stage[preceding-sibling::*[1][name()='sp' or name()='stage']]"
priority="1">
@@ -2343,37 +2380,6 @@
</transformation>
<transformation type="xslt" activate="yes">
- <desc>process the root element</desc>
- <xsl:template match="*[not(parent::*)]" priority="1">
-
- <xsl:processing-instruction name="xml-model">
- <xsl:text>href="</xsl:text>
- <xsl:value-of select="$user-supplied-xml-model"/>
- <xsl:text>"</xsl:text>
- </xsl:processing-instruction>
-
- <xsl:element name="TEI" namespace="{$user-supplied-namespace}">
- <xsl:for-each select="@*">
- <xsl:choose>
- <xsl:when
- test="name() = 'n'
- or name() = 'id'
- or name() = 'xml:id'">
- <xsl:attribute name="xml:id">
- <xsl:value-of select="."/>
- </xsl:attribute>
- </xsl:when>
- <!--<xsl:otherwise>
- <xsl:apply-templates/>
- </xsl:otherwise>-->
- </xsl:choose>
- </xsl:for-each>
- <xsl:apply-templates/>
- </xsl:element>
- </xsl:template>
- </transformation>
-
- <transformation type="xslt" activate="yes">
<desc>suppress 'idg' element</desc>
<xsl:template match="*[lower-case(name())='idg']" priority="1"/>
</transformation>
Oops, something went wrong.

0 comments on commit dc628e1

Please sign in to comment.