Enterprise Administration > Windchill Export and Import > Import and Export Policies, Mapping Rules, and Conflict Messages > XSL-based Policy Files > Policy File Examples > Export
  
Export
<?xml version="1.0" ?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version=2.0">
<xsl:output method="xml" indent="no" encoding=UTF-8" />
<!--

The syntax of Export Policy is standard XSL syntax. The
output of XSLT using the XSL policy file must have at
most one element of the form:

<actionInfo>
<action>...</action>
</actionInfo>
-->
<!--
The following is a sample of a well-formed xsl. In the
cases where there are no specific actions to be
performed, the target xml (which is being transformed)
should be copied as it is, which is the default action
that would transpire as shown in the uncommented section
below.
-->
<!--

<xsl:template match=@* | node()" priority="-9">
<xsl:copy><xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>

<xsl:template match=’WTPart’>
<actionInfo>
<action>Checkout</action>
</actionInfo>
</xsl:template>

<xsl:template match=’WTDocument’>
<actionInfo>
<xsl:choose>
<xsl:when test="number"’TESTDOC-1’">
<action>Checkout</action>
</xsl:when>
<xsl:otherwise>
<action>Lock</action>
</xsl:otherwise>
</xsl:choose>
</actionInfo>
<xsl:template>

-->
<!-- Copy everything as is by default -->
<xsl:template match=@* | node()" priority="-9">
<xsl:copy>
<xsl:apply-templates select=@* | node()" />
</xsl:copy>
<xsl:template>
</xsl:stylesheet>