# HG changeset patch
# User Henning Brinkmann <hbrinkm@openoffice.org>
# Date 1284554867 -7200
# Node ID 27e35acbe7bcb36ff28482affc757c8218a0e957
# Parent  180275f9cb56cbb351c8beac39ae854bcbb122a8
rtftok01: use classification in spec to create elements for control words

diff --git a/writerfilter/source/rtftok/commandextract.xsl b/writerfilter/source/rtftok/commandextract.xsl
new file mode 100644
--- /dev/null
+++ b/writerfilter/source/rtftok/commandextract.xsl
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xsl:stylesheet version="1.0" 
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ve="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+                xmlns:o="urn:schemas-microsoft-com:office:office" 
+                xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" 
+                xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" 
+                xmlns:v="urn:schemas-microsoft-com:vml" 
+                xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" 
+                xmlns:w10="urn:schemas-microsoft-com:office:word" 
+                xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" 
+                xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml"
+                xmlns:fn="http://www.w3.org/2005/xpath-functions">
+
+<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="no"/>
+
+<xsl:key name="texts" match="w:p" use="text()"/>
+
+<xsl:template name="preptoken">
+  <xsl:param name="token"/>
+  <xsl:variable name="afterslash" select="substring-after($token, '\')"/>
+  <xsl:variable name="namewithN">
+    <xsl:choose>
+      <xsl:when test="contains($afterslash, ' ')">
+        <xsl:value-of select="substring-before($afterslash, ' ')"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="$afterslash"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:variable>
+  <xsl:choose>
+    <xsl:when test='$namewithN = "&apos;"'>
+      <xsl:text>&amp;apos;</xsl:text>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:value-of select="$namewithN"/>
+    </xsl:otherwise>
+  </xsl:choose>
+</xsl:template>
+
+<xsl:template name="extractinner">
+  <xsl:param name="what"/>
+  <xsl:param name="element"/>
+  <xsl:element name="xsl:when">
+    <xsl:attribute name="test">
+      <xsl:for-each select="w:tr[w:tc[3]/w:p = $what]">
+        <xsl:variable name="token">
+          <xsl:call-template name="preptoken">
+            <xsl:with-param name="token" select="w:tc[1]/w:p"/>
+          </xsl:call-template>
+        </xsl:variable>
+        <xsl:if test="position() &gt; 1">
+          <xsl:text> or </xsl:text>
+        </xsl:if>
+        <xsl:text>$token= "</xsl:text>
+        <xsl:value-of select="$token"/>
+        <xsl:text>"</xsl:text>
+      </xsl:for-each>
+    </xsl:attribute>
+    <xsl:element name="xsl:element">
+      <xsl:attribute name="name">
+        <xsl:value-of select="$element"/>
+      </xsl:attribute>
+      <xsl:element name="xsl:attribute">
+        <xsl:attribute name="name">name</xsl:attribute>
+        <xsl:element name="xsl:value-of">
+          <xsl:attribute name="select">$tokenwithoutN</xsl:attribute>
+        </xsl:element>
+      </xsl:element>
+    </xsl:element>
+  </xsl:element>
+</xsl:template>
+
+<xsl:template name="extract">  
+  <xsl:element name="xsl:choose">
+    <xsl:call-template name="extractinner">
+      <xsl:with-param name="what">Flag</xsl:with-param>
+      <xsl:with-param name="element">flag</xsl:with-param>
+    </xsl:call-template>
+    <xsl:call-template name="extractinner">
+      <xsl:with-param name="what">Destination</xsl:with-param>
+      <xsl:with-param name="element">destination</xsl:with-param>
+    </xsl:call-template>
+    <xsl:call-template name="extractinner">
+      <xsl:with-param name="what">Symbol</xsl:with-param>
+      <xsl:with-param name="element">symbol</xsl:with-param>
+    </xsl:call-template>
+    <xsl:call-template name="extractinner">
+      <xsl:with-param name="what">Toggle</xsl:with-param>
+      <xsl:with-param name="element">toggle</xsl:with-param>
+    </xsl:call-template>
+    <xsl:call-template name="extractinner">
+      <xsl:with-param name="what">Value</xsl:with-param>
+      <xsl:with-param name="element">value</xsl:with-param>
+    </xsl:call-template>
+    <xsl:element name="xsl:otherwise">
+      <xsl:element name="control">
+        <xsl:element name="xsl:attribute">
+          <xsl:attribute name="name">name</xsl:attribute>
+          <xsl:element name="xsl:value-of">
+            <xsl:attribute name="select">
+              <xsl:text>$token</xsl:text>
+            </xsl:attribute>
+          </xsl:element>
+        </xsl:element>
+      </xsl:element>
+    </xsl:element>
+  </xsl:element>
+</xsl:template>
+
+<xsl:template name="maketokentoelement">
+  <xsl:element name="xsl:template">
+    <xsl:attribute name="name">tokentoelement</xsl:attribute>
+    <xsl:element name="xsl:param">
+      <xsl:attribute name="name">token</xsl:attribute>
+    </xsl:element>
+    <xsl:element name="xsl:variable">
+      <xsl:attribute name="name">tokenwithoutN</xsl:attribute>
+      <xsl:element name="xsl:choose">
+        <xsl:element name="xsl:when">
+          <xsl:attribute name="test">
+            <xsl:text>substring($token, string-length($token)) = 'N'</xsl:text>
+          </xsl:attribute>
+          <xsl:element name="xsl:value-of">
+            <xsl:attribute name="select">
+              <xsl:text>substring($token, 1, string-length($token) - 1)</xsl:text>
+            </xsl:attribute>
+          </xsl:element>
+        </xsl:element>
+        <xsl:element name="xsl:otherwise">
+          <xsl:element name="xsl:value-of">
+            <xsl:attribute name="select">
+              <xsl:text>$token</xsl:text>
+            </xsl:attribute>
+          </xsl:element>
+        </xsl:element>
+      </xsl:element>
+    </xsl:element>
+    <xsl:call-template name="extract"/>
+  </xsl:element>
+</xsl:template>
+
+<xsl:template match="/">
+  <xsl:element name="xsl:stylesheet">
+    <xsl:for-each select="key('texts', 'Appendix B: Index of RTF Control Words')">
+      <xsl:for-each select="following::w:tbl[2]">
+        <xsl:call-template name="maketokentoelement"/>
+      </xsl:for-each>
+    </xsl:for-each>
+  </xsl:element>
+</xsl:template>
+
+<xsl:template match="*">  
+</xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
diff --git a/writerfilter/source/rtftok/makemodel.sh b/writerfilter/source/rtftok/makemodel.sh
new file mode 100644
--- /dev/null
+++ b/writerfilter/source/rtftok/makemodel.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+WORDMLSIMPLIFY=wordmlsimplify.xsl
+COMMANDSEXTRACT=commandextract.xsl
+TOKENTOELEMENT=tokentoelement.xsl
+SPECTOBNF=spectobnf.xsl
+BNFSIMPLIFY=bnfsimplify.xsl
+
+xsltproc $WORDMLSIMPLIFY $1 | xsltproc $COMMANDSEXTRACT - > $TOKENTOELEMENT &&
+xsltproc $SPECTOBNF $1 | xsltproc $BNFSIMPLIFY - | xmllint --format -
diff --git a/writerfilter/source/rtftok/spectobnf.xsl b/writerfilter/source/rtftok/spectobnf.xsl
--- a/writerfilter/source/rtftok/spectobnf.xsl
+++ b/writerfilter/source/rtftok/spectobnf.xsl
@@ -14,6 +14,8 @@
 
 <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="no"/>
 
+<xsl:include href="tokentoelement.xsl"/>
+
 <xsl:template name="definename">
   <xsl:param name="token"/>
   <xsl:value-of select="substring-before(substring-after ($token, '&lt;'), '&gt;')"/>
@@ -348,11 +350,11 @@
           <xsl:call-template name="parseright">
             <xsl:with-param name="right" select="$rest"/>
             <xsl:with-param name="prev">
-              <control>
-                <xsl:attribute name="name">
+              <xsl:call-template name="tokentoelement">
+                <xsl:with-param name="token">
                   <xsl:value-of select="substring($token, 2)"/>
-                </xsl:attribute>
-              </control>
+                </xsl:with-param>
+              </xsl:call-template>
             </xsl:with-param>
           </xsl:call-template>
         </xsl:when>
