Changeset 25472 for documentation/trunk/tutorials/processing/common.xsl
- Timestamp:
- 2012-04-24T20:30:19+12:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
documentation/trunk/tutorials/processing/common.xsl
r13638 r25472 5 5 exclude-result-prefixes="dict"> 6 6 7 <!--The following strips newlines introduced by elements, in particular introduced around the MajorVersion template match 8 See http://stackoverflow.com/questions/3265244/removing-blank-lines-in-xslt 9 and http://msdn.microsoft.com/en-us/library/ms256107.aspx --> 10 <xsl:strip-space elements="*"/> 11 7 12 <xsl:variable name="diction" select="dict:new('en')"/> 8 13 … … 160 165 </xsl:template> 161 166 167 <!-- Do not process any elements marked with MajorVersion and whose version does not 168 specifically match the requested greenstone major version (2 or 3) --> 169 <!--To avoid multiple lines of whitespace around output, use 170 <xsl:for-each select="node()"><xsl:apply-templates/></xsl:for-each> 171 This outputs the contents on its own separate line. 172 To avoid thinking about unnecessary newlines and to avoid omitting any sub-xml items 173 that need to be processed, we can instead have the following at the top of the file: 174 <xsl:strip-space elements="*"/> --> 175 <xsl:template match="MajorVersion"> 176 <xsl:if test="$gs-major-version=@number"> 177 <xsl:apply-templates/> 178 </xsl:if> 179 </xsl:template> 180 162 181 <xsl:template name="SampleFiles"> 163 182 <xsl:param name="mode">web</xsl:param>
Note:
See TracChangeset
for help on using the changeset viewer.