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

[XSLT 1.0] Replace namespace prefixes?

Subject: [XSLT 1.0] Replace namespace prefixes?
From: "Costello, Roger L." <costello@xxxxxxxxx>
Date: Thu, 24 Dec 2009 11:39:06 -0500
 [XSLT 1.0] Replace namespace prefixes?
Hi Folks,

I would like an identify transform that replaces namespace prefixes with my
own names.

For example, I would like to transform this:

    <attackNOW:book xmlns:attackNOW="http://www.book.org">
        <attackNOW:title>The Origin of Wealth</attackNOW:title>
        <attackNOW:author>Eric D. Beinhocker</attackNOW:author>
        <attackNOW:publisher>Harvard Business School
        <attackNOW:cost currency="USD">29.95</attackNOW:cost>

Into this:

    <bk:book xmlns:bk="http://www.book.org">
        <bk:title>The Origin of Wealth</bk:title>
        <bk:author>Eric D. Beinhocker</bk:author>
        <bk:publisher>Harvard Business School Press</bk:publisher>
        <bk:cost currency="USD">29.95</bk:cost>

Or this:

    <book xmlns="http://www.book.org">
        <title>The Origin of Wealth</title>
        <author>Eric D. Beinhocker</author>
        <publisher>Harvard Business School Press</publisher>
        <cost currency="USD">29.95</cost>

Is there a way to replace namespace prefixes, using XSLT 1.0?


Current Thread


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.
First Name
Last Name
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.