Skip to Main Content

DevOps, CI/CD and Automation

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!

disable-output-escaping="yes">'<' is not working.Please help.

495543Mar 3 2006 — edited Mar 7 2006
The following code is working in Windows NT but not partially working in Solaris in XDK version 9.2.6



<xsl:text disable-output-escaping="yes">'&lt;'</xsl:text>NetDataLevel5<xsl:text disable-output-escaping="yes">'&lt;'</xsl:text>

The ouput I am getting is &lt;NetDataLevel5> instead of <NetDataLevel5>

I also tried to code : <xsl:value-of disable-output-escaping="yes" select="string('<NetDataLevel5>')"/>

Still the result is the same.Please help me to find a solution for this.

My logic needs to open an element and close it later after processing all the levels.Can anybody suggest the alternate way of coding this logic.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:fox="http://xml.apache.org/fop/extensions"
version="1.0">

<xsl:output method="xml" encoding="utf-8"/>
<xsl:output indent="no"/>

<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>

<xsl:template match="NetAnalysisData">
<xsl:for-each select="NetData">
<xsl:if test="LEVELCODE='07'">
<xsl:value-of disable-output-escaping="yes" select="string('<NetDataLevel7>')"/>
<xsl:apply-templates select="."/>
</xsl:if>
<xsl:if test="LEVELCODE='06'">
<xsl:value-of disable-output-escaping="yes" select="string('<NetDataLevel6>')"/>
<xsl:apply-templates select="."/>
</xsl:if>
<xsl:if test="LEVELCODE='05'">
<xsl:value-of disable-output-escaping="yes" select="string('<NetDataLevel5>')"/>
<xsl:apply-templates select="."/>
</xsl:if>
<xsl:if test="LEVELCODE='04'">
<xsl:value-of disable-output-escaping="yes" select="string('<NetDataLevel4>')"/>
<xsl:apply-templates select="."/>
</xsl:if>
<xsl:if test="LEVELCODE='03'">
<xsl:value-of disable-output-escaping="yes" select="string('<NetDataLevel3>')"/>
<xsl:apply-templates select="."/>
</xsl:if>
<xsl:if test="LEVELCODE='02'">
<NetDataLevel2>
<xsl:apply-templates select="."/>
</NetDataLevel2>
<xsl:if test="following-sibling::NetData[position( ) = 1]/LEVELCODE='03'">
<xsl:value-of disable-output-escaping="yes" select="string('</NetDataLevel3>')"/>
</xsl:if>
<xsl:if test="following-sibling::NetData[position( ) = 1]/LEVELCODE='04'">
<xsl:value-of disable-output-escaping="yes" select="string('</NetDataLevel3>')"/>
<xsl:value-of disable-output-escaping="yes" select="string('</NetDataLevel4>')"/>
</xsl:if>
<xsl:if test="following-sibling::NetData[position( ) = 1]/LEVELCODE='05'">
<xsl:value-of disable-output-escaping="yes" select="string('</NetDataLevel3>')"/>
<xsl:value-of disable-output-escaping="yes" select="string('</NetDataLevel4>')"/>
<xsl:value-of disable-output-escaping="yes" select="string('</NetDataLevel5>')"/>
</xsl:if>
<xsl:if test="position( )=last( )">
<xsl:value-of disable-output-escaping="yes" select="string('</NetDataLevel3>')"/>
<xsl:value-of disable-output-escaping="yes" select="string('</NetDataLevel4>')"/>
<xsl:value-of disable-output-escaping="yes" select="string('</NetDataLevel5>')"/>
<xsl:value-of disable-output-escaping="yes" select="string('</NetDataLevel6>')"/>
<xsl:value-of disable-output-escaping="yes" select="string('</NetDataLevel7>')"/>
</xsl:if>
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 4 2006
Added on Mar 3 2006
4 comments
11,604 views