Changeset 1772
- Timestamp:
- 02/24/12 14:42:25 (12 years ago)
- Location:
- metadata/trunk/toolkit/xslt/comp2schema-v2
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
metadata/trunk/toolkit/xslt/comp2schema-v2/cleanup-xsd.xsl
- Property svn:keywords
-
old new 1 1 Date 2 Rev
-
r1167 r1772 2 2 3 3 <!-- 4 $Rev : 484$4 $Rev$ 5 5 $Date$ 6 6 --> … … 10 10 xmlns:ann="http://www.clarin.eu"> 11 11 <xsl:strip-space elements="*"/> 12 <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" saxon:indent-spaces="1" 13 xmlns:saxon="http://saxon.sf.net/"/> 12 <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no" /> 14 13 15 <xsl:template match="/xs:schema" >14 <xsl:template match="/xs:schema" mode="clean"> 16 15 <xs:schema xmlns:cmd="http://www.clarin.eu/cmd/"> 17 16 <xsl:copy-of select="@*"/> 18 <xsl:apply-templates select="xs:import" />17 <xsl:apply-templates select="xs:import" mode="clean"/> 19 18 <!-- Remove double entries for named simpleType and complexType definitions at the begin of the XSD. --> 20 19 <xsl:for-each-group select="./xs:simpleType" group-by="@name"> … … 28 27 </xsl:for-each-group> 29 28 30 <xsl:apply-templates select="xs:element" />29 <xsl:apply-templates select="xs:element" mode="clean"/> 31 30 </xs:schema> 32 31 </xsl:template> … … 34 33 35 34 <!-- identity copy --> 36 <xsl:template match="@*|node()" >35 <xsl:template match="@*|node()" mode="clean"> 37 36 <xsl:copy> 38 <xsl:apply-templates select="@*|node()" />37 <xsl:apply-templates select="@*|node()" mode="clean"/> 39 38 </xsl:copy> 40 39 </xsl:template> - Property svn:keywords
-
metadata/trunk/toolkit/xslt/comp2schema-v2/comp2schema.xsl
r1744 r1772 14 14 <xsl:strip-space elements="*"/> 15 15 <xsl:include href="comp2schema-header.xsl"/> 16 <xsl:include href="cleanup-xsd.xsl"/> 16 17 <!-- note: the automatic chaining with clean-xsd.xsl only works with the Saxon XSLT processor, otherwise you'll have to do this manually (or use e.g the Xalan pipeDocument tag) --> 17 <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" saxon:indent-spaces="1" 18 saxon:next-in-chain="cleanup-xsd.xsl" xmlns:saxon="http://saxon.sf.net/"/> 18 <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="no" /> 19 19 20 20 <!-- Start includes --> … … 51 51 </xsl:variable> 52 52 <!-- Process the complete tree --> 53 <xsl:apply-templates select="$tree/*"/> 53 <xsl:variable name="schema"> 54 <xsl:apply-templates select="$tree/*"/> 55 </xsl:variable> 56 <xsl:apply-templates select="$schema" mode="clean" /> 54 57 </xsl:template> 55 58 … … 430 433 </xsl:if> 431 434 </xsl:template> 432 435 433 436 </xsl:stylesheet>
Note: See TracChangeset
for help on using the changeset viewer.