|
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:maml="http://ddue.schemas.microsoft.com/authoring/2003/5">
<xsl:output method="xml" encoding="utf-16" indent="yes" />
<xsl:template match="topic">
<topic>
<xsl:copy-of select="@*"/>
<xsl:apply-templates select="node()" />
</topic>
</xsl:template>
<xsl:template match="img">
<maml:mediaLinkInline>
<maml:image>
<xsl:attribute name ="xlink:href">
<xsl:value-of select="@src"/>
</xsl:attribute>
</maml:image>
</maml:mediaLinkInline>
</xsl:template>
<xsl:template match="list[@type='bullet']|list[@type='number']">
<maml:list>
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="@type='bullet'">
<xsl:value-of select="'bullet'"/>
</xsl:when>
<xsl:when test="@type='number'">
<xsl:value-of select="'ordered'"/>
</xsl:when>
</xsl:choose>
</xsl:attribute>
<xsl:for-each select="item/description">
<maml:listItem>
<xsl:apply-templates select="node()" />
</maml:listItem>
</xsl:for-each>
</maml:list>
</xsl:template>
<xsl:template match="b">
<maml:legacyBold>
<xsl:apply-templates select="node()" />
</maml:legacyBold>
</xsl:template>
<xsl:template match="list[@type='table']">
<maml:table>
<maml:tableHeader>
<maml:row>
<maml:entry>
<xsl:apply-templates select="listheader/term" />
</maml:entry>
<maml:entry>
<xsl:apply-templates select="listheader/description" />
</maml:entry>
</maml:row>
</maml:tableHeader>
<xsl:for-each select="item">
<maml:row>
<maml:entry>
<xsl:apply-templates select="term" />
</maml:entry>
<maml:entry>
<xsl:apply-templates select="description" />
</maml:entry>
</maml:row>
</xsl:for-each>
</maml:table>
</xsl:template>
<xsl:template match="table">
<maml:table>
<maml:tableHeader>
<maml:row>
<xsl:for-each select="header/cell">
<maml:entry>
<xsl:apply-templates select="node()" />
</maml:entry>
</xsl:for-each>
</maml:row>
</maml:tableHeader>
<xsl:for-each select="row">
<maml:row>
<xsl:for-each select="cell">
<maml:entry>
<xsl:apply-templates select="node()" />
</maml:entry>
</xsl:for-each>
</maml:row>
</xsl:for-each>
</maml:table>
</xsl:template>
<xsl:template match="see[@cref]">
<maml:codeEntityReference qualifyHint="false">
<xsl:value-of select="@cref" />
</maml:codeEntityReference>
</xsl:template>
<xsl:template match="see-topic[@id]">
<maml:link>
<xsl:attribute name="xlink:href">
<xsl:value-of select="@id" />
</xsl:attribute>
</maml:link>
</xsl:template>
<xsl:template match="*">
<xsl:element name="maml:{local-name(.)}">
<xsl:copy-of select="@*"/>
<xsl:apply-templates select="node()" />
</xsl:element>
</xsl:template>
</xsl:stylesheet>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.