Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The following stylesheet does the job:</p> <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" xmlns:xs = "http://www.w3.org/2001/XMLSchema" xmlns:w = "http://worksite.imanage.com" exclude-result-prefixes="#all" version="2.0"&gt; &lt;xsl:output indent="yes"/&gt; &lt;xsl:template match="element()"&gt; &lt;xsl:copy&gt; &lt;xsl:apply-templates select="@*, node()"/&gt; &lt;/xsl:copy&gt; &lt;/xsl:template&gt; &lt;xsl:template match="attribute()|text()|comment()|processing-instruction()"&gt; &lt;xsl:copy/&gt; &lt;/xsl:template&gt; &lt;xsl:template match = "//w:ProfileItem[6]/child::w:Value"&gt; &lt;xsl:element name="{local-name()}" namespace="http://worksite.imanage.com"&gt; &lt;xsl:call-template name="changeDocumentExtension"/&gt; &lt;/xsl:element&gt; &lt;/xsl:template&gt; &lt;xsl:template name="changeDocumentExtension"&gt; &lt;xsl:variable name="iManageExtension" as="xs:string" select="//w:AttributeID[. = 'imProfileExtension']/following::w:Value"/&gt; &lt;xsl:choose&gt; &lt;xsl:when test="$iManageExtension eq 'ACROBAT'"&gt; pdf &lt;/xsl:when&gt; &lt;xsl:when test="$iManageExtension eq 'ANSI'"&gt; txt &lt;/xsl:when&gt; &lt;xsl:when test="$iManageExtension eq 'EXCEL'"&gt; xsl &lt;/xsl:when&gt; &lt;xsl:when test="$iManageExtension eq 'EXCELX'"&gt; xslx &lt;/xsl:when&gt; &lt;xsl:when test="$iManageExtension eq 'HTML'"&gt; htm &lt;/xsl:when&gt; &lt;xsl:when test="$iManageExtension eq 'JPEG'"&gt; jpg &lt;/xsl:when&gt; &lt;xsl:when test="$iManageExtension eq 'PDF230'"&gt; pdf &lt;/xsl:when&gt; &lt;xsl:when test="$iManageExtension eq 'PPT'"&gt; ppt &lt;/xsl:when&gt; &lt;xsl:when test="$iManageExtension eq 'PPTX'"&gt; pptx &lt;/xsl:when&gt; &lt;xsl:when test="$iManageExtension eq 'WORD'"&gt; doc &lt;/xsl:when&gt; &lt;xsl:when test="$iManageExtension eq 'WORDX'"&gt; docx &lt;/xsl:when&gt; &lt;xsl:when test="$iManageExtension eq 'WORDXT'"&gt; docx &lt;/xsl:when&gt; &lt;/xsl:choose&gt; &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload