Warning, /utilities/kate/addons/xmltools/simplify_dtd.xsl is written in an unsupported language. File is not indexed.

0001 <?xml version="1.0" encoding="iso-8859-1"?>
0002 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
0003 
0004 <!--
0005 Remove all parameter entities and other useless stuff from the kdex.dtd.xml DTD,
0006 to make the file smaller.
0007 Daniel Naber, 2001-09-23, last update 2001-09-29
0008 -->
0009 
0010 <xsl:output method="xml"
0011         indent="yes"
0012         doctype-public="-//Norman Walsh//DTD DTDParse V2.0//EN"
0013         doctype-system="dtd.dtd"/>
0014 
0015         <xsl:template match="dtd">
0016                 <dtd>
0017                         <xsl:attribute name="version"><xsl:value-of select="@version"/></xsl:attribute>
0018                         <xsl:attribute name="unexpanded"><xsl:value-of select="@unexpanded"/></xsl:attribute>
0019                         <xsl:attribute name="title"><xsl:value-of select="@title"/></xsl:attribute>
0020                         <xsl:attribute name="namecase-general"><xsl:value-of select="@namecase-general"/></xsl:attribute>
0021                         <xsl:attribute name="namecase-entity"><xsl:value-of select="@namecase-entity"/></xsl:attribute>
0022                         <xsl:attribute name="xml"><xsl:value-of select="@xml"/></xsl:attribute>
0023                         <xsl:attribute name="system-id"><xsl:value-of select="@system-id"/></xsl:attribute>
0024                         <xsl:attribute name="public-id"><xsl:value-of select="@public-id"/></xsl:attribute>
0025                         <xsl:attribute name="declaration"><xsl:value-of select="@declaration"/></xsl:attribute>
0026                         <xsl:attribute name="created-by">XSLT Simplifier</xsl:attribute>
0027                         <xsl:attribute name="created-on"><xsl:value-of select="@created-on"/> (original version)</xsl:attribute>
0028                         <xsl:apply-templates />
0029                 </dtd>
0030         </xsl:template>
0031 
0032         <!-- remove some "entity" elements and other stuff not needed: -->
0033 
0034         <xsl:template match="element">
0035                         <element>
0036                                 <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
0037                                 <xsl:copy-of select="content-model-expanded"/>
0038                         </element>
0039         </xsl:template>
0040 
0041         <xsl:template match="entity">
0042                 <xsl:if test="not(@type='param')">
0043                         <entity>
0044                                 <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
0045                                 <xsl:attribute name="type"><xsl:value-of select="@type"/></xsl:attribute>
0046                                 <xsl:apply-templates select="text-expanded"/>
0047                         </entity>
0048                 </xsl:if>
0049         </xsl:template>
0050 
0051         <xsl:template match="text-expanded">
0052                 <xsl:copy-of select="."/>
0053         </xsl:template>
0054 
0055         <xsl:template match="attlist">
0056                 <attlist>
0057                         <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
0058                         <xsl:copy-of select="attribute"/>
0059                 </attlist>
0060         </xsl:template>
0061 
0062         <xsl:template match="notation" />
0063 
0064 </xsl:stylesheet>