Home → Using LincDoc 3.1+ → Frequently Asked Questions (FAQs) → Administrative FAQs
This topic contains frequently asked questions (FAQs) related to completing administrative tasks in LincDoc.
Note: If you have any suggestions for additional FAQ content, contact LincDoc Technical Support.
The following issues are described below:
On the Admin dialog box, on the Advanced Options tab, locate the Document.xml.xslt.csv setting. With this setting, an administrator can manipulate the xslt to change the formatting of fields for a CSV file. The administrator will need to clear (uncheck) the Use Default check box, and copy/paste the code below into the corresponding value text box:
<stylesheet version="1.0"
xmlns="http://www.w3.org/1999/XSL/Transform"
xmlns:java="http://xml.apache.org/xalan/java"
exclude-result-prefixes="java">
<output method="text" />
<template match="/">
<apply-templates select="document" />
</template>
<template match="document">
<value-of select="@doc-id" />
<text>,</text>
<value-of select="@doc-pkg-id" />
<text>,</text>
<call-template name="convert_datetime">
<with-param name="text" select="@created" />
</call-template>
<text>,</text>
<value-of select="@created-by" />
<text>,</text>
<call-template name="convert_datetime">
<with-param name="text" select="@modified" />
</call-template>
<text>,</text>
<value-of select="@modified-by" />
<text>,</text>
<apply-templates select="data" />
</template>
<template match="data">
<for-each select="field|group/row/field[../@index='0']">
<if test="position()!=1">
<text>,</text>
</if>
<if test="not(@type='namedbytes')">
<apply-templates select="." />
</if>
</for-each>
</template>
<template match="data/field">
<call-template name="quote-for-csv">
<with-param name="content" select="." />
</call-template>
</template>
<template match="data/field[@type='time']">
<call-template name="convert_time">
<with-param name="text" select="text()" />
</call-template>
</template>
<template match="data/field[@type='date']">
<call-template name="convert_date">
<with-param name="text" select="text()" />
</call-template>
</template>
<template match="data/group/row/field">
<variable name="fieldname" select="@name" />
<variable name="mvvalue">
<for-each select="../../row/field[@name=$fieldname]">
<if test="position()!=1">
<text>,</text>
</if>
<call-template name="quote-for-csv">
<with-param name="content" select="." />
</call-template>
</for-each>
</variable>
<call-template name="quote-for-csv">
<with-param name="content" select="$mvvalue" />
</call-template>
</template>
<template name="quote-for-csv">
<param name="content" />
<text>"</text>
<call-template name="string-replace-all">
<with-param name="text" select="$content" />
<with-param name="replace" select="'"'" />
<with-param name="by" select="'""'" />
</call-template>
<text>"</text>
</template>
<template name="string-replace-all">
<param name="text" />
<param name="replace" />
<param name="by" />
<choose>
<when test="contains($text, $replace)">
<value-of select="substring-before($text,$replace)" />
<value-of select="$by" />
<call-template name="string-replace-all">
<with-param name="text"
select="substring-after($text,$replace)" />
<with-param name="replace" select="$replace" />
<with-param name="by" select="$by" />
</call-template>
</when>
<otherwise>
<value-of select="$text" />
</otherwise>
</choose>
</template>
<template match="document" mode="header">
<text>doc-id</text>
<text>,</text>
<text>doc-pkg-id</text>
<text>,</text>
<text>created</text>
<text>,</text>
<text>created by</text>
<text>,</text>
<text>modified</text>
<text>,</text>
<text>modified by</text>
<text>,</text>
<apply-templates select="data" mode="header" />
<text>
</text>
</template>
<template match="data" mode="header">
<for-each select="field|group/row/field[../@index='0']">
<if test="position()!=1">
<text>,</text>
</if>
<apply-templates select="." mode="header" />
</for-each>
</template>
<template match="data/field" mode="header">
<value-of select="@name" />
</template>
<template match="data/group/row/field" mode="header">
<value-of select="@name" />
</template>
<variable name="df_iso8601_time"
select="java:java.text.SimpleDateFormat.new('HH:mm:ss')" />
<variable name="df_time"
select="java:java.text.SimpleDateFormat.new('h:mm a')" />
<variable name="df_iso8601_date"
select="java:java.text.SimpleDateFormat.new('yyyy-MM-dd')" />
<variable name="df_date"
select="java:java.text.SimpleDateFormat.new('MM/dd/yyyy')" />
<variable name="iso8601_datetime">
<text>yyyy-MM-dd'T'HH:mm:ss.SSS'Z'</text>
</variable>
<variable name="df_iso8601_datetime"
select="java:java.text.SimpleDateFormat.new($iso8601_datetime)" />
<variable name="df_datetime"
select="java:java.text.SimpleDateFormat.new('MM/dd/yyyy h:mm a')" />
<template name="convert_date">
<param name="text" />
<if test="$text != ''">
<variable name="date"
select="java:parse($df_iso8601_date,$text)" />
<value-of select="java:format($df_date,$date)" />
</if>
</template>
<template name="convert_time">
<param name="text" />
<if test="$text != ''">
<variable name="time"
select="java:parse($df_iso8601_time,$text)" />
<value-of select="java:format($df_time,$time)" />
</if>
</template>
<template name="convert_datetime">
<param name="text" />
<if test="$text != ''">
<variable name="datetime"
select="java:parse($df_iso8601_datetime,$text)" />
<value-of select="java:format($df_datetime,$datetime)" />
</if>
</template>
</stylesheet>