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

Re: RE: unwanted and non prefix namespaces in output

Subject: Re: RE: unwanted and non prefix namespaces in output
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Sat, 31 Jul 2004 18:23:25 +0100
prefix words
Hi Joel,

> Thanks, that did fix the problem. Out of curiosity (strictly
> academic as my stylesheet does what I need it to), is there a more
> elegant solution to the problem? Or is the stylesheet I wrote along
> the correct lines?

You could alternatively declare the
'http://schemas.microsoft.com/ads/2003/sequence' namespace as the
default namespace in the stylesheet (while keeping it declared with
the 'ads' prefix as well, so that you can refer to the elements in
that namespace within XPaths). If that's the default namespace in your
stylesheet, then any literal result elements that you create (without
a prefix) will be placed in that namespace.

In other words, change the <xsl:stylesheet> start tag to:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns="http://schemas.microsoft.com/ads/2003/sequence"
  xmlns:ads="http://schemas.microsoft.com/ads/2003/sequence"
  version="1.0">
 
and keep the rest of the stylesheet unchanged (from the one you
posted).

Note that you probably won't get the namespace declared on all the
<sequence> elements, since the inner ones already have the namespace
in-scope due to its declaration on the outer one.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/

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.