Changeset 588 for rfc2629xslt/rfc2629toXHTML.xslt
- Timestamp:
- 01/06/09 13:21:15 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
rfc2629xslt/rfc2629toXHTML.xslt
r573 r588 1156 1156 </xsl:for-each> 1157 1157 1158 <xsl:if test="front/date/@year != '' and front/date/@year != '???'"> 1158 <xsl:if test="front/date/@year != ''"> 1159 <xsl:if test="string(number(front/date/@year)) = 'NaN'"> 1160 <xsl:call-template name="warning"> 1161 <xsl:with-param name="inline" select="'no'"/> 1162 <xsl:with-param name="msg">date/@year should be a number: '<xsl:value-of select="front/date/@year"/>' in reference '<xsl:value-of select="@anchor"/>'</xsl:with-param> 1163 </xsl:call-template> 1164 </xsl:if> 1159 1165 <xsl:text>, </xsl:text> 1160 1166 <xsl:if test="front/date/@month!=''"><xsl:value-of select="front/date/@month"/> </xsl:if> … … 1369 1375 <meta name="DC.Description.Abstract" content="{normalize-space(/rfc/front/abstract)}"/> 1370 1376 </xsl:if> 1377 1378 <xsl:if test="/rfc/@number"> 1379 <meta name="DC.isPartOf" content="urn:ISSN:2070-1721"/> 1380 </xsl:if> 1381 1371 1382 </xsl:if> 1372 1383 </head> … … 1793 1804 </xsl:when> 1794 1805 1806 <!-- Paragraph links --> 1807 <xsl:when test="$node/self::t"> 1808 <a xmlns="http://www.w3.org/1999/xhtml" href="#{$target}"> 1809 <xsl:variable name="tcnt"> 1810 <xsl:for-each select="$node"> 1811 <xsl:call-template name="get-paragraph-number"/> 1812 </xsl:for-each> 1813 </xsl:variable> 1814 <xsl:choose> 1815 <xsl:when test="@format='counter'"> 1816 <xsl:value-of select="$tcnt"/> 1817 </xsl:when> 1818 <xsl:when test="@format='title'"> 1819 <xsl:value-of select="$node/@title"/> 1820 </xsl:when> 1821 <xsl:otherwise> 1822 <xsl:value-of select="normalize-space(concat('Paragraph ',substring-after($tcnt,'p.')))"/> 1823 </xsl:otherwise> 1824 </xsl:choose> 1825 </a> 1826 </xsl:when> 1827 1828 <!-- Comment links --> 1829 <xsl:when test="$node/self::cref"> 1830 <a xmlns="http://www.w3.org/1999/xhtml" href="#{$target}"> 1831 <xsl:variable name="name"> 1832 <xsl:for-each select="$node"> 1833 <xsl:call-template name="get-comment-name"/> 1834 </xsl:for-each> 1835 </xsl:variable> 1836 <xsl:choose> 1837 <xsl:when test="@format='counter'"> 1838 <xsl:value-of select="$name"/> 1839 </xsl:when> 1840 <xsl:when test="@format='title'"> 1841 <xsl:value-of select="$node/@title"/> 1842 </xsl:when> 1843 <xsl:otherwise> 1844 <xsl:value-of select="normalize-space(concat('Comment ',$name))"/> 1845 </xsl:otherwise> 1846 </xsl:choose> 1847 </a> 1848 </xsl:when> 1849 1795 1850 <!-- Reference links --> 1796 1851 <xsl:when test="$node/self::reference"> … … 3101 3156 <xsl:for-each select="$rs2"> 3102 3157 <xsl:sort select="substring-before(concat(@x:sec,'.'),'.')" data-type="number"/> 3103 <xsl:sort select="substring(@x:sec, 1+string-length(substring-before(@x:sec,'.')))" data-type="number"/>3158 <xsl:sort select="substring(@x:sec,2+string-length(substring-before(@x:sec,'.')))" data-type="number"/> 3104 3159 <xsl:if test="generate-id(.) = generate-id(key('index-xref-by-sec',concat(@target,'..',@x:sec)))"> 3105 3160 <li class="indline1"> … … 4021 4076 <xsl:when test="$target"> 4022 4077 <a xmlns="http://www.w3.org/1999/xhtml" href="#{$target/@anchor}" class="smpl"> 4078 <xsl:call-template name="copy-anchor"/> 4023 4079 <!-- to be indexed? --> 4024 4080 <xsl:if test="$irefs"> … … 4109 4165 <xsl:template match="x:h"> 4110 4166 <b xmlns="http://www.w3.org/1999/xhtml"> 4167 <xsl:call-template name="copy-anchor"/> 4111 4168 <xsl:apply-templates/> 4112 4169 </b> … … 4123 4180 <xsl:template match="x:highlight"> 4124 4181 <b xmlns="http://www.w3.org/1999/xhtml"> 4182 <xsl:call-template name="copy-anchor"/> 4125 4183 <xsl:apply-templates/> 4126 4184 </b> … … 4152 4210 <!-- Nop --> 4153 4211 <xsl:template match="x:span"> 4154 <xsl:apply-templates/> 4212 <span xmlns="http://www.w3.org/1999/xhtml"> 4213 <xsl:call-template name="copy-anchor"/> 4214 <xsl:apply-templates/> 4215 </span> 4155 4216 </xsl:template> 4156 4217 … … 4835 4896 <xsl:param name="msg2"/> 4836 4897 <xsl:param name="inline"/> 4837 <xsl:if test="$inline!='no'"> 4838 <div xmlns="http://www.w3.org/1999/xhtml" class="error">WARNING: <xsl:value-of select="$msg"/><xsl:value-of select="$msg2"/></div> 4839 </xsl:if> 4840 <xsl:message>WARNING: <xsl:value-of select="$msg"/><xsl:value-of select="$msg2"/><xsl:call-template name="lineno"/></xsl:message> 4898 <xsl:call-template name="emit-message"> 4899 <xsl:with-param name="level">WARNING</xsl:with-param> 4900 <xsl:with-param name="msg" select="$msg"/> 4901 <xsl:with-param name="msg2" select="$msg2"/> 4902 <xsl:with-param name="inline" select="$inline"/> 4903 </xsl:call-template> 4841 4904 </xsl:template> 4842 4905 … … 4845 4908 <xsl:param name="msg2"/> 4846 4909 <xsl:param name="inline"/> 4847 <xsl:if test="$inline!='no'"> 4848 <div xmlns="http://www.w3.org/1999/xhtml" class="error">ERROR: <xsl:value-of select="$msg"/><xsl:value-of select="$msg2"/></div> 4849 </xsl:if> 4850 <xsl:message>ERROR: <xsl:value-of select="$msg"/><xsl:value-of select="$msg2"/><xsl:call-template name="lineno"/></xsl:message> 4910 <xsl:call-template name="emit-message"> 4911 <xsl:with-param name="level">ERROR</xsl:with-param> 4912 <xsl:with-param name="msg" select="$msg"/> 4913 <xsl:with-param name="msg2" select="$msg2"/> 4914 <xsl:with-param name="inline" select="$inline"/> 4915 </xsl:call-template> 4916 </xsl:template> 4917 4918 <xsl:template name="emit-message"> 4919 <xsl:param name="level"/> 4920 <xsl:param name="msg"/> 4921 <xsl:param name="msg2"/> 4922 <xsl:param name="inline"/> 4923 <xsl:variable name="message"><xsl:value-of select="$level"/>: <xsl:value-of select="$msg"/><xsl:value-of select="$msg2"/><xsl:call-template name="lineno"/></xsl:variable> 4924 <xsl:choose> 4925 <xsl:when test="$inline!='no'"> 4926 <div xmlns="http://www.w3.org/1999/xhtml" class="error"><xsl:value-of select="$message"/></div> 4927 </xsl:when> 4928 <xsl:otherwise> 4929 <xsl:comment><xsl:value-of select="$message"/></xsl:comment> 4930 </xsl:otherwise> 4931 </xsl:choose> 4932 <xsl:message><xsl:value-of select="$message"/></xsl:message> 4851 4933 </xsl:template> 4852 4934 … … 4947 5029 <!-- cref support --> 4948 5030 5031 <xsl:template name="get-comment-name"> 5032 <xsl:choose> 5033 <xsl:when test="@anchor"> 5034 <xsl:value-of select="@anchor"/> 5035 </xsl:when> 5036 <xsl:otherwise> 5037 <xsl:value-of select="$anchor-prefix"/> 5038 <xsl:text>.comment.</xsl:text> 5039 <xsl:number count="cref[not(@anchor)]" level="any"/> 5040 </xsl:otherwise> 5041 </xsl:choose> 5042 </xsl:template> 5043 4949 5044 <xsl:template match="cref"> 4950 5045 <xsl:if test="$xml2rfc-comments!='no'"> 4951 5046 <xsl:variable name="cid"> 4952 <xsl:choose> 4953 <xsl:when test="@anchor"> 4954 <xsl:value-of select="@anchor"/> 4955 </xsl:when> 4956 <xsl:otherwise> 4957 <xsl:value-of select="$anchor-prefix"/> 4958 <xsl:text>.comment.</xsl:text> 4959 <xsl:number count="cref[not(@anchor)]" level="any"/> 4960 </xsl:otherwise> 4961 </xsl:choose> 5047 <xsl:call-template name="get-comment-name"/> 4962 5048 </xsl:variable> 4963 5049 … … 5119 5205 <xsl:text>http://greenbytes.de/tech/webdav/rfc2629.xslt, </xsl:text> 5120 5206 <!-- when RCS keyword substitution in place, add version info --> 5121 <xsl:if test="contains('$Revision: 1.43 2$',':')">5122 <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.43 2$', 'Revision: '),'$','')),', ')"/>5207 <xsl:if test="contains('$Revision: 1.438 $',':')"> 5208 <xsl:value-of select="concat('Revision ',normalize-space(translate(substring-after('$Revision: 1.438 $', 'Revision: '),'$','')),', ')"/> 5123 5209 </xsl:if> 5124 <xsl:if test="contains('$Date: 2009-0 4-09 13:16:17$',':')">5125 <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2009-0 4-09 13:16:17$', 'Date: '),'$','')),', ')"/>5210 <xsl:if test="contains('$Date: 2009-05-27 13:34:05 $',':')"> 5211 <xsl:value-of select="concat(normalize-space(translate(substring-after('$Date: 2009-05-27 13:34:05 $', 'Date: '),'$','')),', ')"/> 5126 5212 </xsl:if> 5127 5213 <xsl:value-of select="concat('XSLT vendor: ',system-property('xsl:vendor'),' ',system-property('xsl:vendor-url'))"/>
Note: See TracChangeset
for help on using the changeset viewer.