当前位置: 首页>>代码示例>>C++>>正文


C++ DocumentType类代码示例

本文整理汇总了C++中DocumentType的典型用法代码示例。如果您正苦于以下问题:C++ DocumentType类的具体用法?C++ DocumentType怎么用?C++ DocumentType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了DocumentType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: runTest

   /*
    * Runs the test case.
    */
   void runTest()
   {
      Document doc;
      DocumentType docType;
      String docTypeName;
      String nodeValue;
      NamedNodeMap attributes;
      doc = (Document) baseT::load("hc_staff", false);
      docType = doc.getDoctype();
      
      if (
    !(("text/html" == baseT::getContentType()))
) {
          baseT::assertNotNull(docType, __LINE__, __FILE__);
      }
    
      if ((baseT::notNull(docType))) {
          docTypeName = docType.getName();
      
      if (("image/svg+xml" == baseT::getContentType())) {
          baseT::assertEquals("svg", docTypeName, __LINE__, __FILE__);
  } else {
          baseT::assertEquals("html", docTypeName, __LINE__, __FILE__);
  }
        
    nodeValue = docType.getNodeValue();
      baseT::assertNull(nodeValue, __LINE__, __FILE__);
      attributes = docType.getAttributes();
      baseT::assertNull(attributes, __LINE__, __FILE__);
      }
    
   }
开发者ID:QuentinFiard,项目名称:arabica,代码行数:35,代码来源:hc_documentgetdoctype.hpp

示例2: DocumentType

Node *
DocumentType::cloneNode(bool deep) const
{
  DocumentType * ret = new DocumentType(*this);
  ret->setOwnerDocument(0);
  return ret;
}
开发者ID:CaptEmulation,项目名称:svgl,代码行数:7,代码来源:DocumentType.cpp

示例3: appendDocumentType

void MarkupAccumulator::appendDocumentType(StringBuilder& result, const DocumentType& n)
{
    if (n.name().isEmpty())
        return;

    result.appendLiteral("<!DOCTYPE ");
    result.append(n.name());
    if (!n.publicId().isEmpty()) {
        result.appendLiteral(" PUBLIC \"");
        result.append(n.publicId());
        result.append('"');
        if (!n.systemId().isEmpty()) {
            result.appendLiteral(" \"");
            result.append(n.systemId());
            result.append('"');
        }
    } else if (!n.systemId().isEmpty()) {
        result.appendLiteral(" SYSTEM \"");
        result.append(n.systemId());
        result.append('"');
    }
    if (!n.internalSubset().isEmpty()) {
        result.appendLiteral(" [");
        result.append(n.internalSubset());
        result.append(']');
    }
    result.append('>');
}
开发者ID:coinpayee,项目名称:blink,代码行数:28,代码来源:MarkupAccumulator.cpp

示例4: jsDocumentTypeInternalSubset

JSValue jsDocumentTypeInternalSubset(ExecState* exec, const Identifier&, const PropertySlot& slot)
{
    JSDocumentType* castedThis = static_cast<JSDocumentType*>(asObject(slot.slotBase()));
    UNUSED_PARAM(exec);
    DocumentType* imp = static_cast<DocumentType*>(castedThis->impl());
    return jsStringOrNull(exec, imp->internalSubset());
}
开发者ID:Mr-Kumar-Abhishek,项目名称:qt,代码行数:7,代码来源:JSDocumentType.cpp

示例5: jsDocumentTypeInternalSubset

JSValue jsDocumentTypeInternalSubset(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSDocumentType* castedThis = static_cast<JSDocumentType*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    DocumentType* imp = static_cast<DocumentType*>(castedThis->impl());
    JSValue result = jsStringOrNull(exec, imp->internalSubset());
    return result;
}
开发者ID:Akheon23,项目名称:chromecast-mirrored-source.vendor,代码行数:8,代码来源:JSDocumentType.cpp

示例6: jsDocumentTypeNotations

JSValue jsDocumentTypeNotations(ExecState* exec, JSValue slotBase, const Identifier&)
{
    JSDocumentType* castedThis = static_cast<JSDocumentType*>(asObject(slotBase));
    UNUSED_PARAM(exec);
    DocumentType* imp = static_cast<DocumentType*>(castedThis->impl());
    JSValue result = toJS(exec, castedThis->globalObject(), WTF::getPtr(imp->notations()));
    return result;
}
开发者ID:youtube,项目名称:h5vcc_hh,代码行数:8,代码来源:JSDocumentType.cpp

示例7: unparsedEntityDecl

void DOMBuilder::unparsedEntityDecl(const XMLString& name, const XMLString* publicId, const XMLString& systemId, const XMLString& notationName)
{
	DocumentType* pDoctype = _pDocument->getDoctype();
	if (pDoctype)
	{
		AutoPtr<Entity> pEntity = _pDocument->createEntity(name, publicId ? *publicId : EMPTY_STRING, systemId, notationName);
		pDoctype->appendChild(pEntity);
	}
}
开发者ID:macchina-io,项目名称:macchina.io,代码行数:9,代码来源:DOMBuilder.cpp

示例8: notationDecl

void DOMBuilder::notationDecl(const XMLString& name, const XMLString* publicId, const XMLString* systemId)
{
	DocumentType* pDoctype = _pDocument->getDoctype();
	if (pDoctype)
	{
		AutoPtr<Notation> pNotation = _pDocument->createNotation(name, (publicId ? *publicId : EMPTY_STRING), (systemId ? *systemId : EMPTY_STRING));
		pDoctype->appendChild(pNotation);
	}
}
开发者ID:macchina-io,项目名称:macchina.io,代码行数:9,代码来源:DOMBuilder.cpp

