Hi every one, I have a question for xslt and xml output
I need to extract the text from creator or p with attribute class tags but if the creator and p with attribute class tags are the same I will not output the p tags. and each enclosed it with element name <bydesc>
XML input
<Article>
<metadata>
<creator>William Smith</creator>
<creator>John Smith</creator>
</metadata>
<content
<main>
<p class="author">William Smith, John Smith</p>
<p class="author">Jonathan Smith</p>
</main>
</content>
<Article
>
XSL
<xsl:template name="BYLINE">
<xsl:variable name="vByline">
<xsl:apply-templates select="/Article/metadata/creator | /Article/content/main/p[@class='author' and not(text() = /
/dc_creator/text())]" mode="byline"/>
</xsl:variable>
<xsl:if test="string-length(normalize-space($vByline))!=0">
<xsl:element name="BYLINE">
<xsl:element name="bydesc">
<xsl:value-of select="$vByline"/>
</xsl:element>
</xsl:element>
</xsl:if>
</xsl:template>
the produced OUTPUT
<BYLINE><bydesc>William SmithJohn SmithJonathan Smith</bydesc></BYLINE>
the OUTPUT should be
<BYLINE>
<bydesc>William Smith</bydesc>
<bydesc>John Smith</bydesc>
<bydesc>Jonathan Smith</bydesc>
</BYLINE>
Again thank you for the bighelp.....thank you