473,554 Members | 2,920 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2149

"Nice" <ni********@hot mail.com> wrote in message
news:4e******** *************** ***@posting.goo gle.com...
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********@hotm ail.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********@yah oo.com> schrieb im Newsbeitrag
news:bi******** ****@ID-152440.news.uni-berlin.de...

"Nice" <ni********@hot mail.com> wrote in message
news:4e******** *************** ***@posting.goo gle.com...
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*****@muenst er.de> wrote in message
news:bi******** ****@ID-98527.news.uni-berlin.de...
"Dimitre Novatchev" <dn********@yah oo.com> schrieb im Newsbeitrag
news:bi******** ****@ID-152440.news.uni-berlin.de...

"Nice" <ni********@hot mail.com> wrote in message
news:4e******** *************** ***@posting.goo gle.com...
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********@yah oo.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********@yah oo.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
6771
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 encoding used in the document, of the version of XML being used... Thanks.
0
2051
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 <esql:get-xml> the tags are not escaped, but only the first part of the database field is displayed. The content of the database field is: ...
4
1971
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 as it is in the HTML source. For example, let's say that the XML tag in my HTML source looks like this: <XML id="xmltest"> <TAG1>some text...
1
1293
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 running into is that I need to be able to return more ASP.NET code as part of the return value of the <asp:Xml/> call, but it does not get processed at...
0
1193
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 would in turn perform their own transform based on existing xml and xslt files. As another way of accomplishing my goal, I was thinking I could have...
1
1215
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" DocumentSource="data.xml"></asp:Xml> The form display correctly in the browser, the question is, how do I get the values users input?
5
1219
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"?> <Datasource> <cars><car><car_Short_Name>OPEL</car_Short_Name><car_Contracts><CtoF_Contract
1
1760
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 render the content as an HTML. Everything is working fine and I am able to render the data in the form of a table. Here is my problem: When I...
3
18974
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
7497
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7780
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7530
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7862
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5136
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3539
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3530
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1994
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1111
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.