示例9: runTest

 /*
  * Runs the test case.
  */
 void runTest()
 {
    Document doc;
    DocumentType docType;
    NamedNodeMap attrList;
    doc = (Document) baseT::load("staff", false);
    docType = doc.getDoctype();
    baseT::assertNotNull(docType, __LINE__, __FILE__);
    attrList = docType.getAttributes();
    baseT::assertNull(attrList, __LINE__, __FILE__);
    
 }
开发者ID:QuentinFiard,项目名称:arabica,代码行数:15,代码来源:nodedocumenttypenodevalue.hpp

示例10: runTest

  /*
   * Runs the test case.
   */
  void runTest()
  {
     Document doc;
     DocumentType documentTypeNode;
     int nodeType;
     doc = (Document) baseT::load("staff", false);
     documentTypeNode = doc.getDoctype();
     baseT::assertNotNull(documentTypeNode, __LINE__, __FILE__);
     nodeType = (int) documentTypeNode.getNodeType();
     baseT::assertEquals(10, nodeType, __LINE__, __FILE__);
 
  }
开发者ID:QuentinFiard,项目名称:arabica,代码行数:15,代码来源:nodedocumenttypenodetype.hpp

示例11: getFileTypeAndExtensions

std::string FileTypeAssociationsPreferencesPage::getFileTypeAndExtensions(const DocumentType& type)
{
    std::string result = type.name();
    result.append(" (");
    const std::vector<std::string>& extensions = type.extensions();
    for (size_t i = 0; i < extensions.size(); ++i)
    {
        if (i != 0)
        {
            result.append(";");
        }
        result.append("*.");
        result.append(type.extensions()[i]);
    }
    result.append(")");
    return result;
}
开发者ID:CodeSmithyIDE,项目名称:CodeSmithy,代码行数:17,代码来源:FileTypeAssociationsPreferencesPage.cpp

示例12: runTest

    /*
     * Runs the test case.
     */
    void runTest()
    {
        Document doc;
        DocumentType docType;
        NamedNodeMap notations;
        Node notationNode;
        String notationName;
        doc = (Document) baseT::load("staff", false);
        docType = doc.getDoctype();
        baseT::assertNotNull(docType, __LINE__, __FILE__);
        notations = docType.getNotations();
        baseT::assertNotNull(notations, __LINE__, __FILE__);
        notationNode = notations.getNamedItem(SA::construct_from_utf8("notation1"));
        baseT::skipIfNull(notationNode);
        notationName = notationNode.getNodeName();
        baseT::assertEquals("notation1", notationName, __LINE__, __FILE__);

    }
开发者ID:kthguru,项目名称:arabica,代码行数:21,代码来源:nodenotationnodename.hpp

示例13: LOG

FieldCache::FieldCache(const ResultClass &resClass,
                       const DocumentType &docType) :
    _cache()
{
    LOG(debug, "Creating field cache for summary class '%s'", resClass.GetClassName());
    for (uint32_t i = 0; i < resClass.GetNumEntries(); ++i) {
        const ResConfigEntry *entry = resClass.GetEntry(i);
        const vespalib::string fieldName(entry->_bindname);
        if (docType.hasField(fieldName)) {
            const Field &field = docType.getField(fieldName);
            LOG(debug, "Caching Field instance for field '%s': %s.%u",
                fieldName.c_str(), field.getName().data(), field.getId());
            _cache.push_back(Field::CSP(new Field(field)));
        } else {
            _cache.push_back(Field::CSP());
        }
    }
}
开发者ID:songhtdo,项目名称:vespa,代码行数:18,代码来源:fieldcache.cpp

示例14: runTest

   /*
    * Runs the test case.
    */
   void runTest()
   {
      Document doc;
      DocumentType docType;
      NamedNodeMap notations;
      Notation notationNode;
      String systemId;
      doc = (Document) baseT::load("staff", false);
      docType = doc.getDoctype();
      baseT::assertNotNull(docType, __LINE__, __FILE__);
      notations = docType.getNotations();
      baseT::assertNotNull(notations, __LINE__, __FILE__);
      notationNode = (Notation) notations.getNamedItem(SA::construct_from_utf8("notation2"));
      baseT::skipIfNull(notationNode);
      systemId = notationNode.getSystemId();
      baseT::assertURIEquals("uriEquals", "", "", "", "notation2File", "", "", "", false, systemId);

   }
开发者ID:QuentinFiard,项目名称:arabica,代码行数:21,代码来源:notationgetsystemid.hpp

示例15: runTest

  /*
   * Runs the test case.
   */
  void runTest()
  {
     Document doc;
     DocumentType docType;
     String name;
     doc = (Document) baseT::load("staff", false);
     docType = doc.getDoctype();
     baseT::assertNotNull(docType, __LINE__, __FILE__);
     name = docType.getName();
     
     if (("image/svg+xml" == baseT::getContentType())) {
         baseT::assertEquals("svg", name, __LINE__, __FILE__);
 } else {
         baseT::assertEquals("staff", name, __LINE__, __FILE__);
 }
       
   
  }
开发者ID:QuentinFiard,项目名称:arabica,代码行数:21,代码来源:documenttypegetdoctype.hpp


注:本文中的DocumentType类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。