Q: my mistake or theirs?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Malcolm Dew-Jones

    #1

    Q: my mistake or theirs?

    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.

  • Martin Honnen

    #2
    Re: Q: my mistake or theirs?

    Malcolm Dew-Jones wrote:
    Some literal text in my style sheet is not being output, I'm not sure why.
    I'm using the Oracle xml routines.
    Why is the word BEFORE not included in the output?
    I don't see a problem with your stylesheet so you might want to raise
    the issue on an Oracle support forum or mailing list.

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/

    Comment

    Working...