私はxsltを初めて使用し、チャットアプリケーションを実行しています。ユーザーのセッションを、ユーザーが事前定義した色とフォントで表示されるxmlファイルとして保存したいので、xsltを使用してそれを実現しましたが、方法がわかりません。 xmlからフォントを取得し、それをhtmlタグに適用して、ユーザーが選択したフォントで表示されるようにします。
<xsl:choose>
<xsl:when test="/body/msg[italic/text()='true']">
<i>
<font family="/body/msg[font/text()] color="/body/msg/color">
<xsl:value-of select="from" /><p>: </p>
<xsl:value-of select="content"/><br/>
</font>
</i>
</xsl:when>
<xsl:when test="/body/msg[bold/text()='true']">
<b>
<font family="/body/msg[font/text()]" color="/body/msg/color">
<xsl:value-of select="from" /><p>: </p>
<xsl:value-of select="content"/><br/>
</font>
</b>
</xsl:when>
<xsl:when test="/body/msg[bold/text()='true'] and /body/msg[italic/text()='true']">
<b>
<i>
<font family="/body/msg[font/text()]" color="/body/msg/color">
<xsl:value-of select="from" /><p>: </p>
<xsl:value-of select="content"/><br/>
</font>
</i>
</b>
</xsl:when>
</xsl:choose>