473,394 Members | 1,755 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,394 software developers and data experts.

legal <xml> tag

Hi.
I read somewhere that in XML the tag <xml> is not legal.
But in W3C specs I can't find this statement.
Does anyone know about it ?
Jul 20 '05 #1
7 2136

"Nice" <ni********@hotmail.com> wrote in message
news:4e**************************@posting.google.c om...
Hi.
I read somewhere that in XML the tag <xml> is not legal.
But in W3C specs I can't find this statement.
Does anyone know about it ?


It is perfectly legal. What is not legal is the *prefix* "xml", because it
is already associated in advance to the following namespace-uri:
http://www.w3.org/XML/1998/namespace
and this association should not be changed/redefined.

"Namespace Constraint: Leading "XML"
Prefixes beginning with the three-letter sequence x, m, l, in any case
combination, are reserved for use by XML and XML-related specifications. "
http://www.w3.org/TR/REC-xml-names/#xmlReserved
Hope this helped.
=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL
Jul 20 '05 #2
On 21 Aug 2003 03:37:17 -0700, ni********@hotmail.com (Nice) wrote:
I read somewhere that in XML the tag <xml> is not legal.


The element <XML> is a Microsoft extension to HTML and so is not valid
_for_ _the_ _HTML_ _DTD_.

In XML, I can see no reason why <xml> wouldn't be valid in some
self-generated document or schema.

Jul 20 '05 #3
"Dimitre Novatchev" <dn********@yahoo.com> schrieb im Newsbeitrag
news:bi************@ID-152440.news.uni-berlin.de...

"Nice" <ni********@hotmail.com> wrote in message
news:4e**************************@posting.google.c om...
Hi.
I read somewhere that in XML the tag <xml> is not legal.
But in W3C specs I can't find this statement.
Does anyone know about it ?


It is perfectly legal. What is not legal is the *prefix* "xml", because it
is already associated in advance to the following namespace-uri:
http://www.w3.org/XML/1998/namespace
and this association should not be changed/redefined.

"Namespace Constraint: Leading "XML"
Prefixes beginning with the three-letter sequence x, m, l, in any case
combination, are reserved for use by XML and XML-related specifications. "
http://www.w3.org/TR/REC-xml-names/#xmlReserved
Hope this helped.


XML 1.0:

"[Definition: A Name is a token beginning with a letter or one of a few
punctuation characters, and continuing with letters, digits, hyphens,
underscores, colons, or full stops, together known as name characters.]
Names beginning with the string "xml", or any string which would match
(('X'|'x') ('M'|'m') ('L'|'l')), are reserved for standardization in this or
future versions of this specification."
Jul 20 '05 #4

"Julian F. Reschke" <re*****@muenster.de> wrote in message
news:bi************@ID-98527.news.uni-berlin.de...
"Dimitre Novatchev" <dn********@yahoo.com> schrieb im Newsbeitrag
news:bi************@ID-152440.news.uni-berlin.de...

"Nice" <ni********@hotmail.com> wrote in message
news:4e**************************@posting.google.c om...
Hi.
I read somewhere that in XML the tag <xml> is not legal.
But in W3C specs I can't find this statement.
Does anyone know about it ?
It is perfectly legal. What is not legal is the *prefix* "xml", because it is already associated in advance to the following namespace-uri:
http://www.w3.org/XML/1998/namespace
and this association should not be changed/redefined.

"Namespace Constraint: Leading "XML"
Prefixes beginning with the three-letter sequence x, m, l, in any case
combination, are reserved for use by XML and XML-related specifications. " http://www.w3.org/TR/REC-xml-names/#xmlReserved
Hope this helped.


XML 1.0:

"[Definition: A Name is a token beginning with a letter or one of a few
punctuation characters, and continuing with letters, digits, hyphens,
underscores, colons, or full stops, together known as name characters.]
Names beginning with the string "xml", or any string which would match
(('X'|'x') ('M'|'m') ('L'|'l')), are reserved for standardization in this

or future versions of this specification."


Hi Julian,

Thanks for the correction.

However, as the xml spec was written before the xml-namespace spec, I guess
that the latter overrides the former, providing a more convinient way to
achieve exactly the same.

Also, from practical point of view I tried to procesa this xml document
"<xml/>" : there was not a single error message from any of the parsers of
the 10 XSLT processors I'm using (MSXML3/4, .Net xslTransform, XalanJ 2.4.1,
XalanC 1.5, Saxon 6.5.2, Saxon 7, JD, xsltProc, 4xslt).

On the other side, this xml document:

<t xmlns:xml="ttt"/>

raises an error.

And the question was "what is illegal".

