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 ? 7 2073
"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
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.
"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."
"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
Thanks to all, I had my doubts resolved.
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!
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! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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...
|
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>
...
|
by: jalbright99669 |
last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
|
by: antdb |
last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine
In the overall architecture, a new "hyper-convergence" concept was...
|
by: Matthew3360 |
last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function.
Here is my code.
...
|
by: AndyPSV |
last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
|
by: WisdomUfot |
last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
|
by: Oralloy |
last post by:
Hello Folks,
I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA.
My problem (spelled failure) is with the...
|
by: Carina712 |
last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
|
by: BLUEPANDA |
last post by:
At BluePanda Dev, we're passionate about building high-quality software and sharing our knowledge with the community. That's why we've created a SaaS...
|
by: Rahul1995seven |
last post by:
Introduction:
In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...
| |