[jdev] XEP XSL
Jonathan Dickinson
jonathanD at k2.com
Wed Jun 4 02:15:15 CDT 2008
No it isn't. You can have a look at what I did at http://svn.mosa.ensemble-os.org/rfc/tools
> -----Original Message-----
> From: jdev-bounces at jabber.org [mailto:jdev-bounces at jabber.org] On Behalf Of
> Peter Saint-Andre
> Sent: 04 June 2008 12:17 AM
> To: Jabber/XMPP software development list
> Subject: Re: [jdev] XEP XSL
>
> 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
> >
More information about the JDev
mailing list