Skip to content

Instantly share code, notes, and snippets.

@matejskubic
Created July 17, 2018 14:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matejskubic/f3079aa7f05bcfac48922ad0cc562a22 to your computer and use it in GitHub Desktop.
Save matejskubic/f3079aa7f05bcfac48922ad0cc562a22 to your computer and use it in GitHub Desktop.
Transform Dynamics 365 Finance and Operations XLIFF translations to txt #msdyn365fo
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"
>
<xsl:output method="text" omit-xml-declaration="yes" indent="no"/>
<xsl:template match="/">
<xsl:apply-templates select="xliff:xliff/xliff:file/xliff:body/xliff:group/xliff:trans-unit"/>
</xsl:template>
<xsl:template match="xliff:trans-unit">
<xsl:if test="@approved='yes' and xliff:target/@state='translated' and normalize-space(xliff:target)!=''">
<xsl:value-of select="@id"/>=<xsl:value-of select="xliff:target"/><xsl:value-of select="'&#13;'"/>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment