« February 2008 | Main | April 2008 »

March 2008 Archives

March 6, 2008

Stripping namespaces using XSLT

A common question often asked is "I have a namespace qualified XML document -
I need to remove all xmlns attributes from the same".



Here is an XSLT that you can use to strip all namespaces from your document.






  1. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  
  2. exclude-result-prefixes="xsl">  
  3.   
  4.  <xsl:template match="*">  
  5.     <xsl:element name="{local-name()}">  
  6.       <xsl:apply-templates select="@* | node()"/>  
  7.     </xsl:element>  
  8.   </xsl:template>  
  9.   <xsl:template match="@* | text()">  
  10.     <xsl:copy/>  
  11.   </xsl:template>  
  12. </xsl:stylesheet>

March 18, 2008

Reading only headers in an File/FTP Adapter and skipping the payload

At times, you might have a requirement where you only need to read the file headers[file name and directory] and ignore the payload while using an inbound file/ftp adapter.


For this purpose, you need to add UseHeaders="true" on the <jca:operation> in the adapter wsdl.


This ensures that the payload is skipped while reading the file.


Then you can follow the usual steps to read the headers [through the inputHeaderVariable on the receive activity to retrieve the headers.


 

About March 2008

This page contains all entries posted to Ramkumar Menon's Blog in March 2008. They are listed from oldest to newest.

February 2008 is the previous archive.

April 2008 is the next archive.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type and Oracle