Namespaces in XML

Before moving on to look at some XSLT examples, take a look at the Namespaces in XML that underlie the naming of elements such as <xsl:import> mentioned earlier.

Some people find the concept of namespaces intimidating. Yet, at heart, the concept is very simple. Imagine you walked into a room where John Smith, John Jones, and John Black were all present. You couldn't distinguish one John from another by means of their first name but when you take account of their "surname space," distinguishing one John from another is straightforward.

XML namespaces were created to solve a similar problem. Each XML element or attribute has a qualifier that helps to identify it more precisely. In the amaxing.xsl style sheet in Chapter 10, you ...

Get Platinum Edition Using XHTML™, XML, and Java™ 2 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.