diff options
author | Arno Teigseth <arno@teigseth.no> | 2011-02-05 08:48:27 +0000 |
---|---|---|
committer | Arno Teigseth <arno@teigseth.no> | 2011-02-05 08:48:27 +0000 |
commit | 4f3d565a5e5ede6eb6fd1f276d4e8ad37b67b5ce (patch) | |
tree | 7af736540eca93034428a975bd850e709fbbe2e5 /JLanguageTool/src/dev/tools/convert.xsl | |
parent | ecaee85ab5984ebadd56721c295dc26b3335f7ce (diff) | |
download | grammar-norwegian-master.tar.gz grammar-norwegian-master.tar.bz2 grammar-norwegian-master.tar.xz |
Diffstat (limited to 'JLanguageTool/src/dev/tools/convert.xsl')
-rw-r--r-- | JLanguageTool/src/dev/tools/convert.xsl | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/JLanguageTool/src/dev/tools/convert.xsl b/JLanguageTool/src/dev/tools/convert.xsl new file mode 100644 index 0000000..3e70426 --- /dev/null +++ b/JLanguageTool/src/dev/tools/convert.xsl @@ -0,0 +1,50 @@ +<?xml version="1.0" ?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> +<!-- XSLT stylesheet to convert grammar.xml <em> elements + + Copyright (C) 2008 Marcin MiĆkowski. + + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 + * USA + +Note: it's obsolete and useless for current grammar.xml files. + +usage: + +java -jar saxon8.jar grammar.xml convert.xsl + +--> + <xsl:output method="xml" encoding="utf-8" indent="yes"/> + + <xsl:template match="@*|node()"> + <xsl:copy> + <xsl:apply-templates select="@*|node()"/> + </xsl:copy> + </xsl:template> + + <xsl:template match="//message/em"> + <xsl:element name="suggestion"> + <xsl:value-of select="./text()"/> + </xsl:element> +</xsl:template> + + <xsl:template match="//example/em"> + <xsl:element name="marker"> + <xsl:value-of select="./text()"/> + </xsl:element> +</xsl:template> + +</xsl:stylesheet>
\ No newline at end of file |