<!--

# =============================================================================

# Copyright © 2016 Typéfi Systems. All rights reserved.

#

# Unless required by applicable law or agreed to in writing, software

# is distributed on an "as is" basis, without warranties or conditions of any

# kind, either express or implied.

# =============================================================================

-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tps="http://www.typefi.com/ContentXML" xmlns:xd="http://www.pnp-software.com/XSLTdoc" version="2.0" exclude-result-prefixes="#all">





    
    <xd:doc type="stylesheet">

        
<xd:short>Converts the whole document in 3 modes: "<code>pre-processing</code>", "<code>#default</code>" and "<code>post-processing</code>".</xd:short>

        
<xd:detail>

            See notes in the corresponding modules:

            
<ol>

                
<li>

                    "
<code>pre-processing</code>" — see <a href="jats-pre-processing.xsl.xd.html">jats-pre-processing.xsl</a>.

                
</li>

                
<li>

                    "
<code>#default</code>" — performs JATS-to-CXML conversion.

                    It should be generally preferred over "
<code>pre-processing</code>" and "<code>post-processing</code>"

                    and contain most of custom transformation logic.

                
</li>

                
<li>

                    "
<code>post-processing</code>" — see <a href="jats-post-processing.xsl.xd.html">jats-post-processing.xsl</a>.

                
</li>

            
</ol>

        
</xd:detail>

        
<xd:cvsId>   $Revision$</xd:cvsId>

    
</xd:doc>






    
    <xd:doc>

        
<xd:short>

            Customize this template if you need to add/remove transformation stages or to support a different document element than

            
<xd:xml><article /></xd:xml>

        
</xd:short>

    
</xd:doc>




    
<xsl:template match="document-node()">

        
<xsl:variable name="pre-processed">

            
<xsl:apply-templates mode="pre-processing" />

        
</xsl:variable>



        
<xsl:variable name="main-stage-result">

            
<xsl:apply-templates select="$pre-processed/article" />

        
</xsl:variable>



        
<xsl:apply-templates select="$main-stage-result" mode="post-processing" />

    
</xsl:template>





    
<xsl:template match="attribute() | node()" mode="pre-processing post-processing">

        
<xsl:copy>

            
<xsl:apply-templates select="attribute() | node()" mode="#current" />

        
</xsl:copy>

    
</xsl:template>



</xsl:stylesheet>













































































v