Using User-defined functions in XSLT Oracle XDK.
четверг, 18 ноября 2010 г.
Оставить комментарий
Continue to consider new features xsl-transformer in Oracle XDK.
Now let's talk about the User-defined functions.
Custom functions appeared in 2 versions XSLT, so the version = "2.0" is necessary to specify the header of XSLT.
select ora_20000_xmlutility.XMLTransformClob
(xml_sample.xmltext,
q'~<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:foo="http://foo"
exclude-result-prefix="foo">
<xsl:function name="foo:twice">
<xsl:param name="p-string" />
<xsl:value-of select="concat($p-string, $p-string)" />
</xsl:function>
<xsl:template match="/">
<xsl:value-of select="foo:twice('Function plig-in. ')"/>
</xsl:template>
</xsl:stylesheet>
~' )
from xml_sample;
Result:
<?xml version = '1.0' encoding = 'UTF-8'?>
Function plig-in. Function plig-in.
Additional links:
0 коммент. »
Оставьте Ваш комментарий