Today's issue is actually for those of you that are a newcomer to XML.
For the purpose of regularity, the policies for making a valid attribute name are the same as those meant for making valid element names and for the names of numerous less popular constructs. As one I talk about these as XML names. XML names could have characters within the ranges [A-Z, a-z and 0-9].
They might also include none English letters, numbers and ideograms. XML schema names might also have an underscore, hyphen or period. A sound XML name could start with a letter, ideogram or maybe underscore. May well start out with a number hyphen or period. Element lengths tend to be unlimited.
These element names are all valid:
[Drivers_No]0000222[/Drivers_No]
[day-month-year]20/04/2011[/day-month-year]
[_4-bit]1010[/_4-bit]
[first-name]Peter[/first-name]
The examples below element names are all invalid:[Driver's_No]0000222[/Driver's_No]
[day/month/year]20/04/2011[/day/month/year]
[4-bit>1010[/4-bit]
[first name>Peter[/first name]
Within the 1st line, the element name has an apostrophe. From the second line the element name contains a forward slash. From the third line the element name begins with a number and in the fourth, the element name contains a space. Every one of them are actually illegal XML Editor names.
The way namespaces work is that each element (or attribute) classification is allocated a prefix. This is separated from what is called the ‘local part’ of the name, with a single colon (as written above). It's quite common practice to couple a prefix with a URI (or Uniform Resource Indicator).
The most common form is a URL (or Uniform Resource Locator). The URI is not used for lookup over the internet. It's usage is usually solely to identify a set of data objects individually and since URI’s are used internationally they are great for the job. URI’s are bound to a namespace prefix making use of the
xmlns:prefix="URI".
The prefix and also the full URI definition are not interchangeable as URI’s could contain characters that are illegal in an XML namespace. It is usually illegal to work with the three letters XML regardless combination for a namespace prefix as these are usually reserved.
Word: XML is an abbreviation for eXtensible Mark-up Language. It's really a mark-up language, not a programming language. Its intent is almost always to explain a class of data objects regarded as an XML Document. Data files could be as difficult or as basic as is necessary. Many information is available on XML for those who would like to know more. For that definitive guide, visit www.W3.org.
I am hoping these is beneficial to someone out there. More content is going to be on its way shortly.
No comments:
Post a Comment