Posts
XSLT: Normalize the spaces of incoming xml values
- Get link
- Other Apps
This xslt can remove the tailing whitespaces in xml. <?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:apply-templates /> </xsl:template> <xsl:template match="*"> <xsl:copy> <xsl:for-each select="@*"> <xsl:attribute name="{name()}"> <xsl:value-of select="normalize-space()"/> </xsl:attribute> </xsl:for-each> <xsl:apply-templates/> </xsl:copy> </xsl:template> <xsl:template match="text()"> <xsl:value-of select="normalize-space()"/> </xsl:template> </xsl:stylesheet>
OSB 12c custom xquery functions
- Get link
- Other Apps
Here are the some of OSB custom xquery function that came across: 1. mmddyyyy to date conversion: declare function ns1:mmddyyyy-to-date ( $dateString as xs:string? ) as xs:date? { if (empty($dateString)) then () else xs:date(concat(substring($dateString,7,4),'-', substring($dateString,1,2),'-', substring($dateString,4,2))) } ; 2. day of week: declare function ns1:day-of-week ( $date as xs:date? ) as xs:integer? { if (empty($date)) then () else xs:integer(($date - xs:date('1901-01-06')) div xs:dayTimeDuration('P1D')) mod 7 } ; 3. day of week name: declare function ns1:day-of-week-name ( $date as xs:date? ) as xs:string? { ('Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday') [ns1:day-of-week($date) + 1] } ;
XQuery functions that supported by OSB
- Get link
- Other Apps
NAMESPACES ------------------------------------------------------------------------ xml=http://www.w3.org/XML/1998/namespace fn=http://www.w3.org/2004/07/xpath-functions op=http://www.w3.org/2004/07/xpath-operators err=http://www.w3.org/2004/07/xqt-errors fn-bea=http://www.bea.com/xquery/xquery-functions op-bea=http://www.bea.com/xquery/xquery-operators dt-bea=http://www.bea.com/xquery/xquery-datatypes var-bea=http://www.bea.com/xquery/xquery-variables xf-aug02=http://www.w3.org/2002/08/xquery-function op-aug02=http://www.w3.org/2002/08/xquery-operators xs=http://www.w3.org/2001/XMLSchema xsd=http://www.w3.org/2001/XMLSchema xdt=http://www.w3.org/2004/07/xpath-datatypes local=http://www.w3.org/2004/07/xquery-local-functions declare default function namespace "http://www.w3.org/2004/07/xpath-functions XQUERY FUNCTIONS ------------------------------------------------------------------------ fn:node-name($arg as node()?) as xs:QName? fn:
Basics to know about OSB11g
- Get link
- Other Apps
1.Why Oracle Service Bus 11g ? What are the Key Benefits and Advantages? 1. Service Virtualization : A core principle of SOA is to ensure that any service consumer can access any service provider - and from any platform. This has been considered as key principle in OSB and it provides robust way of Vitalizing the Service. It's a great value add in SOA Architecture. 2. Loose Coupling : OSB provides loose coupling by mediating between Service provided and Consumer. Without mediation Service consumer and provider will create dependency to each other. A change in single side provider/consumer will lead to the change dependent consumer/provider respectively. OSB bridges the gap of transport, message format, security technology etc. 3. Location Transparency : It's a strategy to hide physical location of actual physical location of service endpoints from the Service Consumer. All Service consumers should know only single logical machine & port name for each service. This