Method createDocumentFragment


NEEDSDOC (createDocumentFragment) @return
430084
synchronized public DTM createDocumentFragment()
  {

    try
    {
      DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();

      dbf.setNamespaceAware(true);

      DocumentBuilder db = dbf.newDocumentBuilder();
      Document doc = db.newDocument();
      Node df = doc.createDocumentFragment();

      return getDTM(new DOMSource(df), true, null, false, false);
    }
    catch (Exception e)
    {
      throw new DTMException(e);
    }
  }
1205972
Document createDocument(NodeDataIndexing node) throws RepositoryException
   {
      Document aDoc = null;
      if (volatileIndex != null)
      {
         aDoc = volatileIndex.getAggregateIndexes(node.getIdentifier());
      }
      if (aDoc == null)
      {
         aDoc = handler.createDocument(node, nsMappings, version, true, volatileIndex);
      }
      return aDoc;
   }
981007
private NamedOdsDocument createNamedDocument() {
        final OdsElements odsElements = OdsElements
                .create(this.positionUtil, this.xmlUtil, this.writeUtil, this.format,
                        this.libreOfficeMode);
        return NamedOdsDocument.create(this.logger, this.xmlUtil, odsElements);
    }
1017089
public JSDocInfo cloneConstructorDoc() {
    JSDocInfo other = new JSDocInfo();
    other.info = this.info == null ? null : this.info.cloneConstructorDoc();
    other.documentation =
        this.documentation == null ? null : this.documentation.cloneConstructorDoc();
    return other;
  }
66147
public static DomDocument getEmptyDocument(DocumentBuilderFactory documentBuilderFactory) {
    try {
      DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();
      return new DomDocumentImpl(documentBuilder.newDocument());
    } catch (ParserConfigurationException e) {
      throw new ModelParseException("Unable to create a new document", e);
    }
  }
788424
protected DocWorkUnit createWorkUnit(
            final DocumentedFeature documentedFeature,
            final ClassDoc classDoc,
            final Class<?> clazz)
    {
        return new DocWorkUnit(
                new DefaultDocWorkUnitHandler(this),
                documentedFeature,
                classDoc,
                clazz);
    }
891921
public Document serviceToDocument() {
        final AtomService service = this;

        final Document doc = new Document();
        final Element root = new Element("service", ATOM_PROTOCOL);
        doc.setRootElement(root);
        final List<Workspace> spaces = service.getWorkspaces();
        for (final Workspace space : spaces) {
            root.addContent(space.workspaceToElement());
        }
        return doc;
    }
610435
public Task createDocument(Task task) {
        DocumentRevision rev = new DocumentRevision();
        rev.setBody(DocumentBodyFactory.create(task.asMap()));
        try {
            DocumentRevision created = this.mDocumentStore.database().create(rev);
            return Task.fromRevision(created);
        } catch (DocumentException de) {
            return null;
        } catch (DocumentStoreException de) {
            return null;
        }
    }
1119020
def createDocument(self, nsuri, qname, doctype=None):
        """"""
        impl = xml.dom.minidom.getDOMImplementation()
        return impl.createDocument(nsuri, qname, doctype)
1294960
public String getJsDoc() {
        Comment comment = getJsDocNode();
        if (comment != null) {
          return comment.getValue();
        }
        return null;
    }
594564
public ODocument mergeDocument(Map<String, ? extends Object> incomingDocMap)
    {
        String sourceUri = (String) incomingDocMap.get(DocumentAttributes.SOURCE_URI.toString());
        if (null == sourceUri)
            throw new IllegalArgumentException("Document sourceUri is null.");
        String docType = (String) incomingDocMap.get(Crawler.Attributes.TYPE);
        if (null == docType)
            throw new IllegalArgumentException("Document docType is null.");

        // Get a document by sourceUri
        String sql = "SELECT * FROM " + docType + " WHERE sourceuri=?";
        activateOnCurrentThread();
        List<ODocument> results = db.command(new OSQLSynchQuery<ODocument>(sql)).execute(sourceUri);
        if (results.size() == 0)
            throw new JBakeException("No document with sourceUri '"+sourceUri+"'.");

        // Update it from the given map.
        ODocument incomingDoc = new ODocument(docType);
        incomingDoc.fromMap(incomingDocMap);
        ODocument merged = results.get(0).merge(incomingDoc, true, false);
        return merged;
    }
1004526
public static Document createDomDocument() throws Exception
	{
	    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
	    factory.setNamespaceAware(true);
	    DocumentBuilder builder = factory.newDocumentBuilder();

	    return builder.newDocument();
	}
55744
function()
	{
		var doc = null;
		
		if (document.implementation && document.implementation.createDocument)
		{
			doc = document.implementation.createDocument('', '', null);
		}
		else if (window.ActiveXObject)
		{
			doc = new ActiveXObject('Microsoft.XMLDOM');
	 	}
	 	
	 	return doc;
	}
1252201
function createFragment(){
    var result = document.createDocumentFragment();
    var len = arguments.length;
    var array = createFragment.array = [];

    for (var i = 0; i < len; i++)
      array.push(handleInsert(result, arguments[i]));

    return result;
  }
1108490
public static Document newDocument() throws AlipayApiException {
        Document doc = null;

        try {
            doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument();
        } catch (ParserConfigurationException e) {
            throw new AlipayApiException(e);
        }

        return doc;
    }
785751
function createDocs() {
  if(!this.config.path.docs) return;
  try {
    var hasDocFolder = fs.existsSync(Component.appPath(this.config.path.docs)),
      hasTemplate = fs.existsSync(Component.appPath(this.config.docs.template));
    if(!hasDocFolder || !hasTemplate) throw new Error("No docs");
  } catch(e) {
    // No documentation support.
    return;
  }
  var docTwig = fs.readFileSync(Component.appPath(this.config.docs.template), { encoding: 'utf8' }).toString();
  var html = viewEngine.render(docTwig, {
    locals: {
      routes: this.routes
    }
  });
  try {
    fs.writeFileSync(Component.appPath(this.config.path.docs, 'doc.html'), html, { flag: 'w', encoding: 'utf8' });
    log.trace('CruxServer: Documented %s routes in ' + this.config.path.docs, routeCount);
  } catch(e) {}
}
1110832
private boolean goToNextDoc() throws IOException {
    reset();
    if (docId == NO_MORE_DOCS) {
      minPosition = NO_MORE_POSITIONS;
      maxPosition = NO_MORE_POSITIONS;
      return true;
    } else {
      docId = subSpans.nextDoc();
      if (docId == NO_MORE_DOCS) {
        minPosition = NO_MORE_POSITIONS;
        maxPosition = NO_MORE_POSITIONS;
        return true;
      } else {
        IndexDoc doc = mtasCodecInfo.getDoc(field, docId);
        if (doc != null) {
          minPosition = doc.minPosition;
          maxPosition = doc.maxPosition;
        } else {
          minPosition = NO_MORE_POSITIONS;
          maxPosition = NO_MORE_POSITIONS;
        }
        if (goToNextStartPosition()) {
          return true;
        } else {
          return false;
        }
      }
    }
  }