I am building a blogging website for a school project. A blog post's content consists of a number of elements, each of which can either be plain text, links, images, or videos. All these elements must be shown in the order which they are stored with in the XML file, and each one will be displayed in a new <p> tag.
Hence, the idea is to somehow loop all these elements, and each iteration should perform an `xsl:choose to decide how to display the current iteration's element.
Take this code for example: how can I make it perform only the TEXT part when the element is a b:blogPostContent/b:blogPostText type, and the LINK part when the element is a b:blogPostContent/b:blogPostLink?
<xsl:for-each select="b:blogPostContent/*">
<p>
<!--TEXT-->
<xsl:value-of select="."/>
<!--LINK-->
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="./@target"/>
</xsl:attribute>
<xsl:attribute name="target">
_blank
</xsl:attribute>
<xsl:value-of select="."/>
</xsl:element>
</p>
</xsl:for-each>