diff --git a/writerfilter/source/rtftok/tokentoelement.xsl b/writerfilter/source/rtftok/tokentoelement.xsl
new file mode 100644
--- /dev/null
+++ b/writerfilter/source/rtftok/tokentoelement.xsl
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+  <xsl:template name="tokentoelement">
+    <xsl:param name="token"/>
+    <xsl:variable name="tokenwithoutN">
+      <xsl:choose>
+        <xsl:when test="substring($token, string-length($token)) = 'N'">
+          <xsl:value-of select="substring($token, 1, string-length($token) - 1)"/>
+        </xsl:when>
+        <xsl:otherwise>
+          <xsl:value-of select="$token"/>
+        </xsl:otherwise>
+      </xsl:choose>
+    </xsl:variable>
+    <xsl:choose>
+      <xsl:when test="$token= &quot;abslock&quot; or $token= &quot;additive&quot; or $token= &quot;adjustright&quot; or $token= &quot;aenddoc&quot; or $token= &quot;aendnotes&quot; or $token= &quot;afelev&quot; or $token= &quot;aftnbj&quot; or $token= &quot;aftnnalc&quot; or $token= &quot;aftnnar&quot; or $token= &quot;aftnnauc&quot; or $token= &quot;aftnnchi&quot; or $token= &quot;aftnnchosung&quot; or $token= &quot;aftnncnum&quot; or $token= &quot;aftnndbar&quot; or $token= &quot;aftnndbnum&quot; or $token= &quot;aftnndbnumd&quot; or $token= &quot;aftnndbnumk&quot; or $token= &quot;aftnndbnumt&quot; or $token= &quot;aftnnganada&quot; or $token= &quot;aftnngbnum&quot; or $token= &quot;aftnngbnumd&quot; or $token= &quot;aftnngbnumk&quot; or $token= &quot;aftnngbnuml&quot; or $token= &quot;aftnnrlc&quot; or $token= &quot;aftnnruc&quot; or $token= &quot;aftnnzodiac&quot; or $token= &quot;aftnnzodiacd&quot; or $token= &quot;aftnnzodiacl&quot; or $token= &quot;aftnrestart&quot; or $token= &quot;aftnrstcont&quot; or $token= &quot;aftntj&quot; or $token= &quot;allowfieldendsel&quot; or $token= &quot;allprot&quot; or $token= &quot;alntblind&quot; or $token= &quot;alt&quot; or $token= &quot;annotprot&quot; or $token= &quot;ansi&quot; or $token= &quot;ApplyBrkRules&quot; or $token= &quot;asianbrkrule&quot; or $token= &quot;autofmtoverride&quot; or $token= &quot;bdbfhdr&quot; or $token= &quot;bdrrlswsix&quot; or $token= &quot;bgbdiag&quot; or $token= &quot;bgcross&quot; or $token= &quot;bgdcross&quot; or $token= &quot;bgdkbdiag&quot; or $token= &quot;bgdkcross&quot; or $token= &quot;bgdkdcross&quot; or $token= &quot;bgdkfdiag&quot; or $token= &quot;bgdkhoriz&quot; or $token= &quot;bgdkvert&quot; or $token= &quot;bgfdiag&quot; or $token= &quot;bghoriz&quot; or $token= &quot;bgvert&quot; or $token= &quot;bkmkpub&quot; or $token= &quot;bookfold&quot; or $token= &quot;bookfoldrev&quot; or $token= &quot;box&quot; or $token= &quot;brdrb&quot; or $token= &quot;brdrbar&quot; or $token= &quot;brdrbtw&quot; or $token= &quot;brdrdash&quot; or $token= &quot;brdrdashd&quot; or $token= &quot;brdrdashdd&quot; or $token= &quot;brdrdashdot&quot; or $token= &quot;brdrdashdotdot&quot; or $token= &quot;brdrdashdotstr&quot; or $token= &quot;brdrdashsm&quot; or $token= &quot;brdrdb&quot; or $token= &quot;brdrdot&quot; or $token= &quot;brdremboss&quot; or $token= &quot;brdrengrave&quot; or $token= &quot;brdrframe&quot; or $token= &quot;brdrhair&quot; or $token= &quot;brdrinset&quot; or $token= &quot;brdrl&quot; or $token= &quot;brdrnil&quot; or $token= &quot;brdrnone&quot; or $token= &quot;brdroutset&quot; or $token= &quot;brdrr&quot; or $token= &quot;brdrs&quot; or $token= &quot;brdrsh&quot; or $token= &quot;brdrt&quot; or $token= &quot;brdrtbl&quot; or $token= &quot;brdrth&quot; or $token= &quot;brdrthtnlg&quot; or $token= &quot;brdrthtnmg&quot; or $token= &quot;brdrthtnsg&quot; or $token= &quot;brdrtnthlg&quot; or $token= &quot;brdrtnthmg&quot; or $token= &quot;brdrtnthsg&quot; or $token= &quot;brdrtnthtnlg&quot; or $token= &quot;brdrtnthtnmg&quot; or $token= &quot;brdrtnthtnsg&quot; or $token= &quot;brdrtriple&quot; or $token= &quot;brdrwavy&quot; or $token= &quot;brdrwavydb&quot; or $token= &quot;brkfrm&quot; or $token= &quot;bxe&quot; or $token= &quot;caccentfive&quot; or $token= &quot;caccentfour&quot; or $token= &quot;caccentone&quot; or $token= &quot;caccentsix&quot; or $token= &quot;caccentthree&quot; or $token= &quot;caccenttwo&quot; or $token= &quot;cachedcolbal&quot; or $token= &quot;cbackgroundone&quot; or $token= &quot;cbackgroundtwo&quot; or $token= &quot;cfollowedhyperlink&quot; or $token= &quot;chbgbdiag&quot; or $token= &quot;chbgcross&quot; or $token= &quot;chbgdcross&quot; or $token= &quot;chbgdkbdiag&quot; or $token= &quot;chbgdkcross&quot; or $token= &quot;chbgdkdcross&quot; or $token= &quot;chbgdkfdiag&quot; or $token= &quot;chbgdkhoriz&quot; or $token= &quot;chbgdkvert&quot; or $token= &quot;chbgfdiag&quot; or $token= &quot;chbghoriz&quot; or $token= &quot;chbgvert&quot; or $token= &quot;chbrdr&quot; or $token= &quot;chyperlink&quot; or $token= &quot;clbgbdiag&quot; or $token= &quot;clbgcross&quot; or $token= &quot;clbgdcross&quot; or $token= &quot;clbgdkbdiag&quot; or $token= &quot;clbgdkcross&quot; or $token= &quot;clbgdkdcross&quot; or $token= &quot;clbgdkfdiag&quot; or $token= &quot;clbgdkhor&quot; or $token= &quot;clbgdkvert&quot; or $token= &quot;clbgfdiag&quot; or $token= &quot;clbghoriz&quot; or $token= &quot;clbgvert&quot; or $token= &quot;clbrdrb&quot; or $token= &quot;clbrdrl&quot; or $token= &quot;clbrdrr&quot; or $token= &quot;clbrdrt&quot; or $token= &quot;cldel2007&quot; or $token= &quot;cldgll&quot; or $token= &quot;cldglu&quot; or $token= &quot;clFitText&quot; or $token= &quot;clhidemark2007&quot; or $token= &quot;clins&quot; or $token= &quot;clmgf&quot; or $token= &quot;clmrg&quot; or $token= &quot;clmrgd&quot; or $token= &quot;clmrgdr&quot; or $token= &quot;clNoWrap&quot; or $token= &quot;clshdrawnil&quot; or $token= &quot;clsplit&quot; or $token= &quot;clsplitr&quot; or $token= &quot;cltxbtlr&quot; or $token= &quot;cltxlrtb&quot; or $token= &quot;cltxlrtbv&quot; or $token= &quot;cltxtbrl&quot; or $token= &quot;cltxtbrlv&quot; or $token= &quot;clvertalb&quot; or $token= &quot;clvertalc&quot; or $token= &quot;clvertalt&quot; or $token= &quot;clvmgf&quot; or $token= &quot;clvmrg&quot; or $token= &quot;cmaindarkone&quot; or $token= &quot;cmaindarktwo&quot; or $token= &quot;cmainlightone&quot; or $token= &quot;cmainlighttwo&quot; or $token= &quot;collapsed&quot; or $token= &quot;contextualspace&quot; or $token= &quot;ctextone&quot; or $token= &quot;ctexttwo&quot; or $token= &quot;ctrl&quot; or $token= &quot;cvmme&quot; or $token= &quot;dbch&quot; or $token= &quot;defformat&quot; or $token= &quot;defshp&quot; or $token= &quot;dgmargin&quot; or $token= &quot;dgsnap&quot; or $token= &quot;dntblnsbdb&quot; or $token= &quot;dobxcolumn&quot; or $token= &quot;dobxmargin&quot; or $token= &quot;dobxpage&quot; or $token= &quot;dobymargin&quot; or $token= &quot;dobypage&quot; or $token= &quot;dobypara&quot; or $token= &quot;doctemp&quot; or $token= &quot;dolock&quot; or $token= &quot;donotshowcomments&quot; or $token= &quot;donotshowinsdel&quot; or $token= &quot;donotshowmarkup&quot; or $token= &quot;donotshowprops&quot; or $token= &quot;dpaendhol&quot; or $token= &quot;dpaendsol&quot; or $token= &quot;dparc&quot; or $token= &quot;dparcflipx&quot; or $token= &quot;dparcflipy&quot; or $token= &quot;dpastarthol&quot; or $token= &quot;dpastartsol&quot; or $token= &quot;dpcallout&quot; or $token= &quot;dpcoaccent&quot; or $token= &quot;dpcobestfit&quot; or $token= &quot;dpcoborder&quot; or $token= &quot;dpcodabs&quot; or $token= &quot;dpcodbottom&quot; or $token= &quot;dpcodcenter&quot; or $token= &quot;dpcodtop&quot; or $token= &quot;dpcominusx&quot; or $token= &quot;dpcominusy&quot; or $token= &quot;dpcosmarta&quot; or $token= &quot;dpcotdouble&quot; or $token= &quot;dpcotright&quot; or $token= &quot;dpcotsingle&quot; or $token= &quot;dpcottriple&quot; or $token= &quot;dpellipse&quot; or $token= &quot;dpendgroup&quot; or $token= &quot;dpfillbgpal&quot; or $token= &quot;dpfillfgpal&quot; or $token= &quot;dpgroup&quot; or $token= &quot;dpline&quot; or $token= &quot;dplinedado&quot; or $token= &quot;dplinedadodo&quot; or $token= &quot;dplinedash&quot; or $token= &quot;dplinedot&quot; or $token= &quot;dplinehollow&quot; or $token= &quot;dplinepal&quot; or $token= &quot;dplinesolid&quot; or $token= &quot;dppolygon&quot; or $token= &quot;dppolyline&quot; or $token= &quot;dprect&quot; or $token= &quot;dproundr&quot; or $token= &quot;dpshadow&quot; or $token= &quot;dptxbtlr&quot; or $token= &quot;dptxbx&quot; or $token= &quot;dptxlrtb&quot; or $token= &quot;dptxlrtbv&quot; or $token= &quot;dptxtbrl&quot; or $token= &quot;dptxtbrlv&quot; or $token= &quot;emfblip&quot; or $token= &quot;enddoc&quot; or $token= &quot;endnhere&quot; or $token= &quot;endnotes&quot; or $token= &quot;expshrtn&quot; or $token= &quot;faauto&quot; or $token= &quot;facenter&quot; or $token= &quot;facingp&quot; or $token= &quot;fafixed&quot; or $token= &quot;fahang&quot; or $token= &quot;faroman&quot; or $token= &quot;favar&quot; or $token= &quot;fbidi&quot; or $token= &quot;fbidis&quot; or $token= &quot;fbimajor&quot; or $token= &quot;fbiminor&quot; or $token= &quot;fdbmajor&quot; or $token= &quot;fdbminor&quot; or $token= &quot;fdecor&quot; or $token= &quot;felnbrelev&quot; or $token= &quot;fetch&quot; or $token= &quot;fhimajor&quot; or $token= &quot;fhiminor&quot; or $token= &quot;fjgothic&quot; or $token= &quot;fjminchou&quot; or $token= &quot;fldalt&quot; or $token= &quot;flddirty&quot; or $token= &quot;fldedit&quot; or $token= &quot;fldlock&quot; or $token= &quot;fldpriv&quot; or $token= &quot;flomajor&quot; or $token= &quot;flominor&quot; or $token= &quot;fmodern&quot; or $token= &quot;fnetwork&quot; or $token= &quot;fnil&quot; or $token= &quot;fnonfilesys&quot; or $token= &quot;forceupgrade&quot; or $token= &quot;formdisp&quot; or $token= &quot;formprot&quot; or $token= &quot;formshade&quot; or $token= &quot;fracwidth&quot; or $token= &quot;frmtxbtlr&quot; or $token= &quot;frmtxlrtb&quot; or $token= &quot;frmtxlrtbv&quot; or $token= &quot;frmtxtbrl&quot; or $token= &quot;frmtxtbrlv&quot; or $token= &quot;froman&quot; or $token= &quot;fromtext&quot; or $token= &quot;fscript&quot; or $token= &quot;fswiss&quot; or $token= &quot;ftech&quot; or $token= &quot;ftnalt&quot; or $token= &quot;ftnbj&quot; or $token= &quot;ftnil&quot; or $token= &quot;ftnlytwnine&quot; or $token= &quot;ftnnalc&quot; or $token= &quot;ftnnar&quot; or $token= &quot;ftnnauc&quot; or $token= &quot;ftnnchi&quot; or $token= &quot;ftnnchosung&quot; or $token= &quot;ftnncnum&quot; or $token= &quot;ftnndbar&quot; or $token= &quot;ftnndbnum&quot; or $token= &quot;ftnndbnumd&quot; or $token= &quot;ftnndbnumk&quot; or $token= &quot;ftnndbnumt&quot; or $token= &quot;ftnnganada&quot; or $token= &quot;ftnngbnum&quot; or $token= &quot;ftnngbnumd&quot; or $token= &quot;ftnngbnumk&quot; or $token= &quot;ftnngbnuml&quot; or $token= &quot;ftnnrlc&quot; or $token= &quot;ftnnruc&quot; or $token= &quot;ftnnzodiac&quot; or $token= &quot;ftnnzodiacd&quot; or $token= &quot;ftnnzodiacl&quot; or $token= &quot;ftnrestart&quot; or $token= &quot;ftnrstcont&quot; or $token= &quot;ftnrstpg&quot; or $token= &quot;ftntj&quot; or $token= &quot;fttruetype&quot; or $token= &quot;fvaliddos&quot; or $token= &quot;fvalidhpfs&quot; or $token= &quot;fvalidmac&quot; or $token= &quot;fvalidntfs&quot; or $token= &quot;gutterprl&quot; or $token= &quot;hich&quot; or $token= &quot;horzdoc&quot; or $token= &quot;horzsect&quot; or $token= &quot;hrule&quot; or $token= &quot;htmautsp&quot; or $token= &quot;htmlbase&quot; or $token= &quot;hwelev2007&quot; or $token= &quot;indmirror&quot; or $token= &quot;indrlsweleven&quot; or $token= &quot;intbl&quot; or $token= &quot;ixe&quot; or $token= &quot;jcompress&quot; or $token= &quot;jexpand&quot; or $token= &quot;jis&quot; or $token= &quot;jpegblip&quot; or $token= &quot;jsksu&quot; or $token= &quot;keep&quot; or $token= &quot;keepn&quot; or $token= &quot;krnprsnet&quot; or $token= &quot;jclisttab&quot; or $token= &quot;landscape&quot; or $token= &quot;lastrow&quot; or $token= &quot;levelpicturenosize&quot; or $token= &quot;linebetcol&quot; or $token= &quot;linecont&quot; or $token= &quot;lineppage&quot; or $token= &quot;linerestart&quot; or $token= &quot;linkself&quot; or $token= &quot;linkstyles&quot; or $token= &quot;listhybrid&quot; or $token= &quot;listoverridestartat&quot; or $token= &quot;lnbrkrule&quot; or $token= &quot;lndscpsxn&quot; or $token= &quot;lnongrid&quot; or $token= &quot;loch&quot; or $token= &quot;ltrch&quot; or $token= &quot;ltrdoc&quot; or $token= &quot;ltrpar&quot; or $token= &quot;ltrrow&quot; or $token= &quot;ltrsect&quot; or $token= &quot;lvltentative&quot; or $token= &quot;lytcalctblwd&quot; or $token= &quot;lytexcttp&quot; or $token= &quot;lytprtmet&quot; or $token= &quot;lyttblrtgr&quot; or $token= &quot;mac&quot; or $token= &quot;macpict&quot; or $token= &quot;makebackup&quot; or $token= &quot;margmirror&quot; or $token= &quot;margmirsxn&quot; or $token= &quot;mmattach&quot; or $token= &quot;mmblanklines&quot; or $token= &quot;mmdatatypeaccess&quot; or $token= &quot;mmdatatypeexcel&quot; or $token= &quot;mmdatatypefile&quot; or $token= &quot;mmdatatypeodbc&quot; or $token= &quot;mmdatatypeodso&quot; or $token= &quot;mmdatatypeqt&quot; or $token= &quot;mmdefaultsql&quot; or $token= &quot;mmdestemail&quot; or $token= &quot;mmdestfax&quot; or $token= &quot;mmdestnewdoc&quot; or $token= &quot;mmdestprinter&quot; or $token= &quot;mmlinktoquery&quot; or $token= &quot;mmmaintypecatalog&quot; or $token= &quot;mmmaintypeemail&quot; or $token= &quot;mmmaintypeenvelopes&quot; or $token= &quot;mmmaintypefax&quot; or $token= &quot;mmmaintypelabels&quot; or $token= &quot;mmmaintypeletters&quot; or $token= &quot;mmshowdata&quot; or $token= &quot;msmcap&quot; or $token= &quot;muser&quot; or $token= &quot;mvf&quot; or $token= &quot;mvt&quot; or $token= &quot;newtblstyruls&quot; or $token= &quot;noafcnsttbl&quot; or $token= &quot;nobrkwrptbl&quot; or $token= &quot;nocolbal&quot; or $token= &quot;nocompatoptions&quot; or $token= &quot;nocwrap&quot; or $token= &quot;nocxsptable&quot; or $token= &quot;noextrasprl&quot; or $token= &quot;nofeaturethrottle&quot; or $token= &quot;nogrowautofit&quot; or $token= &quot;noindnmbrts&quot; or $token= &quot;nojkernpunct&quot; or $token= &quot;nolead&quot; or $token= &quot;noline&quot; or $token= &quot;nolnhtadjtbl&quot; or $token= &quot;nonshppict&quot; or $token= &quot;nooverflow&quot; or $token= &quot;noproof&quot; or $token= &quot;noqfpromote&quot; or $token= &quot;nosectexpand&quot; or $token= &quot;nosnaplinegrid&quot; or $token= &quot;nospaceforul&quot; or $token= &quot;nosupersub&quot; or $token= &quot;notabind&quot; or $token= &quot;notbrkcnstfrctbl&quot; or $token= &quot;notcvasp&quot; or $token= &quot;notvatxbx&quot; or $token= &quot;nouicompat&quot; or $token= &quot;noultrlspc&quot; or $token= &quot;nowidctlpar&quot; or $token= &quot;nowrap&quot; or $token= &quot;nowwrap&quot; or $token= &quot;noxlattoyen&quot; or $token= &quot;objattph&quot; or $token= &quot;objautlink&quot; or $token= &quot;objemb&quot; or $token= &quot;objhtml&quot; or $token= &quot;objicemb&quot; or $token= &quot;objlink&quot; or $token= &quot;objlock&quot; or $token= &quot;objocx&quot; or $token= &quot;objpub&quot; or $token= &quot;objsetsize&quot; or $token= &quot;objsub&quot; or $token= &quot;objupdate&quot; or $token= &quot;oldas&quot; or $token= &quot;oldlinewrap&quot; or $token= &quot;otblrul&quot; or $token= &quot;overlay&quot; or $token= &quot;pagebb&quot; or $token= &quot;pard&quot; or $token= &quot;pc&quot; or $token= &quot;pca&quot; or $token= &quot;pgbrdrb&quot; or $token= &quot;pgbrdrfoot&quot; or $token= &quot;pgbrdrhead&quot; or $token= &quot;pgbrdrl&quot; or $token= &quot;pgbrdrr&quot; or $token= &quot;pgbrdrsnap&quot; or $token= &quot;pgbrdrt&quot; or $token= &quot;pgnbidia&quot; or $token= &quot;pgnbidib&quot; or $token= &quot;pgnchosung&quot; or $token= &quot;pgncnum&quot; or $token= &quot;pgncont&quot; or $token= &quot;pgndbnum&quot; or $token= &quot;pgndbnumd&quot; or $token= &quot;pgndbnumk&quot; or $token= &quot;pgndbnumt&quot; or $token= &quot;pgndec&quot; or $token= &quot;pgndecd&quot; or $token= &quot;pgnganada&quot; or $token= &quot;pgngbnum&quot; or $token= &quot;pgngbnumd&quot; or $token= &quot;pgngbnumk&quot; or $token= &quot;pgngbnuml&quot; or $token= &quot;pgnhindia&quot; or $token= &quot;pgnhindib&quot; or $token= &quot;pgnhindic&quot; or $token= &quot;pgnhindid&quot; or $token= &quot;pgnhnsc&quot; or $token= &quot;pgnhnsh&quot; or $token= &quot;pgnhnsm&quot; or $token= &quot;pgnhnsn&quot; or $token= &quot;pgnhnsp&quot; or $token= &quot;pgnid&quot; or $token= &quot;pgnlcltr&quot; or $token= &quot;pgnlcrm&quot; or $token= &quot;pgnrestart&quot; or $token= &quot;pgnthaia&quot; or $token= &quot;pgnthaib&quot; or $token= &quot;pgnthaic&quot; or $token= &quot;pgnucltr&quot; or $token= &quot;pgnucrm&quot; or $token= &quot;pgnvieta&quot; or $token= &quot;pgnzodiac&quot; or $token= &quot;pgnzodiacd&quot; or $token= &quot;pgnzodiacl&quot; or $token= &quot;phcol&quot; or $token= &quot;phmrg&quot; or $token= &quot;phpg&quot; or $token= &quot;picbmp&quot; or $token= &quot;picscaled&quot; or $token= &quot;pindtabqc&quot; or $token= &quot;pindtabql&quot; or $token= &quot;pindtabqr&quot; or $token= &quot;plain&quot; or $token= &quot;pmartabqc&quot; or $token= &quot;pmartabql&quot; or $token= &quot;pmartabqr&quot; or $token= &quot;pnacross&quot; or $token= &quot;pnaiu&quot; or $token= &quot;pnaiud&quot; or $token= &quot;pnaiueo&quot; or $token= &quot;pnaiueod&quot; or $token= &quot;pnbidia&quot; or $token= &quot;pnbidib&quot; or $token= &quot;pncard&quot; or $token= &quot;pnchosung&quot; or $token= &quot;pncnum&quot; or $token= &quot;pndbnum&quot; or $token= &quot;pndbnumd&quot; or $token= &quot;pndbnumk&quot; or $token= &quot;pndbnuml&quot; or $token= &quot;pndbnumt&quot; or $token= &quot;pndec&quot; or $token= &quot;pndecd&quot; or $token= &quot;pnganada&quot; or $token= &quot;pngblip&quot; or $token= &quot;pngbnum&quot; or $token= &quot;pngbnumd&quot; or $token= &quot;pngbnumk&quot; or $token= &quot;pngbnuml&quot; or $token= &quot;pnhang&quot; or $token= &quot;pniroha&quot; or $token= &quot;pnirohad&quot; or $token= &quot;pnlcltr&quot; or $token= &quot;pnlcrm&quot; or $token= &quot;pnlvlblt&quot; or $token= &quot;pnlvlbody&quot; or $token= &quot;pnlvlcont&quot; or $token= &quot;pnnumonce&quot; or $token= &quot;pnord&quot; or $token= &quot;pnordt&quot; or $token= &quot;pnprev&quot; or $token= &quot;pnqc&quot; or $token= &quot;pnql&quot; or $token= &quot;pnqr&quot; or $token= &quot;pnrestart&quot; or $token= &quot;pnrnot&quot; or $token= &quot;pnucltr&quot; or $token= &quot;pnucrm&quot; or $token= &quot;pnuld&quot; or $token= &quot;pnuldash&quot; or $token= &quot;pnuldashd&quot; or $token= &quot;pnuldashdd&quot; or $token= &quot;pnuldb&quot; or $token= &quot;pnulhair&quot; or $token= &quot;pnulnone&quot; or $token= &quot;pnulth&quot; or $token= &quot;pnulw&quot; or $token= &quot;pnulwave&quot; or $token= &quot;pnzodiac&quot; or $token= &quot;pnzodiacd&quot; or $token= &quot;pnzodiacl&quot; or $token= &quot;posxc&quot; or $token= &quot;posxi&quot; or $token= &quot;posxl&quot; or $token= &quot;posxo&quot; or $token= &quot;posxr&quot; or $token= &quot;posyb&quot; or $token= &quot;posyc&quot; or $token= &quot;posyil&quot; or $token= &quot;posyin&quot; or $token= &quot;posyout&quot; or $token= &quot;posyt&quot; or $token= &quot;prcolbl&quot; or $token= &quot;printdata&quot; or $token= &quot;psover&quot; or $token= &quot;ptabldot&quot; or $token= &quot;ptablmdot&quot; or $token= &quot;ptablminus&quot; or $token= &quot;ptablnone&quot; or $token= &quot;ptabluscore&quot; or $token= &quot;pubauto&quot; or $token= &quot;pvmrg&quot; or $token= &quot;pvpara&quot; or $token= &quot;pvpg&quot; or $token= &quot;qc&quot; or $token= &quot;qd&quot; or $token= &quot;qj&quot; or $token= &quot;ql&quot; or $token= &quot;qr&quot; or $token= &quot;qt&quot; or $token= &quot;rawclbgdkbdiag&quot; or $token= &quot;rawclbgbdiag&quot; or $token= &quot;rawclbgcross&quot; or $token= &quot;rawclbgdcross&quot; or $token= &quot;rawclbgdkcross&quot; or $token= &quot;rawclbgdkdcross&quot; or $token= &quot;rawclbgdkfdiag&quot; or $token= &quot;rawclbgdkhor&quot; or $token= &quot;rawclbgdkvert&quot; or $token= &quot;rawclbgfdiag&quot; or $token= &quot;rawclbghoriz&quot; or $token= &quot;rawclbgvert&quot; or $token= &quot;readonlyrecommended&quot; or $token= &quot;readprot&quot; or $token= &quot;remdttm&quot; or $token= &quot;rempersonalinfo&quot; or $token= &quot;revisions&quot; or $token= &quot;revprot&quot; or $token= &quot;rsltbmp&quot; or $token= &quot;rslthtml&quot; or $token= &quot;rsltmerge&quot; or $token= &quot;rsltpict&quot; or $token= &quot;rsltrtf&quot; or $token= &quot;rslttxt&quot; or $token= &quot;rtlch&quot; or $token= &quot;rtldoc&quot; or $token= &quot;rtlgutter&quot; or $token= &quot;rtlpar&quot; or $token= &quot;rtlrow&quot; or $token= &quot;rtlsect&quot; or $token= &quot;saftnnalc&quot; or $token= &quot;saftnnar&quot; or $token= &quot;saftnnauc&quot; or $token= &quot;saftnnchi&quot; or $token= &quot;saftnnchosung&quot; or $token= &quot;saftnncnum&quot; or $token= &quot;saftnndbar&quot; or $token= &quot;saftnndbnum&quot; or $token= &quot;saftnndbnumd&quot; or $token= &quot;saftnndbnumk&quot; or $token= &quot;saftnndbnumt&quot; or $token= &quot;saftnnganada&quot; or $token= &quot;saftnngbnum&quot; or $token= &quot;saftnngbnumd&quot; or $token= &quot;saftnngbnumk&quot; or $token= &quot;saftnngbnuml&quot; or $token= &quot;saftnnrlc&quot; or $token= &quot;saftnnruc&quot; or $token= &quot;saftnnzodiac&quot; or $token= &quot;saftnnzodiacd&quot; or $token= &quot;saftnnzodiacl&quot; or $token= &quot;saftnrestart&quot; or $token= &quot;saftnrstcont&quot; or $token= &quot;sautoupd&quot; or $token= &quot;saveinvalidxml&quot; or $token= &quot;saveprevpict&quot; or $token= &quot;sbkcol&quot; or $token= &quot;sbkeven&quot; or $token= &quot;sbknone&quot; or $token= &quot;sbkodd&quot; or $token= &quot;sbkpage&quot; or $token= &quot;sbys&quot; or $token= &quot;scompose&quot; or $token= &quot;sectd&quot; or $token= &quot;sectdefaultcl&quot; or $token= &quot;sectspecifycl&quot; or $token= &quot;sectspecifygenN&quot; or $token= &quot;sectspecifyl&quot; or $token= &quot;sectunlocked&quot; or $token= &quot;sftnbj&quot; or $token= &quot;sftnnalc&quot; or $token= &quot;sftnnar&quot; or $token= &quot;sftnnauc&quot; or $token= &quot;sftnnchi&quot; or $token= &quot;sftnnchosung&quot; or $token= &quot;sftnncnum&quot; or $token= &quot;sftnndbar&quot; or $token= &quot;sftnndbnum&quot; or $token= &quot;sftnndbnumd&quot; or $token= &quot;sftnndbnumk&quot; or $token= &quot;sftnndbnumt&quot; or $token= &quot;sftnnganada&quot; or $token= &quot;sftnngbnum&quot; or $token= &quot;sftnngbnumd&quot; or $token= &quot;sftnngbnumk&quot; or $token= &quot;sftnngbnuml&quot; or $token= &quot;sftnnrlc&quot; or $token= &quot;sftnnruc&quot; or $token= &quot;sftnnzodiac&quot; or $token= &quot;sftnnzodiacd&quot; or $token= &quot;sftnnzodiacl&quot; or $token= &quot;sftnrestart&quot; or $token= &quot;sftnrstcont&quot; or $token= &quot;sftnrstpg&quot; or $token= &quot;sftntj&quot; or $token= &quot;shidden&quot; or $token= &quot;shift&quot; or $token= &quot;shpbxcolumn&quot; or $token= &quot;shpbxignore&quot; or $token= &quot;shpbxmargin&quot; or $token= &quot;shpbxpage&quot; or $token= &quot;shpbyignore&quot; or $token= &quot;shpbymargin&quot; or $token= &quot;shpbypage&quot; or $token= &quot;shpbypara&quot; or $token= &quot;shplockanchor&quot; or $token= &quot;slocked&quot; or $token= &quot;snaptogridincell&quot; or $token= &quot;softcol&quot; or $token= &quot;softline&quot; or $token= &quot;softpage&quot; or $token= &quot;spersonal&quot; or $token= &quot;spltpgpar&quot; or $token= &quot;splytwnine&quot; or $token= &quot;sprsbsp&quot; or $token= &quot;sprslnsp&quot; or $token= &quot;sprsspbf&quot; or $token= &quot;sprstsm&quot; or $token= &quot;sprstsp&quot; or $token= &quot;spv&quot; or $token= &quot;sqformat&quot; or $token= &quot;sreply&quot; or $token= &quot;stylelock&quot; or $token= &quot;stylelockbackcomp&quot; or $token= &quot;stylelockenforced&quot; or $token= &quot;stylelockqfset&quot; or $token= &quot;stylelocktheme&quot; or $token= &quot;sub&quot; or $token= &quot;subfontbysize&quot; or $token= &quot;super&quot; or $token= &quot;swpbdr&quot; or $token= &quot;tabsnoovrlp&quot; or $token= &quot;taprtl&quot; or $token= &quot;tbllkbestfit&quot; or $token= &quot;tbllkborder&quot; or $token= &quot;tbllkcolor&quot; or $token= &quot;tbllkfont&quot; or $token= &quot;tbllkhdrcols&quot; or $token= &quot;tbllkhdrrows&quot; or $token= &quot;tbllklastcol&quot; or $token= &quot;tbllklastrow&quot; or $token= &quot;tbllknocolband&quot; or $token= &quot;tbllknorowband&quot; or $token= &quot;tbllkshading&quot; or $token= &quot;tcelld&quot; or $token= &quot;tcn&quot; or $token= &quot;titlepg&quot; or $token= &quot;tldot&quot; or $token= &quot;tleq&quot; or $token= &quot;tlhyph&quot; or $token= &quot;tlmdot&quot; or $token= &quot;tlth&quot; or $token= &quot;tlul&quot; or $token= &quot;toplinepunct&quot; or $token= &quot;tphcol&quot; or $token= &quot;tphmrg&quot; or $token= &quot;tphpg&quot; or $token= &quot;tposxc&quot; or $token= &quot;tposxi&quot; or $token= &quot;tposxl&quot; or $token= &quot;tposxo&quot; or $token= &quot;tposxr&quot; or $token= &quot;tposyb&quot; or $token= &quot;tposyc&quot; or $token= &quot;tposyil&quot; or $token= &quot;tposyin&quot; or $token= &quot;tposyout&quot; or $token= &quot;tposyt&quot; or $token= &quot;tpvmrg&quot; or $token= &quot;tpvpara&quot; or $token= &quot;tpvpg&quot; or $token= &quot;tqc&quot; or $token= &quot;tqdec&quot; or $token= &quot;tqr&quot; or $token= &quot;transmf&quot; or $token= &quot;trbgbdiag&quot; or $token= &quot;trbgcross&quot; or $token= &quot;trbgdcross&quot; or $token= &quot;trbgdkbdiag&quot; or $token= &quot;trbgdkcross&quot; or $token= &quot;trbgdkdcross&quot; or $token= &quot;trbgdkfdiag&quot; or $token= &quot;trbgdkhor&quot; or $token= &quot;trbgdkvert&quot; or $token= &quot;trbgfdiag&quot; or $token= &quot;trbghoriz&quot; or $token= &quot;trbgvert&quot; or $token= &quot;trbrdrb&quot; or $token= &quot;trbrdrh&quot; or $token= &quot;trbrdrl&quot; or $token= &quot;trbrdrr&quot; or $token= &quot;trbrdrt&quot; or $token= &quot;trbrdrv&quot; or $token= &quot;trhdr&quot; or $token= &quot;trkeep&quot; or $token= &quot;trkeepfollow&quot; or $token= &quot;trowd&quot; or $token= &quot;trqc&quot; or $token= &quot;trql&quot; or $token= &quot;trqr&quot; or $token= &quot;truncatefontheight&quot; or $token= &quot;truncex&quot; or $token= &quot;tsbgbdiag&quot; or $token= &quot;tsbgcross&quot; or $token= &quot;tsbgdcross&quot; or $token= &quot;tsbgdkbdiag&quot; or $token= &quot;tsbgdkcross&quot; or $token= &quot;tsbgdkdcross&quot; or $token= &quot;tsbgdkfdiag&quot; or $token= &quot;tsbgdkhor&quot; or $token= &quot;tsbgdkvert&quot; or $token= &quot;tsbgfdiag&quot; or $token= &quot;tsbghoriz&quot; or $token= &quot;tsbgvert&quot; or $token= &quot;tsbrdrb&quot; or $token= &quot;tsbrdrdgl&quot; or $token= &quot;tsbrdrdgr&quot; or $token= &quot;tsbrdrh&quot; or $token= &quot;tsbrdrl&quot; or $token= &quot;tsbrdrr&quot; or $token= &quot;tsbrdrr&quot; or $token= &quot;tsbrdrt&quot; or $token= &quot;tsbrdrv&quot; or $token= &quot;tscbandhorzeven&quot; or $token= &quot;tscbandhorzodd&quot; or $token= &quot;tscbandverteven&quot; or $token= &quot;tscbandvertodd&quot; or $token= &quot;tscfirstcol&quot; or $token= &quot;tscfirstrow&quot; or $token= &quot;tsclastcol&quot; or $token= &quot;tsclastrow&quot; or $token= &quot;tscnecell&quot; or $token= &quot;tscnwcell&quot; or $token= &quot;tscsecell&quot; or $token= &quot;tscswcell&quot; or $token= &quot;tsd&quot; or $token= &quot;tsnowrap&quot; or $token= &quot;tsrowd&quot; or $token= &quot;tsvertalb&quot; or $token= &quot;tsvertalc&quot; or $token= &quot;tsvertalt&quot; or $token= &quot;twoonone&quot; or $token= &quot;txbxtwalways&quot; or $token= &quot;txbxtwfirst&quot; or $token= &quot;txbxtwfirstlast&quot; or $token= &quot;txbxtwlast&quot; or $token= &quot;txbxtwno&quot; or $token= &quot;uld&quot; or $token= &quot;ulnone&quot; or $token= &quot;ulw&quot; or $token= &quot;useltbaln&quot; or $token= &quot;usenormstyforlist&quot; or $token= &quot;usexform&quot; or $token= &quot;utinl&quot; or $token= &quot;vertal&quot; or $token= &quot;vertalb&quot; or $token= &quot;vertalc&quot; or $token= &quot;vertalj&quot; or $token= &quot;vertalt&quot; or $token= &quot;vertdoc&quot; or $token= &quot;vertsect&quot; or $token= &quot;viewnobound&quot; or $token= &quot;webhidden&quot; or $token= &quot;widctlpar&quot; or $token= &quot;widowctrl&quot; or $token= &quot;wpjst&quot; or $token= &quot;wpsp&quot; or $token= &quot;wraparound&quot; or $token= &quot;wrapdefault&quot; or $token= &quot;wrapthrough&quot; or $token= &quot;wraptight&quot; or $token= &quot;wraptrsp&quot; or $token= &quot;wrppunct&quot; or $token= &quot;xmlattr&quot; or $token= &quot;xmlsdttcell&quot; or $token= &quot;xmlsdttpara&quot; or $token= &quot;xmlsdttregular&quot; or $token= &quot;xmlsdttrow&quot; or $token= &quot;xmlsdttunknown&quot; or $token= &quot;yxe&quot;">
+        <xsl:element name="flag">
+          <xsl:attribute name="name">
+            <xsl:value-of select="$tokenwithoutN"/>
+          </xsl:attribute>
+        </xsl:element>
+      </xsl:when>
+      <xsl:when test="$token= &quot;aftncn&quot; or $token= &quot;aftnsep&quot; or $token= &quot;aftnsepc&quot; or $token= &quot;annotation&quot; or $token= &quot;atnauthor&quot; or $token= &quot;atndate&quot; or $token= &quot;atnicn&quot; or $token= &quot;atnid&quot; or $token= &quot;atnparent&quot; or $token= &quot;atnref&quot; or $token= &quot;atntime&quot; or $token= &quot;atrfend&quot; or $token= &quot;atrfstart&quot; or $token= &quot;author&quot; or $token= &quot;background&quot; or $token= &quot;bkmkend&quot; or $token= &quot;bkmkstart&quot; or $token= &quot;blipuid&quot; or $token= &quot;buptim&quot; or $token= &quot;category&quot; or $token= &quot;colorschememapping&quot; or $token= &quot;colortbl&quot; or $token= &quot;comment&quot; or $token= &quot;company&quot; or $token= &quot;creatim&quot; or $token= &quot;datafield&quot; or $token= &quot;datastore&quot; or $token= &quot;defchp&quot; or $token= &quot;defpap&quot; or $token= &quot;do&quot; or $token= &quot;doccomm&quot; or $token= &quot;docvar&quot; or $token= &quot;dptxbxtext&quot; or $token= &quot;ebcend&quot; or $token= &quot;ebcstart&quot; or $token= &quot;factoidname&quot; or $token= &quot;falt&quot; or $token= &quot;fchars&quot; or $token= &quot;ffdeftext&quot; or $token= &quot;ffentrymcr&quot; or $token= &quot;ffexitmcr&quot; or $token= &quot;ffformat&quot; or $token= &quot;ffhelptext&quot; or $token= &quot;ffl&quot; or $token= &quot;ffname&quot; or $token= &quot;ffstattext&quot; or $token= &quot;field&quot; or $token= &quot;file&quot; or $token= &quot;filetbl&quot; or $token= &quot;fldinst&quot; or $token= &quot;fldrslt&quot; or $token= &quot;fname&quot; or $token= &quot;fontemb&quot; or $token= &quot;fontfile&quot; or $token= &quot;fonttbl&quot; or $token= &quot;footer&quot; or $token= &quot;footerf&quot; or $token= &quot;footerl&quot; or $token= &quot;footerr&quot; or $token= &quot;footnote&quot; or $token= &quot;formfield&quot; or $token= &quot;ftncn&quot; or $token= &quot;ftnsep&quot; or $token= &quot;ftnsepc&quot; or $token= &quot;g&quot; or $token= &quot;generator&quot; or $token= &quot;gridtbl&quot; or $token= &quot;header&quot; or $token= &quot;headerf&quot; or $token= &quot;headerl&quot; or $token= &quot;headerr&quot; or $token= &quot;hl&quot; or $token= &quot;hlfr&quot; or $token= &quot;hlinkbase&quot; or $token= &quot;hlloc&quot; or $token= &quot;hlsrc&quot; or $token= &quot;hsv&quot; or $token= &quot;htmltag&quot; or $token= &quot;info&quot; or $token= &quot;keycode&quot; or $token= &quot;keywords&quot; or $token= &quot;latentstyles&quot; or $token= &quot;lchars&quot; or $token= &quot;levelnumbers&quot; or $token= &quot;leveltext&quot; or $token= &quot;lfolevel&quot; or $token= &quot;linkval&quot; or $token= &quot;list&quot; or $token= &quot;listlevel&quot; or $token= &quot;listname&quot; or $token= &quot;listoverride&quot; or $token= &quot;listoverridetable&quot; or $token= &quot;listpicture&quot; or $token= &quot;liststylename&quot; or $token= &quot;listtable&quot; or $token= &quot;listtext&quot; or $token= &quot;lsdlockedexcept&quot; or $token= &quot;manager&quot; or $token= &quot;mhtmltag&quot; or $token= &quot;mmaddfieldname&quot; or $token= &quot;mmconnectstr&quot; or $token= &quot;mmconnectstrdata&quot; or $token= &quot;mmdatasource&quot; or $token= &quot;mmheadersource&quot; or $token= &quot;mmmailsubject&quot; or $token= &quot;mmodso&quot; or $token= &quot;mmodsofilter&quot; or $token= &quot;mmodsofldmpdata&quot; or $token= &quot;mmodsosort&quot; or $token= &quot;mmodsosrc&quot; or $token= &quot;mmodsotable&quot; or $token= &quot;mmodsoudl&quot; or $token= &quot;mmodsoudldata&quot; or $token= &quot;mmquery&quot; or $token= &quot;mvfmf&quot; or $token= &quot;mvfml&quot; or $token= &quot;mvtof&quot; or $token= &quot;mvtol&quot; or $token= &quot;nesttableprops&quot; or $token= &quot;nextfile&quot; or $token= &quot;nonesttables&quot; or $token= &quot;objalias&quot; or $token= &quot;objclass&quot; or $token= &quot;objdata&quot; or $token= &quot;object&quot; or $token= &quot;objname&quot; or $token= &quot;objsect&quot; or $token= &quot;objtime&quot; or $token= &quot;oldcprops&quot; or $token= &quot;oldpprops&quot; or $token= &quot;oldsprops&quot; or $token= &quot;oldtprops&quot; or $token= &quot;oleclsid&quot; or $token= &quot;operator&quot; or $token= &quot;panose&quot; or $token= &quot;password&quot; or $token= &quot;passwordhash&quot; or $token= &quot;pgp&quot; or $token= &quot;pgptbl&quot; or $token= &quot;picprop&quot; or $token= &quot;pict&quot; or $token= &quot;pn&quot; or $token= &quot;pntext&quot; or $token= &quot;pntxta&quot; or $token= &quot;pntxtb&quot; or $token= &quot;printim&quot; or $token= &quot;private&quot; or $token= &quot;propname&quot; or $token= &quot;protend&quot; or $token= &quot;protstart&quot; or $token= &quot;protusertbl&quot; or $token= &quot;pxe&quot; or $token= &quot;result&quot; or $token= &quot;revtbl&quot; or $token= &quot;revtim&quot; or $token= &quot;rsidtbl&quot; or $token= &quot;rtfN&quot; or $token= &quot;rxe&quot; or $token= &quot;shp&quot; or $token= &quot;shpgrp&quot; or $token= &quot;shpinst&quot; or $token= &quot;shppict&quot; or $token= &quot;shprslt&quot; or $token= &quot;shptxt&quot; or $token= &quot;sn&quot; or $token= &quot;sp&quot; or $token= &quot;staticval&quot; or $token= &quot;stylesheet&quot; or $token= &quot;subject&quot; or $token= &quot;sv&quot; or $token= &quot;svb&quot; or $token= &quot;tc&quot; or $token= &quot;template&quot; or $token= &quot;themedata&quot; or $token= &quot;title&quot; or $token= &quot;txe&quot; or $token= &quot;ud&quot; or $token= &quot;upr&quot; or $token= &quot;userprops&quot; or $token= &quot;wgrffmtfilter&quot; or $token= &quot;windowcaption&quot; or $token= &quot;writereservation&quot; or $token= &quot;writereservhash&quot; or $token= &quot;xe&quot; or $token= &quot;xform&quot; or $token= &quot;xmlattrname&quot; or $token= &quot;xmlattrvalue&quot; or $token= &quot;xmlclose&quot; or $token= &quot;xmlname&quot; or $token= &quot;xmlnstbl&quot; or $token= &quot;xmlopen&quot;">
+        <xsl:element name="destination">
+          <xsl:attribute name="name">
+            <xsl:value-of select="$tokenwithoutN"/>
+          </xsl:attribute>
+        </xsl:element>
+      </xsl:when>
+      <xsl:when test="$token= &quot;&amp;apos;&quot; or $token= &quot;-&quot; or $token= &quot;*&quot; or $token= &quot;:&quot; or $token= &quot;\&quot; or $token= &quot;_&quot; or $token= &quot;{&quot; or $token= &quot;|&quot; or $token= &quot;}&quot; or $token= &quot;~&quot; or $token= &quot;bullet&quot; or $token= &quot;cell&quot; or $token= &quot;chatn&quot; or $token= &quot;chdate&quot; or $token= &quot;chdpa&quot; or $token= &quot;chdpl&quot; or $token= &quot;chftn&quot; or $token= &quot;chftnsep&quot; or $token= &quot;chftnsepc&quot; or $token= &quot;chpgn&quot; or $token= &quot;chtime&quot; or $token= &quot;column&quot; or $token= &quot;emdash&quot; or $token= &quot;emspace&quot; or $token= &quot;endash&quot; or $token= &quot;enspace&quot; or $token= &quot;ldblquote&quot; or $token= &quot;line&quot; or $token= &quot;lquote&quot; or $token= &quot;ltrmark&quot; or $token= &quot;nestcell&quot; or $token= &quot;nestrow&quot; or $token= &quot;page&quot; or $token= &quot;par&quot; or $token= &quot;qmspace&quot; or $token= &quot;rdblquote&quot; or $token= &quot;row&quot; or $token= &quot;rquote&quot; or $token= &quot;rtlmark&quot; or $token= &quot;sect&quot; or $token= &quot;sectnum&quot; or $token= &quot;tab&quot; or $token= &quot;zwbo&quot; or $token= &quot;zwj&quot; or $token= &quot;zwnbo&quot; or $token= &quot;zwnj&quot;">
+        <xsl:element name="symbol">
+          <xsl:attribute name="name">
+            <xsl:value-of select="$tokenwithoutN"/>
+          </xsl:attribute>
+        </xsl:element>
+      </xsl:when>
+      <xsl:when test="$token= &quot;ab&quot; or $token= &quot;absnoovrlpN&quot; or $token= &quot;acaps&quot; or $token= &quot;acccircle&quot; or $token= &quot;acccomma&quot; or $token= &quot;accdot&quot; or $token= &quot;accnone&quot; or $token= &quot;accunderdot&quot; or $token= &quot;ai&quot; or $token= &quot;aoutl&quot; or $token= &quot;ascaps&quot; or $token= &quot;ashad&quot; or $token= &quot;aspalpha&quot; or $token= &quot;aspnum&quot; or $token= &quot;astrike&quot; or $token= &quot;aul&quot; or $token= &quot;auld&quot; or $token= &quot;auldb&quot; or $token= &quot;aulnone&quot; or $token= &quot;aulw&quot; or $token= &quot;b&quot; or $token= &quot;caps&quot; or $token= &quot;deleted&quot; or $token= &quot;disabled&quot; or $token= &quot;embo&quot; or $token= &quot;htmlrtf&quot; or $token= &quot;hyphauto&quot; or $token= &quot;hyphcaps&quot; or $token= &quot;hyphpar&quot; or $token= &quot;i&quot; or $token= &quot;impr&quot; or $token= &quot;outl&quot; or $token= &quot;pnb&quot; or $token= &quot;pncaps&quot; or $token= &quot;pni&quot; or $token= &quot;pnscaps&quot; or $token= &quot;pnstrike&quot; or $token= &quot;pnul&quot; or $token= &quot;protect&quot; or $token= &quot;revised&quot; or $token= &quot;saautoN&quot; or $token= &quot;sbautoN&quot; or $token= &quot;scaps&quot; or $token= &quot;shad&quot; or $token= &quot;strike&quot; or $token= &quot;striked1&quot; or $token= &quot;trautofitN&quot; or $token= &quot;ul&quot; or $token= &quot;uldash&quot; or $token= &quot;uldashd&quot; or $token= &quot;uldashdd&quot; or $token= &quot;uldb&quot; or $token= &quot;ulhair&quot; or $token= &quot;ulhwave&quot; or $token= &quot;ulldash&quot; or $token= &quot;ulth&quot; or $token= &quot;ulth&quot; or $token= &quot;ulthd&quot; or $token= &quot;ulthdash&quot; or $token= &quot;ulthdashd&quot; or $token= &quot;ulthdashdd&quot; or $token= &quot;ulthldash&quot; or $token= &quot;ululdbwave&quot; or $token= &quot;ulwave&quot; or $token= &quot;v&quot;">
+        <xsl:element name="toggle">
+          <xsl:attribute name="name">
+            <xsl:value-of select="$tokenwithoutN"/>
+          </xsl:attribute>
+        </xsl:element>
+      </xsl:when>
+      <xsl:when test="$token= &quot;abshN&quot; or $token= &quot;abswN&quot; or $token= &quot;acfN&quot; or $token= &quot;adeffN&quot; or $token= &quot;adeflangN&quot; or $token= &quot;adnN&quot; or $token= &quot;aexpndN&quot; or $token= &quot;afN&quot; or $token= &quot;afsN&quot; or $token= &quot;aftnstartN&quot; or $token= &quot;alangN&quot; or $token= &quot;animtextN&quot; or $token= &quot;ansicpgN&quot; or $token= &quot;aupN&quot; or $token= &quot;binN&quot; or $token= &quot;binfsxnN&quot; or $token= &quot;binsxnN&quot; or $token= &quot;bkmkcolfN&quot; or $token= &quot;bkmkcollN&quot; or $token= &quot;bliptagN&quot; or $token= &quot;blipupiN&quot; or $token= &quot;blueN&quot; or $token= &quot;bookfoldsheetsN&quot; or $token= &quot;brdrartN&quot; or $token= &quot;brdrcfN&quot; or $token= &quot;brdrwN&quot; or $token= &quot;brspN&quot; or $token= &quot;cbN&quot; or $token= &quot;cbpatN&quot; or $token= &quot;cchsN&quot; or $token= &quot;cellxN&quot; or $token= &quot;cfN&quot; or $token= &quot;cfpatN&quot; or $token= &quot;cgridN&quot; or $token= &quot;charrsidN&quot; or $token= &quot;charscalexN&quot; or $token= &quot;chcbpatN&quot; or $token= &quot;chcfpatN&quot; or $token= &quot;chhresN&quot; or $token= &quot;chshdngN&quot; or $token= &quot;clcbpatN&quot; or $token= &quot;clcbpatrawN&quot; or $token= &quot;clcfpatN&quot; or $token= &quot;clcfpatrawN&quot; or $token= &quot;cldelauthN&quot; or $token= &quot;cldeldttmN&quot; or $token= &quot;clftsWidthN&quot; or $token= &quot;clinsauthN&quot; or $token= &quot;clinsdttmN&quot; or $token= &quot;clmrgdauthN&quot; or $token= &quot;clmrgddttmN&quot; or $token= &quot;clpadbN&quot; or $token= &quot;clpadfbN&quot; or $token= &quot;clpadflN&quot; or $token= &quot;clpadfrN&quot; or $token= &quot;clpadftN&quot; or $token= &quot;clpadlN&quot; or $token= &quot;clpadrN&quot; or $token= &quot;clpadtN&quot; or $token= &quot;clspbN&quot; or $token= &quot;clspfbN&quot; or $token= &quot;clspflN&quot; or $token= &quot;clspfrN&quot; or $token= &quot;clspftN&quot; or $token= &quot;clsplN&quot; or $token= &quot;clsprN&quot; or $token= &quot;clsptN&quot; or $token= &quot;clshdngN&quot; or $token= &quot;clshdngrawN&quot; or $token= &quot;clwWidthN&quot; or $token= &quot;colnoN&quot; or $token= &quot;colsN&quot; or $token= &quot;colsrN&quot; or $token= &quot;colsxN&quot; or $token= &quot;colwN&quot; or $token= &quot;cpgN&quot; or $token= &quot;crauthN&quot; or $token= &quot;crdateN&quot; or $token= &quot;csN&quot; or $token= &quot;cshadeN&quot; or $token= &quot;ctintN&quot; or $token= &quot;ctsN&quot; or $token= &quot;cufiN&quot; or $token= &quot;culiN&quot; or $token= &quot;curiN&quot; or $token= &quot;deffN&quot; or $token= &quot;deflangN&quot; or $token= &quot;deflangfeN&quot; or $token= &quot;deftabN&quot; or $token= &quot;delrsidN&quot; or $token= &quot;dfrauthN&quot; or $token= &quot;dfrdateN&quot; or $token= &quot;dfrmtxtxN&quot; or $token= &quot;dfrmtxtyN&quot; or $token= &quot;dfrstart&quot; or $token= &quot;dfrstop&quot; or $token= &quot;dfrxst&quot; or $token= &quot;dghoriginN&quot; or $token= &quot;dghshowN&quot; or $token= &quot;dghspaceN&quot; or $token= &quot;dgvoriginN&quot; or $token= &quot;dgvshowN&quot; or $token= &quot;dgvspaceN&quot; or $token= &quot;dibitmapN&quot; or $token= &quot;dnN&quot; or $token= &quot;doctypeN&quot; or $token= &quot;dodhgtN&quot; or $token= &quot;donotembedlingdataN&quot; or $token= &quot;donotembedsysfontN&quot; or $token= &quot;dpaendlN&quot; or $token= &quot;dpaendwN&quot; or $token= &quot;dpastartlN&quot; or $token= &quot;dpastartwN&quot; or $token= &quot;dpcoaN&quot; or $token= &quot;dpcodescentN&quot; or $token= &quot;dpcolengthN&quot; or $token= &quot;dpcooffsetN&quot; or $token= &quot;dpcountN&quot; or $token= &quot;dpfillbgcbN&quot; or $token= &quot;dpfillbgcgN&quot; or $token= &quot;dpfillbgcrN&quot; or $token= &quot;dpfillbggrayN&quot; or $token= &quot;dpfillfgcbN&quot; or $token= &quot;dpfillfgcgN&quot; or $token= &quot;dpfillfgcrN&quot; or $token= &quot;dpfillfggrayN&quot; or $token= &quot;dpfillpatN&quot; or $token= &quot;dplinecobN&quot; or $token= &quot;dplinecogN&quot; or $token= &quot;dplinecorN&quot; or $token= &quot;dplinegrayN&quot; or $token= &quot;dplinewN&quot; or $token= &quot;dppolycountN&quot; or $token= &quot;dpptxN&quot; or $token= &quot;dpptyN&quot; or $token= &quot;dpshadxN&quot; or $token= &quot;dpshadyN&quot; or $token= &quot;dptxbxmarN&quot; or $token= &quot;dpxN&quot; or $token= &quot;dpxsizeN&quot; or $token= &quot;dpyN&quot; or $token= &quot;dpysizeN&quot; or $token= &quot;dropcapliN&quot; or $token= &quot;dropcaptN&quot; or $token= &quot;dsN&quot; or $token= &quot;dxfrtextN&quot; or $token= &quot;dyN&quot; or $token= &quot;edminsN&quot; or $token= &quot;enforceprotN&quot; or $token= &quot;expndN&quot; or $token= &quot;expndtwN&quot; or $token= &quot;fN&quot; or $token= &quot;fbiasN&quot; or $token= &quot;fcharsetN&quot; or $token= &quot;fcsN&quot; or $token= &quot;fetN&quot; or $token= &quot;ffdefresN&quot; or $token= &quot;ffhaslistboxN&quot; or $token= &quot;ffhpsN&quot; or $token= &quot;ffmaxlenN&quot; or $token= &quot;ffownhelpN&quot; or $token= &quot;ffownstatN&quot; or $token= &quot;ffprotN&quot; or $token= &quot;ffrecalcN&quot; or $token= &quot;ffresN&quot; or $token= &quot;ffsizeN&quot; or $token= &quot;fftypeN&quot; or $token= &quot;fftypetxtN&quot; or $token= &quot;fiN&quot; or $token= &quot;fidN&quot; or $token= &quot;fittextN&quot; or $token= &quot;fnN&quot; or $token= &quot;footeryN&quot; or $token= &quot;fosnumN&quot; or $token= &quot;fprqN&quot; or $token= &quot;frelativeN&quot; or $token= &quot;fromhtmlN&quot; or $token= &quot;fsN&quot; or $token= &quot;ftnstartN&quot; or $token= &quot;gcwN&quot; or $token= &quot;greenN&quot; or $token= &quot;grfdoceventsN&quot; or $token= &quot;gutterN&quot; or $token= &quot;guttersxnN&quot; or $token= &quot;headeryN&quot; or $token= &quot;highlightN&quot; or $token= &quot;horzvertN&quot; or $token= &quot;hrN&quot; or $token= &quot;hresN&quot; or $token= &quot;hyphconsecN&quot; or $token= &quot;hyphhotzN&quot; or $token= &quot;idN&quot; or $token= &quot;ignoremixedcontentN&quot; or $token= &quot;ilfomacatclnupN&quot; or $token= &quot;ilvlN&quot; or $token= &quot;insrsidN&quot; or $token= &quot;ipgpN&quot; or $token= &quot;irowbandN&quot; or $token= &quot;irowN&quot; or $token= &quot;itapN&quot; or $token= &quot;kerningN&quot; or $token= &quot;ksulangN&quot; or $token= &quot;langN&quot; or $token= &quot;langfeN&quot; or $token= &quot;langfenpN&quot; or $token= &quot;langnpN&quot; or $token= &quot;lbrN&quot; or $token= &quot;levelN&quot; or $token= &quot;levelfollowN&quot; or $token= &quot;levelindentN&quot; or $token= &quot;leveljcN&quot; or $token= &quot;leveljcnN&quot; or $token= &quot;levellegalN&quot; or $token= &quot;levelnfcN&quot; or $token= &quot;levelnfcnN&quot; or $token= &quot;levelnorestartN&quot; or $token= &quot;leveloldN&quot; or $token= &quot;levelpictureN&quot; or $token= &quot;levelprevN&quot; or $token= &quot;levelprevspaceN&quot; or $token= &quot;levelspaceN&quot; or $token= &quot;levelstartatN&quot; or $token= &quot;leveltemplateidN&quot; or $token= &quot;liN&quot; or $token= &quot;linemodN&quot; or $token= &quot;linestartN&quot; or $token= &quot;linestartsN&quot; or $token= &quot;linexN&quot; or $token= &quot;linN&quot; or $token= &quot;lisaN&quot; or $token= &quot;lisbN&quot; or $token= &quot;listidN&quot; or $token= &quot;listoverridecountN&quot; or $token= &quot;listoverrideformatN&quot; or $token= &quot;listrestarthdnN&quot; or $token= &quot;listsimpleN&quot; or $token= &quot;liststyleidN&quot; or $token= &quot;listtemplateidN&quot; or $token= &quot;lsN&quot; or $token= &quot;lsdlockedN&quot; or $token= &quot;lsdlockeddefN&quot; or $token= &quot;lsdpriorityN&quot; or $token= &quot;lsdprioritydefN&quot; or $token= &quot;lsdqformatN&quot; or $token= &quot;lsdqformatdefN&quot; or $token= &quot;lsdsemihiddenN&quot; or $token= &quot;lsdsemihiddendefN&quot; or $token= &quot;lsdstimaxN&quot; or $token= &quot;lsdunhideusedN&quot; or $token= &quot;lsdunhideuseddefN&quot; or $token= &quot;margbN&quot; or $token= &quot;margbsxnN&quot; or $token= &quot;marglN&quot; or $token= &quot;marglsxnN&quot; or $token= &quot;margrN&quot; or $token= &quot;margrsxnN&quot; or $token= &quot;margtN&quot; or $token= &quot;margtsxnN&quot; or $token= &quot;mdiffStyN&quot; or $token= &quot;minN&quot; or $token= &quot;mmerrorsN&quot; or $token= &quot;mmreccurN&quot; or $token= &quot;moN&quot; or $token= &quot;mvauthN&quot; or $token= &quot;mvdateN&quot; or $token= &quot;nofcharsN&quot; or $token= &quot;nofcharswsN&quot; or $token= &quot;nofpagesN&quot; or $token= &quot;nofwordsN&quot; or $token= &quot;objalignN&quot; or $token= &quot;objcropbN&quot; or $token= &quot;objcroplN&quot; or $token= &quot;objcroprN&quot; or $token= &quot;objcroptN&quot; or $token= &quot;objhN&quot; or $token= &quot;objscalexN&quot; or $token= &quot;objscaleyN&quot; or $token= &quot;objtransyN&quot; or $token= &quot;objwN&quot; or $token= &quot;ogutterN&quot; or $token= &quot;outlinelevelN&quot; or $token= &quot;paperhN&quot; or $token= &quot;paperwN&quot; or $token= &quot;pararsidN&quot; or $token= &quot;pgbrdroptN&quot; or $token= &quot;pghsxnN&quot; or $token= &quot;pgnhnN&quot; or $token= &quot;pgnstartN&quot; or $token= &quot;pgnstartsN&quot; or $token= &quot;pgnxN&quot; or $token= &quot;pgnyN&quot; or $token= &quot;pgwsxnN&quot; or $token= &quot;picbppN&quot; or $token= &quot;piccropbN&quot; or $token= &quot;piccroplN&quot; or $token= &quot;piccroprN&quot; or $token= &quot;piccroptN&quot; or $token= &quot;pichN&quot; or $token= &quot;pichgoalN&quot; or $token= &quot;picscalexN&quot; or $token= &quot;picscaleyN&quot; or $token= &quot;picwN&quot; or $token= &quot;picwgoalN&quot; or $token= &quot;pmmetafileN&quot; or $token= &quot;pncfN&quot; or $token= &quot;pnfN&quot; or $token= &quot;pnfsN&quot; or $token= &quot;pnindentN&quot; or $token= &quot;pnlvlN&quot; or $token= &quot;pnrauthN&quot; or $token= &quot;pnrdateN&quot; or $token= &quot;pnrnfcN&quot; or $token= &quot;pnrpnbrN&quot; or $token= &quot;pnrrgbN&quot; or $token= &quot;pnrstartN&quot; or $token= &quot;pnrstopN&quot; or $token= &quot;pnrxstN&quot; or $token= &quot;pnspN&quot; or $token= &quot;pnstartN&quot; or $token= &quot;posnegxN&quot; or $token= &quot;posnegyN&quot; or $token= &quot;posxN&quot; or $token= &quot;posyN&quot; or $token= &quot;prauthN&quot; or $token= &quot;prdateN&quot; or $token= &quot;proptypeN&quot; or $token= &quot;protlevelN&quot; or $token= &quot;pszN&quot; or $token= &quot;pwdN&quot; or $token= &quot;qkN&quot; or $token= &quot;redN&quot; or $token= &quot;relyonvmlN&quot; or $token= &quot;revauthN&quot; or $token= &quot;revauthdelN&quot; or $token= &quot;revbarN&quot; or $token= &quot;revdttmN&quot; or $token= &quot;revdttmdelN&quot; or $token= &quot;revpropN&quot; or $token= &quot;riN&quot; or $token= &quot;rinN&quot; or $token= &quot;rsidN&quot; or $token= &quot;rsidrootN&quot; or $token= &quot;sN&quot; or $token= &quot;saN&quot; or $token= &quot;saftnstartN&quot; or $token= &quot;sbN&quot; or $token= &quot;sbasedonN&quot; or $token= &quot;secN&quot; or $token= &quot;sectexpandN&quot; or $token= &quot;sectlinegridN&quot; or $token= &quot;sectrsidN&quot; or $token= &quot;sftnstartN&quot; or $token= &quot;shadingN&quot; or $token= &quot;showplaceholdtextN&quot; or $token= &quot;showxmlerrorsN&quot; or $token= &quot;shpbottomN&quot; or $token= &quot;shpfblwtxtN&quot; or $token= &quot;shpfhdrN&quot; or $token= &quot;shpleftN&quot; or $token= &quot;shplidN&quot; or $token= &quot;shprightN&quot; or $token= &quot;shptopN&quot; or $token= &quot;shpwrkN&quot; or $token= &quot;shpwrN&quot; or $token= &quot;shpzN&quot; or $token= &quot;slN&quot; or $token= &quot;slinkN&quot; or $token= &quot;slmultN&quot; or $token= &quot;snextN&quot; or $token= &quot;softlheightN&quot; or $token= &quot;spriorityN&quot; or $token= &quot;srauthN&quot; or $token= &quot;srdateN&quot; or $token= &quot;ssemihiddenN&quot; or $token= &quot;stextflowN&quot; or $token= &quot;stshfbiN&quot; or $token= &quot;stshfdbchN&quot; or $token= &quot;stshfhichN&quot; or $token= &quot;stshflochN&quot; or $token= &quot;stylesortmethodN&quot; or $token= &quot;styrsidN&quot; or $token= &quot;subdocumentN&quot; or $token= &quot;sunhideusedN&quot; or $token= &quot;tbN&quot; or $token= &quot;tblindN&quot; or $token= &quot;tblindtypeN&quot; or $token= &quot;tblrsidN&quot; or $token= &quot;tcfN&quot; or $token= &quot;tclN&quot; or $token= &quot;tdfrmtxtBottomN&quot; or $token= &quot;tdfrmtxtLeftN&quot; or $token= &quot;tdfrmtxtRightN&quot; or $token= &quot;tdfrmtxtTopN&quot; or $token= &quot;themelangN&quot; or $token= &quot;themelangcsN&quot; or $token= &quot;themelangfeN&quot; or $token= &quot;tposnegxN&quot; or $token= &quot;tposnegyN&quot; or $token= &quot;tposxN&quot; or $token= &quot;tposyN&quot; or $token= &quot;trackformattingN&quot; or $token= &quot;trackmovesN&quot; or $token= &quot;trauthN&quot; or $token= &quot;trcbpatN&quot; or $token= &quot;trcfpatN&quot; or $token= &quot;trdateN&quot; or $token= &quot;trftsWidthAN&quot; or $token= &quot;trftsWidthBN&quot; or $token= &quot;trftsWidthN&quot; or $token= &quot;trgaphN&quot; or $token= &quot;trleftN&quot; or $token= &quot;trpaddbN&quot; or $token= &quot;trpaddfbN&quot; or $token= &quot;trpaddflN&quot; or $token= &quot;trpaddfrN&quot; or $token= &quot;trpaddftN&quot; or $token= &quot;trpaddlN&quot; or $token= &quot;trpaddrN&quot; or $token= &quot;trpaddtN&quot; or $token= &quot;trpadobN&quot; or $token= &quot;trpadofbN&quot; or $token= &quot;trpadoflN&quot; or $token= &quot;trpadofrN&quot; or $token= &quot;trpadoftN&quot; or $token= &quot;trpadolN&quot; or $token= &quot;trpadorN&quot; or $token= &quot;trpadotN&quot; or $token= &quot;trpatN&quot; or $token= &quot;trrhN&quot; or $token= &quot;trshdngN&quot; or $token= &quot;trspdbN&quot; or $token= &quot;trspdfbN&quot; or $token= &quot;trspdflN&quot; or $token= &quot;trspdfrN&quot; or $token= &quot;trspdftN&quot; or $token= &quot;trspdlN&quot; or $token= &quot;trspdrN&quot; or $token= &quot;trspdtN&quot; or $token= &quot;trspobN&quot; or $token= &quot;trspofbN&quot; or $token= &quot;trspoflN&quot; or $token= &quot;trspofrN&quot; or $token= &quot;trspoftN&quot; or $token= &quot;trspolN&quot; or $token= &quot;trsporN&quot; or $token= &quot;trspotN&quot; or $token= &quot;trwWidthAN&quot; or $token= &quot;trwWidthBN&quot; or $token= &quot;trwWidthN&quot; or $token= &quot;tsN&quot; or $token= &quot;tscbandshN&quot; or $token= &quot;tscbandsvN&quot; or $token= &quot;tscellcbpatN&quot; or $token= &quot;tscellcfpatN&quot; or $token= &quot;tscellpaddbN&quot; or $token= &quot;tscellpaddfbN&quot; or $token= &quot;tscellpaddflN&quot; or $token= &quot;tscellpaddfrN&quot; or $token= &quot;tscellpaddftN&quot; or $token= &quot;tscellpaddlN&quot; or $token= &quot;tscellpaddrN&quot; or $token= &quot;tscellpaddtN&quot; or $token= &quot;tscellpctN&quot; or $token= &quot;tscellwidthN&quot; or $token= &quot;tscellwidthftsN&quot; or $token= &quot;twoinoneN&quot; or $token= &quot;txN&quot; or $token= &quot;uN&quot; or $token= &quot;ucN&quot; or $token= &quot;ulcN&quot; or $token= &quot;upN&quot; or $token= &quot;urtfN&quot; or $token= &quot;validatexmlN&quot; or $token= &quot;vernN&quot; or $token= &quot;versionN&quot; or $token= &quot;viewbkspN&quot; or $token= &quot;viewkindN&quot; or $token= &quot;viewscaleN&quot; or $token= &quot;viewzkN&quot; or $token= &quot;wbitmapN&quot; or $token= &quot;wbmbitspixelN&quot; or $token= &quot;wbmplanesN&quot; or $token= &quot;wbmwidthbyteN&quot; or $token= &quot;wmetafileN&quot; or $token= &quot;xefN&quot; or $token= &quot;xmlattrnsN&quot; or $token= &quot;xmlnsN&quot; or $token= &quot;yrN&quot; or $token= &quot;ytsN&quot;">
+        <xsl:element name="value">
+          <xsl:attribute name="name">
+            <xsl:value-of select="$tokenwithoutN"/>
+          </xsl:attribute>
+        </xsl:element>
+      </xsl:when>
+      <xsl:otherwise>
+        <control>
+          <xsl:attribute name="name">
+            <xsl:value-of select="$token"/>
+          </xsl:attribute>
+        </control>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+</xsl:stylesheet>
diff --git a/writerfilter/source/rtftok/wordmlsimplify.xsl b/writerfilter/source/rtftok/wordmlsimplify.xsl
new file mode 100644
--- /dev/null
+++ b/writerfilter/source/rtftok/wordmlsimplify.xsl
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" 
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:ve="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+                xmlns:o="urn:schemas-microsoft-com:office:office" 
+                xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" 
+                xmlns:m="http://schemas.openxmlformats.org/officeDocument/2006/math" 
+                xmlns:v="urn:schemas-microsoft-com:vml" 
+                xmlns:wp="http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing" 
+                xmlns:w10="urn:schemas-microsoft-com:office:word" 
+                xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/2006/main" 
+                xmlns:wne="http://schemas.microsoft.com/office/word/2006/wordml"
+                xmlns:fn="http://www.w3.org/2005/xpath-functions">
+
+<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" omit-xml-declaration="no"/>
+
+
+<xsl:template match="w:rPr|w:pPr">
+</xsl:template>
+
+<xsl:template match="w:trPr">
+  <xsl:if test="w:tblHeader">
+    <xsl:copy>
+      <xsl:copy-of select="w:tblHeader"/>      
+    </xsl:copy>
+  </xsl:if>
+</xsl:template>
+
+<xsl:template match="w:p">
+  <xsl:copy>
+    <xsl:apply-templates select=".//w:r"/>
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template match="w:tc">
+  <xsl:copy>
+    <xsl:apply-templates select=".//w:p"/>
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template match="w:tr">
+  <xsl:copy>
+    <xsl:apply-templates select="w:trPr|w:tc"/>
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template match="w:r">
+  <xsl:value-of select=".//w:t/text()"/>
+</xsl:template>
+
+<xsl:template match="w:tbl">
+  <xsl:copy>
+    <xsl:apply-templates select=".//w:tr"/>
+  </xsl:copy>
+</xsl:template>
+
+<xsl:template match="*">
+  <xsl:copy>
+    <xsl:apply-templates select="@*|node()"/>
+  </xsl:copy>
+</xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
