# HG changeset patch
# User Henning Brinkmann <hbrinkm@openoffice.org>
# Date 1284564131 -7200
# Node ID a389313caa0e6c22c4b4d3437fa4112e2340df59
# Parent  6d909d9c6787f47f4e1daf2a10df84cc50f4ede7
rtftok01: find undefined symbols in output of spectobnf

diff --git a/writerfilter/source/rtftok/undefined.xsl b/writerfilter/source/rtftok/undefined.xsl
new file mode 100644
--- /dev/null
+++ b/writerfilter/source/rtftok/undefined.xsl
@@ -0,0 +1,28 @@
+<?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="defines" match="//define" use="@name"/>
+
+<xsl:template match="/">
+  <undefined>
+    <xsl:for-each select="//ref">
+      <xsl:if test="count(key('defines', @name)) = 0">
+        <xsl:copy-of select="."/>
+      </xsl:if>
+    </xsl:for-each>
+  </undefined>
+</xsl:template>
+
+</xsl:stylesheet>
\ No newline at end of file
