Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

xml reserved word and well-formed  RSS feed

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Is XML a reserved word, which is not allowed in element names(for well-formed xml)?
I thought it was, but XMLSpy lets me save a file with <xml/> or <xml_name/> as elements.
 
Ranch Hand
Posts: 578
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Avianu,
A good question !!
I think, what you say is right :
An elemnt name must be a Legal XML name. It must contain only letters, digits and 4 punctuation marks(":","-",".","_"). And the first charcater can be any Unicode letter, "_" or : ONLY. Also any combination of xml would not be allowed also !!!
I think the XMLSpy parser does not check for this validity constraint
But the question here is :
THEY SHOULD NOT BE USED or THEY CANNOT BE USED ?
I am not rellay sure , I think as far as XMLSpy is considered, They should not be used
Any people with indepth knowledge of XML, please do clarify !!!
 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Quote from page 2 Essential XML by Skonnard:
Element names that begin with character sequence xml or any recapitalization thereof are reserved by the XML specification for future use.
best wishes
 
Hari Vignesh Padmanaban
Ranch Hand
Posts: 578
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
xmlSpy allows you to save an element beginning with "xml" as this is not an ERROR or a FATAL ERROR. It is considered to be a warning!!!
---------------------------------------------------------------------"Parsers may or may not detect these type of problems. If a parser does detect one, it will not throw an exception, but will continue parsing"
-- Elliote.R.harold - Processing XML with Java.
---------------------------------------------------------------------
The use of "xml" as starting of an elemnts is reserved by W3C. most of teh parsers allow you to name an elemnt starting with "xml" for teh above reason .
But it is always better to avoid doing that and stick with the specifications!!!:-)
Hari
 
If somebody says you look familiar, tell them you are in porn. Or in these tiny ads:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!