Logo Search packages:      
Sourcecode: uimaj version File versions  Download package

void org::apache::uima::cas::impl::XmiCasSerializer::XmiCasDocSerializer::computeNamespaceDeclarationAttrs ( AttributesImpl  workAttrs2 ) [inline, private]
Parameters:
workAttrs2

Definition at line 406 of file XmiCasSerializer.java.

                                                                             {
      Iterator<Map.Entry<String, String>> it = nsUriToPrefixMap.entrySet().iterator();
      while (it.hasNext()) {
        Map.Entry<String, String> entry = it.next();
        String nsUri = entry.getKey();
        String prefix = entry.getValue();
        // write attribute
        workAttrs.addAttribute(XMLNS_NS_URI, prefix, "xmlns:" + prefix, "CDATA", nsUri);
      }
      // also add schemaLocation if specified
      if (nsUriToSchemaLocationMap != null) {
        // write xmlns:xsi attribute
        workAttrs.addAttribute(XMLNS_NS_URI, "xsi", "xmlns:xsi", "CDATA", XSI_NS_URI);

        // write xsi:schemaLocation attributaiton
        StringBuilder buf = new StringBuilder();
        it = nsUriToSchemaLocationMap.entrySet().iterator();
        while (it.hasNext()) {
          Map.Entry<String, String> entry = it.next();
          buf.append(entry.getKey()).append(' ').append(entry.getValue()).append(' ');
        }
        workAttrs.addAttribute(XSI_NS_URI, "xsi", "xsi:schemaLocation", "CDATA", buf.toString());
      }
    }

Generated by  Doxygen 1.6.0   Back to index