473,396 Members | 1,914 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

XSLT Extension Object returns empty default namespace

Hi,

I have an Xslt extension object that returns a node-set to the xslt
stylesheet which then uses an xsl:copy-to statement to write it to the
output.

The problem I am having is that the copied elements appear with an
empty default namespace appearing on them (xmlns=""). The root element
of the output XML does declare a default namespace
(xmlns="urn:schemas-microsoft-com:office:spreadsheet").

I have tried adding the same default namespace to the root node
returned by the extension object but it still appears as an empty
string in the output XML.

Can anybody help?

Thanks,
Si.

Nov 12 '05 #1
2 1536


Si********@hotmail.com wrote:

I have an Xslt extension object that returns a node-set to the xslt
stylesheet which then uses an xsl:copy-to statement to write it to the
output.
xsl:copy-to? I guess you use xsl:copy-of.
The problem I am having is that the copied elements appear with an
empty default namespace appearing on them (xmlns=""). The root element
of the output XML does declare a default namespace
(xmlns="urn:schemas-microsoft-com:office:spreadsheet").
xsl:copy-of simply copies the node(s) to the result tree, it does not
matter which namespace the root element has, your extension object has
to create the elements in the intended namespace.
I have tried adding the same default namespace to the root node
returned by the extension object but it still appears as an empty
string in the output XML.


We need to see exactly how you are creating the nodes in the extension
object then to figure what goes wrong.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Nov 12 '05 #2
Hi Martin,

I think I have fixed it.

I was adding the namespace as an attribute to the root node instead of
specifying it as the namespaceURI when calling the CreateElement
method.

Thanks anyway for your prompt reply.

Si.

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jay Allard | last post by:
Hello I posted this in the vb.net group on the 2/25/2004, but didn't get any response. Here's attempt 2. Does anyone know of a more appropriate place to post this? One new piece of...
1
by: Wil | last post by:
I'm very new to developing in .NET and even newer to XML. The past few days have been pretty frustrating for me because I'm trying to perform a transform on data in a dataset and it's not working....
2
by: Matt Frame | last post by:
In my old VB6 application I have an xslt extension object that builds a small cross reference document and returns it as a NodeList in my XSLT. I can then use it with xpath expressions as...
3
by: Stephan Brunner | last post by:
Hi I have created two flavors of an XSLT stylesheet to transform all attributes of an XML document to elements: They both work as expected with MSXML and XMLSPY but throw an exception ...
5
by: Douglas Steen | last post by:
Here's what I have (in snippets) ** XML ** <parent> <child> <grandchild/> </child> </parent> ** XSLT ** <xsl:template match="/parent">
2
by: Adam dR. | last post by:
I have an xml file similar to: <menu> <menuitem name="home" show="false"/> <menuitem name="about" show="true"/> <menuitem name="links" show="true"/> <menuitem name="games" show="true"/>...
3
by: WideBoy | last post by:
Hi, I have a software generated schema which creates a few empty elements, e.g. <xsd:sequence/>. I would like to be able to delete these elements from the schema post-generation using XSLT. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.