<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) 2010 DeltaXML Ltd.  All rights reserved. -->
<!-- This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License version 3 only,
    as published by the Free Software Foundation.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License version 3 for more details
    (a copy is included in the LICENSE-LGPL.txt file that accompanied this code).

    You should have received a copy of the GNU Lesser General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/> -->
<!-- $Id: extract-latest.xsl 6668 2010-07-16 10:06:15Z tristanm $ -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                xmlns:xs="http://www.w3.org/2001/XMLSchema"
                xmlns:delta="http://www.deltaxml.com/ns/track-changes/delta-namespace"
                xmlns:ac="http://www.deltaxml.com/ns/track-changes/attribute-change-namespace"
                xmlns:split="http://www.deltaxml.com/ns/track-changes/split-namespace"
                exclude-result-prefixes="xs delta ac split" 
                version="2.0">
  
  <!-- identity transform -->
  <xsl:template match="@* | node()">
    <xsl:copy>
      <xsl:apply-templates select="@*, node()"/>
    </xsl:copy>
  </xsl:template>
  
  <!-- To extract the latest version of a document, the following items are simply removed from the content -->
  <xsl:template match="delta:* | @delta:* | @ac:* | @split:*"/>
  
  <xsl:template match="*[@delta:removal-change-idref]"/>
  
</xsl:stylesheet>
