Print

Print


Hi,
does somebody have any experience with transformation from odt to tei?

I have used an xsl stylesheet from 
http://www.tei-c.org/release/doc/tei-xsl-common/profiles/default/oo/from.html
and transformation runs pretty well with one exception - my result is 
an empty (although valid) xml document.

When I excluded a content from template

<xsl:template match="office:text">
        <body>
            <xsl:variable name="Body">
                <HEAD level="1" magic="true">Start</HEAD>
                <xsl:apply-templates/>
            </xsl:variable>
            <xsl:variable name="Body2">
                <xsl:for-each select="$Body">
                    <xsl:apply-templates mode="pass1"/>
                </xsl:for-each>
            </xsl:variable>
            <xsl:for-each select="$Body2">
                <xsl:for-each-group select="tei:*" 
group-starting-with="tei:HEAD[@level='1']">
                    <xsl:choose>
                        <xsl:when test="self::tei:HEAD[@level='1']">
                            <xsl:call-template 
name="group-by-section"/>
                        </xsl:when>
                        <xsl:otherwise>
                            <xsl:call-template name="inSection"/>
                        </xsl:otherwise>
                    </xsl:choose>
                </xsl:for-each-group>
            </xsl:for-each>
        </body>
    </xsl:template>

and simply replaced with

<xsl:template match="office:text">
        <body>
             <xsl:apply-templates/>
         </body>
    </xsl:template>

then I recieved an xml with the content, although with simple tree 
structure.

I am looking forward for your answers or help.

Thanks.

Přemek.

--
Přemysl Bar
Oddělení rukopisů a starých tisků
Moravská zemská knihovna
Kounicova 65a, 601 87 Brno
tel.: 541 646 159