Thanks. Is this <spec> element different from the one in the <head> of the document?
On 05/23/2008 5:09 AM, Jonathan Dickinson wrote: > Hi All, > > I appropriated the XEP XSL for use in one of the projects I am working on. I > found one thing, the <spec> element could really become useful. For example: > > See <spec>0001</spec> on how to write XEP documents. > > Here are the changes I made: > > <xsl:template match='spec' mode='list'> > <xsl:param name='speccount' select='""'/> > <xsl:variable name='specpos' select='position()'/> > <xsl:choose> > <xsl:when test='$specpos < $speccount'> > <a> > <xsl:attribute name='href'> > <xsl:text>http://www.xmpp.org/extensions/xep-</xsl:text> > <xsl:value-of select='.' /> > <xsl:text>.html</xsl:text> > </xsl:attribute> > XEP-<xsl:value-of select='.'/> > </a> > <xsl:text>, </xsl:text> > </xsl:when> > <xsl:otherwise> > <a> > <xsl:attribute name='href'> > <xsl:text>http://www.xmpp.org/extensions/xep-</xsl:text> > <xsl:value-of select='.' /> > <xsl:text>.html</xsl:text> > </xsl:attribute> > XEP-<xsl:value-of select='.'/> > </a> > </xsl:otherwise> > </xsl:choose> > </xsl:template> > > --------------- > > <xsl:choose> > <xsl:when test='$dependencies.count > 0'> > <xsl:text>Dependencies: </xsl:text> > <xsl:apply-templates select='/xep/header/dependencies/spec' > mode='list'> > <xsl:with-param name='speccount' > select='$dependencies.count'/> > </xsl:apply-templates> > > <!-- Apply to others in header --> > > --------------- > > <xsl:template match='spec'> > <a> > <xsl:attribute name='href'> > <xsl:text> http://www.xmpp.org/extensions/xep-</xsl:text> > <xsl:value-of select='.' /> > <xsl:text>.html</xsl:text> > </xsl:attribute> > XEP-<xsl:value-of select='.'/> > </a> > </xsl:template> > > -------------- > > <!-- Include it in all the presentational groups in the xsd. --> > > It made my life a little easier. I am sure you could even write one that > automagically handles footnotes etc. > > e.g. <spec source='ietf' number='0001'>The Internet</spec> > > Would result in: > > <a href="#spec-ietf-0001'>[RFC 0001]</a> > > And in the footer: > > [<a href="http://www.ietf.org/rfc/rfc2119.txt">RFC 0001</a>] - The internet > > Jonathan >
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ JDev mailing list FAQ: http://www.jabber.org/discussion-lists/jdev-faq Forum: http://www.jabberforum.org/forumdisplay.php?f=20 Info: http://mail.jabber.org/mailman/listinfo/jdev Unsubscribe: [EMAIL PROTECTED] _______________________________________________
