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

Re: Controlling namespace in output

Subject: Re: Controlling namespace in output
From: Peter Desjardins <peter.desjardins.us@xxxxxxxxx>
Date: Thu, 16 Dec 2010 23:36:49 -0500
Re:  Controlling namespace in output
That sounds like an excellent solution. Can you give an example of how
I can add the namespace to the stylesheet so that all elements are
generated in the DocBook namespace?

Thanks.

Peter

On Thu, Dec 16, 2010 at 6:32 PM, David Carlisle <davidc@xxxxxxxxx> wrote:
> On 16/12/2010 23:27, Peter Desjardins wrote:
>> I added the DocBook namespace to the root element of my output. Why do
>> its children have null namespaces (xmlns="")? How can I prevent them
>> from having explicit namespaces?
>
> you have generated the root element in the namespace but all the other
> elements in no-namespace so the serialiser has to add xmlns=""
>
> The solution is to generate all eleemnts in the docbook namespace, then the
> serialiser will just put a single declaration on the outmost element.
>
> the easiest way to do that (usually, it depends a bit on your code) is to
> move xmlns="..." from where you have it on to xsl:stylesheet so it is in
> scope for the whole stylesheet.
>
> David

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.