Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!