Transforming XMLTypes
The XMLType.transform() or XMLTransform() function can be used to transform XMLTypes. The XSL transformation conforms to the W3C XSLT 1.0 standard. The following example transforms an XMLType by removing data from reports. The XSL stylesheet is shown as follows (public_ view.xsl):
<?xml version=“1.0” encoding=“windows-1252” ?>
<xsl:stylesheet version=“2.0” xmlns:xsl=“http://www.w3.org/1999/XSL/Transform”
xmlns=“http://xmlbook.com/sample/contact.xsd”>
<xsl:template match=“*” priority=“2”>
<xsl:if test=“local-name()!=‘category’”>
<xsl:element name=“{local-name()}” namespace=“http://xmlbook.com/sample/ contact.xsd” >
<xsl:apply-templates select=“@*|node()” ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access