473,324 Members | 2,567 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,324 software developers and data experts.

redeclare the same namespace prefix?

KJ
Is the following invalid:

<d:doc xmlns:d="http://whatever.com/ns">
<d:title xmlns:d="http://whatever.com/ns">
is this invalid?
</d:title>
</d:doc>

Thanks
-KJ

Sep 22 '05 #1
6 1122


KJ wrote:
Is the following invalid:

<d:doc xmlns:d="http://whatever.com/ns">
<d:title xmlns:d="http://whatever.com/ns">
is this invalid?
</d:title>
</d:doc>


It is well-formed XML with namespaces. The question of validity does not
arise unless you provide a schema.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Sep 22 '05 #2
KJ
I guess the general question is: is it legal to declare the same
namespace prefix pointing to the same namespace more than once, as
shown.

Sep 22 '05 #3
In article <11**********************@g47g2000cwa.googlegroups .com>,
KJ <n_**********@mail.com> wrote:
I guess the general question is: is it legal to declare the same
namespace prefix pointing to the same namespace more than once, as
shown.


Yes it is.

-- Richard

Sep 23 '05 #4
KJ
thank you

Sep 23 '05 #5


KJ wrote:
is it legal to declare the same
namespace prefix pointing to the same namespace more than once, as
shown.


Such a document conforms with <http://www.w3.org/TR/REC-xml-names/> so
it is "legal" as far as that specifcation defines what is "legal".

--

Martin Honnen
http://JavaScript.FAQTs.com/
Sep 23 '05 #6
KJ
Got it, thanks.

In case anyone was wondering, the reason I was asking, is because
Visual Studio 2003 does not like it when elements redeclare namespaces.

Sep 23 '05 #7

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

Similar topics

3
by: Mike Dickens | last post by:
hi, i'm sure this has come up before but havn't managed to find an answer. if i have the following xslt <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet method="xml" version="1.0"...
4
by: AP | last post by:
Hi, I have a class that I wish to serialize to XML, part of which looks like this: public class TitleNotification { public string NoNameSpaceSchemaLocation =...
4
by: Krishna Tulasi via .NET 247 | last post by:
Hi, I am having trouble with creation of XML programmatically using .NET. Specifically Im trying to create an element which looks like below and insert into an existing xml doc: <Worksheet...
5
by: pneumoconi | last post by:
I've read a lot of posts on this subject each with a slightly different issue and from what I gather my code is fine. But its not. I'm trying to pull out the SQL query from a SQL report document...
2
by: Manoj G | last post by:
Hello, I believe there is no way to remove the default namespace declaration (For eg <DataSet xmlns="something">.... ) on an XmlNode object directly through DOM. So, what is the best way to...
5
by: David Thielen | last post by:
Hi; I set up my xml as follows: XmlDocument xml = new XmlDocument(); xml.Load(File.Open("data.xml", FileMode.Open, FileAccess.Read)); XmlNamespaceManager context = new...
18
by: jacksu | last post by:
I have a simple program to run xpath with xerces 1_2_7 XPathFactory factory = XPathFactory.newInstance(); XPath xPath = factory.newXPath(); XPathExpression xp = xPath.compile(strXpr);...
13
by: Axel Dahmen | last post by:
Hi, I've got a question on namespaces. After reading http://www.w3.org/TR/xml-names11 I still don't understand how namespaces are applied to attributes - particularly in regard to how processing...
2
by: scottpet | last post by:
Hi, I want to add a namespace prefix to the root node of an object I am serializing to XML. I have been reading though this article:...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.