Therefore, I believe that my reply was really precise and of practical
value.
=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL
Jul 20 '05 #5
Thanks to all, I had my doubts resolved.
Jul 20 '05 #6
In article <bi************@ID-152440.news.uni-berlin.de>,
Dimitre Novatchev <dn********@yahoo.com> wrote:
However, as the xml spec was written before the xml-namespace spec, I guess
that the latter overrides the former, providing a more convinient way to
achieve exactly the same.
The XML spec reserved names beginning with "xml". The Namespaces spec
used some of those reserved names. The rest are still reserved, but I
think it's unlikely that any will be used because (as you say) new
extensions will probably use the namespaces mechanism.
Also, from practical point of view I tried to procesa this xml document
"<xml/>" : there was not a single error message from any of the parsers of
the 10 XSLT processors I'm using (MSXML3/4, .Net xslTransform, XalanJ 2.4.1,
XalanC 1.5, Saxon 6.5.2, Saxon 7, JD, xsltProc, 4xslt).


Many extensions can be provided as layers after parsing, so it
wouldn't be much use if parsers rejected documents because of reserved
names. Namespaces are a case in point: you can implement namespaces
on top of a vanilla XML 1.0 parser, but you wouldn't be able to do
that if the parser had already rejected your xmlns: attributes.

More recent specs tend to be more explicit about what "reserved" means.
For example, the Namespaces 1.1 CR draft says:

All other prefixes beginning with the three-letter sequence x, m, l,
in any case combination, are reserved. This means that:

users should not use them except as defined by later specifications

processors must not treat them as fatal errors.

-- Richard
--
Spam filter: to mail me from a .com/.net site, put my surname in the headers.

FreeBSD rules!
Jul 20 '05 #7
Thank you, Richard!

Dimitre.
"Richard Tobin" <ri*****@cogsci.ed.ac.uk> wrote in message
news:bi***********@pc-news.cogsci.ed.ac.uk...
In article <bi************@ID-152440.news.uni-berlin.de>,
Dimitre Novatchev <dn********@yahoo.com> wrote:
However, as the xml spec was written before the xml-namespace spec, I guessthat the latter overrides the former, providing a more convinient way to
achieve exactly the same.
The XML spec reserved names beginning with "xml". The Namespaces spec
used some of those reserved names. The rest are still reserved, but I
think it's unlikely that any will be used because (as you say) new
extensions will probably use the namespaces mechanism.
Also, from practical point of view I tried to procesa this xml document
"<xml/>" : there was not a single error message from any of the parsers ofthe 10 XSLT processors I'm using (MSXML3/4, .Net xslTransform, XalanJ 2.4.1,XalanC 1.5, Saxon 6.5.2, Saxon 7, JD, xsltProc, 4xslt).


Many extensions can be provided as layers after parsing, so it
wouldn't be much use if parsers rejected documents because of reserved
names. Namespaces are a case in point: you can implement namespaces
on top of a vanilla XML 1.0 parser, but you wouldn't be able to do
that if the parser had already rejected your xmlns: attributes.

More recent specs tend to be more explicit about what "reserved" means.
For example, the Namespaces 1.1 CR draft says:

All other prefixes beginning with the three-letter sequence x, m, l,
in any case combination, are reserved. This means that:

users should not use them except as defined by later specifications

processors must not treat them as fatal errors.

-- Richard
--
Spam filter: to mail me from a .com/.net site, put my surname in the

headers.
FreeBSD rules!

Jul 20 '05 #8

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

Similar topics

6
by: yzzzzz | last post by:
Hi, In which cases is the <?xml version="1.0" encoding="UTF-8"?> processing instruction required at the beginning of an XML document, for the document to be valid? e.g. does it depend on the...
0
by: Arne Schirmacher | last post by:
I want to display a MySQL database field that can contain HTML markup. If I use <esql:get-string> then I get all of the database field, but all tags are escaped which is not what I want. If I use...
4
by: lidija | last post by:
Hi everybody, My problem is following: in the HTML source I have an <XML> tag, containing an XML document. I am trying to read this XML and save it, but I have problem saving it in the same form...
1
by: Greg Collins [MVP] | last post by:
I've got a web site I've built that uses an InfoPath form to generate an xml file. This file is then transformed within the default.aspx page to create the contents of the page. The problem I'm...
0
by: Random | last post by:
I would like to be able to read an Xml file with an <asp:Xml> Web Control and using XSLT dynamically write <asp:Xml> Web Controls to the page using the information from the first Xml file, which...
1
by: Danny Ni | last post by:
Hi, I use the <asp:xml> control, xml and xslt to generate a HTML for users to input data, here is my HTML snippet in a web form: <asp:Xml id="Xml1" runat="server" TransformSource="entry.xsl"...
5
by: ina | last post by:
Hello guys, My name is ina and I have a problem with a file xlst. I am newbie and sorry for this question, probably must be very simple. I have this xml file <?xml version="1.0"?>...
1
by: =?Utf-8?B?RGlmZmlkZW50?= | last post by:
Hello All, I have a simple web form that has an <asp:xmlcontrol. I am using a dataset's getXml() and binding it to the Document property of xml control. I am also using an XSLTransform object to...
3
by: jariwaladivyesh | last post by:
Hi frnds, i have simple XML doc <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="test.xsl"?> <data> <name> Divyesh Jariala</name> </data>
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.