Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   legal <xml> tag (http://www.velocityreviews.com/forums/t165464-legal-xml-tag.html)

Nice 08-21-2003 10:37 AM

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 ?

Dimitre Novatchev 08-21-2003 11:03 AM

Re: legal <xml> tag
 

"Nice" <nice__nice@hotmail.com> wrote in message
news:4ece25b1.0308210237.7d3a6568@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



Julian F. Reschke 08-21-2003 11:11 AM

Re: legal <xml> tag
 
"Dimitre Novatchev" <dnovatchev@yahoo.com> schrieb im Newsbeitrag
news:bi27vl$4kd87$1@ID-152440.news.uni-berlin.de...
>
> "Nice" <nice__nice@hotmail.com> wrote in message
> news:4ece25b1.0308210237.7d3a6568@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."



Andy Dingley 08-21-2003 11:13 AM

Re: legal <xml> tag
 
On 21 Aug 2003 03:37:17 -0700, nice__nice@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.


Nice 08-21-2003 12:44 PM

Re: legal <xml> tag
 
Thanks to all, I had my doubts resolved.

Dimitre Novatchev 08-21-2003 12:49 PM

Re: legal <xml> tag
 

"Julian F. Reschke" <reschke@muenster.de> wrote in message
news:bi29fp$4i6m5$1@ID-98527.news.uni-berlin.de...
> "Dimitre Novatchev" <dnovatchev@yahoo.com> schrieb im Newsbeitrag
> news:bi27vl$4kd87$1@ID-152440.news.uni-berlin.de...
> >
> > "Nice" <nice__nice@hotmail.com> wrote in message
> > news:4ece25b1.0308210237.7d3a6568@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



Richard Tobin 08-21-2003 02:42 PM

Re: legal <xml> tag
 
In article <bi2e7c$4eth8$1@ID-152440.news.uni-berlin.de>,
Dimitre Novatchev <dnovatchev@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!

Dimitre Novatchev 08-21-2003 03:17 PM

Re: legal <xml> tag
 
Thank you, Richard!

Dimitre.


"Richard Tobin" <richard@cogsci.ed.ac.uk> wrote in message
news:bi2lp0$11d5$1@pc-news.cogsci.ed.ac.uk...
> In article <bi2e7c$4eth8$1@ID-152440.news.uni-berlin.de>,
> Dimitre Novatchev <dnovatchev@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!





All times are GMT. The time now is 05:39 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57