Murali Mohan pointed that an answer to question 10 of �core XML� exam is incorrect. He tried this XML document and did not get an error message. <?xml version="1.0" encoding="UTF-8"?> <company> <Sevenhills>10th floor</Sevenhills> <Microsoft>5Th flooor</Microsoft> <myXMLcompany>myXMLcompany</myXMLcompany> <XMLcompany i="xml">XMLcompany</XMLcompany> <xml>hai</xml> </company> I also checked the document above and neither IE (which is not a big surprise) nor Xalan (which is a bigger surprise) complained. W3C XML specification said: "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." http://www.w3.org/TR/2000/REC-xml-20001006#sec-common-syn Perhaps that means that currently W3C compliant software is not required to report a well-formedness violation. However, if later versions of XML specification will use names starting with "XML" string, then XML documents misusing such names for their own proposals will cause a collision. Any other ideas? Thanks, Murali!
Map, your reasoning is absolutely correct. Since XML is an evolving standard, they have reserved names beginning with 'xml' for future versions. They may or give them a special meaning. For now, parsers and applications may chose not to report any errors if such elements are found in the document. Having that said, XML authors should be aware of this fact. It is in their best interest to avoid using any reserved constructs simply because it might cause toomuch of a problem to cleanup if they indeed become reserved as a result of future standardization efforts. Hope that helps! ------------------ Ajith Kallambella M. Sun Certified Programmer for the Java�2 Platform. IBM Certified Developer - XML and Related Technologies, V1.
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
IMHO, currently we SHOULD NOT expect any violations/errors when strings matiching (any flavor of) "xml" are used, since nothing of this sort is mentioned in the specs. As Ajith said, we should use it as a guideline and avoid it so that in future we may not have any problems. regds. - satya
Take a Minute, Donate an Hour, Change a Life