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

Re: problem adding namespace node

Subject: Re: problem adding namespace node
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 28 Feb 2006 12:04:57 -0500
Re:  problem adding namespace node
At 2006-02-28 17:57 +0100, Majirus FANSI wrote:
I did try <xsl:copy-of select="xalan:nodeset($dummy)/*/namespace::p"/>.
But the situation remains the same. No namespace created. I have tried both with xalan 2.6.0 and saxon 8. The result is the same: only <p:a/>, without namespace declaration.

Ummmm ... those processors do emit well-formed XML, so if you didn't get an error, and you did get <p:a/> then your "p" namespace is already declared in an ancestor and is already in scope so it isn't needed.


The XML syntax generator will not create a redundant declaration of a namespace that is already in scope.

any other tips are welcome.

If my suggestion below also does not add a namespace declaration, then I assume you already have the namespace declared in scope.


I hope this helps.

. . . . . . . . . . Ken

At 2006-02-28 11:28 -0500, I wrote:
I think it would be cleaner if you had in your stylesheet:

<xsl:stylesheet xmlns:p="http://majirus.org">

then you could do:

<xsl:copy-of select="document('')/*/namespace::p"/>


--
Upcoming XSLT/XSL-FO hands-on courses: Washington,DC 2006-03-13/17
World-wide on-site corporate, govt. & user group XML/XSL training.
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Cancer Awareness Aug'05  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

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.