示例#1
0
 /* (non-Javadoc)
  * @see org.eclipse.ohf.utilities.xml.IXMLWriter#namespace(java.lang.String)
  */
 @Override
 public void namespace(String namespace) throws IOException {
   if (!namespaceDefined(namespace)) {
     int index = 0;
     while (abbreviationDefined("ns" + Integer.toString(index))) index++;
     defineNamespace(namespace, "ns" + Integer.toString(index));
   }
 }
示例#2
0
 /* (non-Javadoc)
  * @see org.eclipse.ohf.utilities.xml.IXMLWriter#namespace(java.lang.String, java.lang.String)
  */
 @Override
 public void namespace(String namespace, String abbreviation) throws IOException {
   XMLNamespace ns = findByAbbreviation(abbreviation);
   if (ns == null || !ns.getNamespace().equals(namespace))
     defineNamespace(namespace, abbreviation);
 }
示例#3
0
 /* (non-Javadoc)
  * @see org.eclipse.ohf.utilities.xml.IXMLWriter#defaultNamespace(java.lang.String)
  *
  * Replace defaultNamespace()
  */
 @Override
 public void setDefaultNamespace(String namespace) throws IOException {
   if ((namespace == null && getDefaultNamespace() != null)
       || (namespace != null && !namespace.equals(getDefaultNamespace())))
     defineNamespace(namespace, "");
 }