Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Value of attribute in xslt

user8195117Aug 11 2020 — edited Aug 12 2020

Hello,

I have a XML node with attributes as below

<PD1_PROD_ID1 Error_Flag="Y" Error_Msg="Product Identification data is missing in PD1_PROD_ID1">Product Identification data is missing in PD1_PROD_ID1</PD1_PROD_ID1>

I need to get the value of Error_Msg printed when PD1_PROD_ID1/@Error_Flag=''Y'' . I am using the below XSLT.....but it is not printing the attribute value of Error_Msg

<xsl:if test="PD1_PROD_ID1">

                <xsl:choose> <xsl:when test ="PD1_PROD_ID1/@Error_Flag=''Y''">

                <font color="red"><xsl:value-of select="PD1_PROD_ID1/@Error_Msg"/> </font> <xsl:text>*</xsl:text></xsl:when>               

                <xsl:otherwise>

                <xsl:value-of select="PD1_PROD_ID1"/><xsl:text>*</xsl:text>

                </xsl:otherwise>  </xsl:choose>

                </xsl:if>

Its Oracle 11g R2. Please help

This post has been answered by user8195117 on Aug 12 2020
Jump to Answer
Comments
Post Details
Added on Aug 11 2020
4 comments
753 views