[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

How to remove unnecessary "xmlns:xx" attributes?

Subject: How to remove unnecessary "xmlns:xx" attributes?
From: "KARR, DAVID (ATTSI)" <dk068x@xxxxxxx>
Date: Tue, 9 Nov 2010 10:58:08 -0800
 How to remove unnecessary "xmlns:xx" attributes?
I currently have an ad hoc Soap client framework that uses JAXB to
marshal a Soap request.  This generates a "minimal" Soap envelope, in
that it contains a "xmlns:xx" attribute for every "xx" that is actually
referenced in the request.

The WSDL that defines this request references numerous schemas, and
defines all the possible operations for this service.

I'm now doing an experiment to see if I can replace our ad hoc Soap
client framework with Apache CXF.  My results so far are ok, but I
noticed that the request that is built now contains "xmlns:xx"
attributes for EVERY schema referenced in the WSDL, even if that
namespace isn't referenced in the request.  As a result, my requests are
now 20 times larger.

I'm examining whether it's possible to get back to what I had before,
although with the new framework, but I think it may not be practical.
I'm not even sure the resulting larger request will result in any
increased latency.  It might make no difference, from a performance
point of view.

However, these requests are occasionally saved and passed back and forth
in email, to discuss certain operational issues.  It would be ideal if
these requests are "minimal".  If I can't solve this problem at runtime,
I'd at least like to have an XSLT stylesheet that can "minimize" the
request by simply removing the "xmlns:xx" attributes where the namespace
referred to by the "xx" prefix is not referenced in the request.  I've
googled about this, but I haven't found a clear solution for this.  Does
someone have an idea how I would write a stylesheet to do this?

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.