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

Copying Namespace Nodes

Subject: Copying Namespace Nodes
From: "Heiko Niemann" <kontakt@xxxxxxxxxxxxxxxx>
Date: Sun, 27 Nov 2011 22:10:02 +0100
 Copying Namespace Nodes
Hello,

I have an element I want to copy and in the source it looks like this:

<a:elem
  xmlns:a="example.com/ns/a"
  xsi:type="nsc:foo"
  xmlns:nsc="example.com/ns/sensitive"
  xmlns:b="example.com/ns/b"
  xmlns:c="example.com/ns/c"
  ...
  xmlns:z="example.com/ns/z">info</a:elem>

What I want to achieve at the same time:

1) Keep the namespace declaration for the namespace sensitive content of
the xsi:type attribute (with prefix nsc).

2) Get rid of all namespace declarations that are not needed here (prefix
b, c, ..., z) and that clutter up my result document.


If I use copy-of with copy-namespaces set to 'no' the declaration for
namespace sensitive content will be lost. If I say 'yes' everything stays
the same. So is there a short way I have not seen yet or is the solution
some verbose template? :)

Thanks for help,
Heiko

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.