473,396 Members | 1,998 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.

ignoring namespaces in XSLT

Hi all,
I have an xml file that I am trying to run through XSLT, but the namespace on some of my source objects are causing the xslt to not find the node. Can't I tell xslt to ignore the namespace?
xml file snippet:
<Shipping xmlns="http://soa.channeladvisor.com/webservices/">
<NameTitle>Mr.</NameTitle>
<FirstName>John</FirstName>
<LastName>Doe</LastName>
</Shipping>

xslt snippet:
<xsl:value-of select="ShippingInfo/NameTitle" />

If I delete the namespace from the Shipping node, my xslt works fine. But of course I don't have control over the xml to remove the namespace in production.

Thanks!
Oct 24 '06 #1
1 2736
Hi all,
I have an xml file that I am trying to run through XSLT, but the namespace on some of my source objects are causing the xslt to not find the node. Can't I tell xslt to ignore the namespace?
xml file snippet:
<Shipping xmlns="http://soa.channeladvisor.com/webservices/">
<NameTitle>Mr.</NameTitle>
<FirstName>John</FirstName>
<LastName>Doe</LastName>
</Shipping>

xslt snippet:
<xsl:value-of select="ShippingInfo/NameTitle" />

If I delete the namespace from the Shipping node, my xslt works fine. But of course I don't have control over the xml to remove the namespace in production.

Thanks!

Hi,
Why don't you write another XSLT doc that will generate an XML doc without xmlns attribute for node Shipping?

Ovidiu
Oct 25 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Greg Wogan-Browne | last post by:
Hi all, I am having some trouble figuring out what is going on here - is this a bug, or correct behaviour? Basically, when I create an XML document with a namespace using xml.dom.minidom.parse()...
6
by: Matt | last post by:
Hello, I have an XML document similar to the following: <DataItems> <Data xmlns="http://www.me.com"> <DataInformation xmlns:a="http://www.me.com/ASettings" xsi:type="a:Stuff1">...
5
by: Steve Jorgensen | last post by:
I was having a bear of a time today trying to figure out some inconsistent behavior selecting nodes from and MSXML DOM document, so I distilled the issue down to a trivial test demonstrating the...
2
by: Jon Davis | last post by:
I would like to parse RSS 1.0 (not RSS 2.0) files. But I don't know how to work with these XML namespaces! And when namespaces are improperly used in RSS 2.0 files, I don't know how to deal with...
6
by: Daniele | last post by:
Hi all, We are developing a .net application that can accept xml documents. Every xml document can match a single schema, or it may be composed by multiple different elements and each of these...
19
by: David Thielen | last post by:
Hi; If there are no namespaces this works fine for me. But if the xml has namespaces, then I get either no node back or an exception. Here is the sample xml: <root xmlns="http://www.test.org"...
2
by: daz_oldham | last post by:
Hi All I am re-visiting XSLT after not touching it for about three years, so to be honest I am starting myself from scratch. If I have XML under the namespace "http://tempuri.com/abc/2002/09",...
2
by: lanegroups | last post by:
Dear experts, I'm trying to do the following using Xalan-C++ API 1. parse an XML document 2. evaluate an XML path 3. serialize the selected XML subtree 4. The new serialized XML fragment should...
5
by: printdude1968 | last post by:
Hi Everyone... I'm a newbie to this stuff so bear with me. I have a well formed xml document (I use jdom to verify) <?xml version="1.0" encoding="ISO-8859-1"?> <print-control>...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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,...

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.