KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > thaiopensource > relaxng > impl > NameFormatter


1 package com.thaiopensource.relaxng.impl;
2
3 import com.thaiopensource.xml.util.Name;
4
5
6 class NameFormatter {
7   static String JavaDoc format(Name name) {
8     String JavaDoc localName = name.getLocalName();
9     String JavaDoc namespaceUri = name.getNamespaceUri();
10     if (namespaceUri.equals(""))
11       return SchemaBuilderImpl.localizer.message("name_absent_namespace", localName);
12     else
13       return SchemaBuilderImpl.localizer.message("name_with_namespace", namespaceUri, localName);
14   }
15 }
16
Popular Tags