Some literal text in my style sheet is not being output, I'm not sure why.
I'm using the Oracle xml routines.
declare
xmlclob varchar2(4000);
xslclob varchar2(4000);
the_xml XMLType;
the_xsl XMLType;
the_doc XMLType;
begin
xmlclob := '<top><w>this_o ne</w><w>that_one</w></top>';
xslclob :=
'<xsl:styleshee t xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="w">
<xsl:copy>
BEFORE
<xsl:apply-templates select="@*|node ()"/>
AFTER
</xsl:copy>
</xsl:template>
<xsl:template match="@*|node( )">
<xsl:copy><xsl: apply-templates select="@*|node ()"/></xsl:copy>
</xsl:template>
</xsl:stylesheet> ';
the_xml := XMLType.createX ML(xmlclob);
the_xsl := XMLType.createX ML(xslclob);
the_doc := the_xml.transfo rm(the_xsl);
:docclob := the_doc.getCLOB val();
end;
/
print docclob
<top>
<w>this_one
AFTER
</w>
<w>that_one
AFTER
</w>
</top>
Why is the word BEFORE not included in the output?
Feedback appreciated.
Thanks.
I'm using the Oracle xml routines.
declare
xmlclob varchar2(4000);
xslclob varchar2(4000);
the_xml XMLType;
the_xsl XMLType;
the_doc XMLType;
begin
xmlclob := '<top><w>this_o ne</w><w>that_one</w></top>';
xslclob :=
'<xsl:styleshee t xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="w">
<xsl:copy>
BEFORE
<xsl:apply-templates select="@*|node ()"/>
AFTER
</xsl:copy>
</xsl:template>
<xsl:template match="@*|node( )">
<xsl:copy><xsl: apply-templates select="@*|node ()"/></xsl:copy>
</xsl:template>
</xsl:stylesheet> ';
the_xml := XMLType.createX ML(xmlclob);
the_xsl := XMLType.createX ML(xslclob);
the_doc := the_xml.transfo rm(the_xsl);
:docclob := the_doc.getCLOB val();
end;
/
print docclob
<top>
<w>this_one
AFTER
</w>
<w>that_one
AFTER
</w>
</top>
Why is the word BEFORE not included in the output?
Feedback appreciated.
Thanks.
Comment