Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Problem with XMLType transform
Problem is with the xsl. You have used "copy-OF SELECT" instead of
"copy-of select".
Following xsl works with your xml data.
create table transxml(pk number not null, xml xmltype,xsl xmltype);
insert into transxml(pk,xml,xsl) values(3,
xmltype('<EIN>
<segment_id>EIN</segment_id>
<earned_income_type>EIWA</earned_income_type> <employer_name>ATC TEMPE</employer_name> <earned_income_occurrence_cnt>01</earned_income_occurrence_cnt> <earned_income_amount>001360.00</earned_income_amount> <date_income_received>20050708</date_income_received> <hours_worked>000080</hours_worked> <earned_income_frequency_code>2</earned_income_frequency_code>
<EIN_Gross> <xsl:copy-of select="."/> </EIN_Gross>
scott_at_ORA9.2> select x.xml.transform(x.xsl) from transxml x where pk =3;
X.XML.TRANSFORM(X.XSL)
<segment_id>EIN</segment_id> <employer_name>ATC TEMPE</employer_name> <earned_income_occurrence_cnt>01</earned_income_occurrence_cnt> <EIN_Gross>
![]() |
![]() |