/* * 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__); } }
Node * DocumentType::cloneNode(bool deep) const { DocumentType * ret = new DocumentType(*this); ret->setOwnerDocument(0); return ret; }
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('>'); }
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()); }
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; }
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; }
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); } }
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); } }
/* * 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__); }
/* * 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__); }
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; }
/* * 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__); }
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()); } } }
/* * 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); }
/* * 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__); } }
/* * Runs the test case. */ void runTest() { Document doc; DocumentType docType; NamedNodeMap entities; Node entityNode; String entityName; doc = (Document) baseT::load("staff", false); docType = doc.getDoctype(); baseT::assertNotNull(docType, __LINE__, __FILE__); entities = docType.getEntities(); baseT::assertNotNull(entities, __LINE__, __FILE__); entityNode = entities.getNamedItem(SA::construct_from_utf8("ent1")); baseT::assertNotNull(entityNode, __LINE__, __FILE__); entityName = entityNode.getNodeName(); baseT::assertEquals("ent1", entityName, __LINE__, __FILE__); }
/* * Runs the test case. */ void runTest() { Document doc; DocumentType docType; NamedNodeMap notations; Notation notationNode; String publicId; 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); publicId = notationNode.getPublicId(); baseT::assertNull(publicId, __LINE__, __FILE__); }
/* * Runs the test case. */ void runTest() { Document doc; DocumentType docType; NamedNodeMap notationList; Node notation; int notationType; doc = (Document) baseT::load("staff", false); docType = doc.getDoctype(); baseT::assertNotNull(docType, __LINE__, __FILE__); notationList = docType.getNotations(); baseT::assertNotNull(notationList, __LINE__, __FILE__); for (unsigned int indexN65609 = 0; indexN65609 != notationList.getLength(); indexN65609++) { notation = (Node) notationList.item(indexN65609); notationType = (int) notation.getNodeType(); baseT::assertEquals(12, notationType, __LINE__, __FILE__); } }
/* * Runs the test case. */ void runTest() { Document doc; DocumentType docType; NamedNodeMap entities; Node entityNode; String entityValue; doc = (Document) baseT::load("staff", true); docType = doc.getDoctype(); baseT::assertNotNull(docType, __LINE__, __FILE__); entities = docType.getEntities(); baseT::assertNotNull(entities, __LINE__, __FILE__); entityNode = entities.getNamedItem(SA::construct_from_utf8("ent1")); baseT::assertNotNull(entityNode, __LINE__, __FILE__); entityNode.setNodeValue(SA::construct_from_utf8("This should have no effect")); entityValue = entityNode.getNodeValue(); baseT::assertNull(entityValue, __LINE__, __FILE__); }
void ParseTest() { typedef GenericDocument<UTF8<>, Allocator, StackAllocator> DocumentType; typedef typename DocumentType::ValueType ValueType; DocumentType doc; doc.Parse(" { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3, 4] } "); EXPECT_TRUE(doc.IsObject()); EXPECT_TRUE(doc.HasMember("hello")); const ValueType& hello = doc["hello"]; EXPECT_TRUE(hello.IsString()); EXPECT_STREQ("world", hello.GetString()); EXPECT_TRUE(doc.HasMember("t")); const ValueType& t = doc["t"]; EXPECT_TRUE(t.IsTrue()); EXPECT_TRUE(doc.HasMember("f")); const ValueType& f = doc["f"]; EXPECT_TRUE(f.IsFalse()); EXPECT_TRUE(doc.HasMember("n")); const ValueType& n = doc["n"]; EXPECT_TRUE(n.IsNull()); EXPECT_TRUE(doc.HasMember("i")); const ValueType& i = doc["i"]; EXPECT_TRUE(i.IsNumber()); EXPECT_EQ(123, i.GetInt()); EXPECT_TRUE(doc.HasMember("pi")); const ValueType& pi = doc["pi"]; EXPECT_TRUE(pi.IsNumber()); EXPECT_EQ(3.1416, pi.GetDouble()); EXPECT_TRUE(doc.HasMember("a")); const ValueType& a = doc["a"]; EXPECT_TRUE(a.IsArray()); EXPECT_EQ(4u, a.Size()); for (SizeType i = 0; i < 4; i++) EXPECT_EQ(i + 1, a[i].GetUint()); }
void ParseTest() { typedef GenericDocument<UTF8<>, Allocator, StackAllocator> DocumentType; DocumentType doc; const char* json = " { \"hello\" : \"world\", \"t\" : true , \"f\" : false, \"n\": null, \"i\":123, \"pi\": 3.1416, \"a\":[1, 2, 3, 4] } "; doc.Parse(json); ParseCheck(doc); doc.SetNull(); StringStream s(json); doc.template ParseStream<0>(s); ParseCheck(doc); doc.SetNull(); char *buffer = strdup(json); doc.ParseInsitu(buffer); ParseCheck(doc); free(buffer); }
void HTMLDocument::determineParseMode() { // FIXME: It's terrible that this code runs separately and isn't just built in to the // HTML tokenizer/parser. // This code more or less mimics Mozilla's implementation (specifically the // doctype parsing implemented by David Baron in Mozilla's nsParser.cpp). // // There are three possible parse modes: // COMPAT - quirks mode emulates WinIE and NS4. CSS parsing is also relaxed in this mode, e.g., unit types can // be omitted from numbers. // ALMOST STRICT - This mode is identical to strict mode except for its treatment of line-height in the inline box model. For // now (until the inline box model is re-written), this mode is identical to STANDARDS mode. // STRICT - no quirks apply. Web pages will obey the specifications to the letter. bool wasInCompatMode = inCompatMode(); DocumentType* docType = doctype(); if (!docType || !equalIgnoringCase(docType->name(), "html")) // No doctype found at all or the doctype is not HTML. Default to quirks mode and Html4. setParseMode(Compat); else if (!doctype()->systemId().isEmpty() && equalIgnoringCase(docType->systemId(), "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd")) // Assume quirks mode for this particular system ID. In the HTML5 spec, this is the only // system identifier that is examined. setParseMode(Compat); else if (docType->publicId().isEmpty()) // A doctype without a public ID means use strict mode. setParseMode(Strict); else { // We have to check a list of public IDs to see what we // should do. String lowerPubID = docType->publicId().lower(); CString pubIDStr = lowerPubID.latin1(); // Look up the entry in our gperf-generated table. const PubIDInfo* doctypeEntry = findDoctypeEntry(pubIDStr.data(), pubIDStr.length()); if (!doctypeEntry) // The DOCTYPE is not in the list. Assume strict mode. setParseMode(Strict); else { switch (docType->systemId().isEmpty() ? doctypeEntry->mode_if_no_sysid : doctypeEntry->mode_if_sysid) { case PubIDInfo::eQuirks3: case PubIDInfo::eQuirks: setParseMode(Compat); break; case PubIDInfo::eAlmostStandards: setParseMode(AlmostStrict); break; default: ASSERT(false); } } } if (inCompatMode() != wasInCompatMode) { clearPageUserSheet(); clearPageGroupUserSheets(); updateStyleSelector(); } }
/* * Runs the test case. */ void runTest() { Document doc; DocumentType docType; NamedNodeMap entityList; Node entity; doc = (Document) baseT::load("staff", false); docType = doc.getDoctype(); baseT::assertNotNull(docType, __LINE__, __FILE__); entityList = docType.getEntities(); baseT::assertNotNull(entityList, __LINE__, __FILE__); entity = entityList.getNamedItem(SA::construct_from_utf8("ent5")); baseT::skipIfNull(entity); if (("image/svg+xml" == baseT::getContentType())) { baseT::assertSize(7, entityList, __LINE__, __FILE__); } else { baseT::assertSize(5, entityList, __LINE__, __FILE__); } }
/* * Runs the test case. */ void runTest() { Document doc; NodeList addressList; Node testAddress; NamedNodeMap attributes; DocumentType docType; NamedNodeMap notations; Notation 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 = (Notation) notations.getNamedItem(SA::construct_from_utf8("notation1")); baseT::skipIfNull(notationNode); addressList = doc.getElementsByTagName(SA::construct_from_utf8("address")); testAddress = addressList.item(0); attributes = testAddress.getAttributes(); baseT::assertSize(2, attributes, __LINE__, __FILE__); }
void ParseCheck(DocumentType& doc) { typedef typename DocumentType::ValueType ValueType; EXPECT_FALSE(doc.HasParseError()); EXPECT_TRUE(static_cast<ParseResult>(doc)); EXPECT_TRUE(doc.IsObject()); EXPECT_TRUE(doc.HasMember("hello")); const ValueType& hello = doc["hello"]; EXPECT_TRUE(hello.IsString()); EXPECT_STREQ("world", hello.GetString()); EXPECT_TRUE(doc.HasMember("t")); const ValueType& t = doc["t"]; EXPECT_TRUE(t.IsTrue()); EXPECT_TRUE(doc.HasMember("f")); const ValueType& f = doc["f"]; EXPECT_TRUE(f.IsFalse()); EXPECT_TRUE(doc.HasMember("n")); const ValueType& n = doc["n"]; EXPECT_TRUE(n.IsNull()); EXPECT_TRUE(doc.HasMember("i")); const ValueType& i = doc["i"]; EXPECT_TRUE(i.IsNumber()); EXPECT_EQ(123, i.GetInt()); EXPECT_TRUE(doc.HasMember("pi")); const ValueType& pi = doc["pi"]; EXPECT_TRUE(pi.IsNumber()); EXPECT_DOUBLE_EQ(3.1416, pi.GetDouble()); EXPECT_TRUE(doc.HasMember("a")); const ValueType& a = doc["a"]; EXPECT_TRUE(a.IsArray()); EXPECT_EQ(4u, a.Size()); for (SizeType j = 0; j < 4; j++) EXPECT_EQ(j + 1, a[j].GetUint()); }
/* * Runs the test case. */ void runTest() { Document doc; DocumentType docType; NamedNodeMap entityList; Entity entityNode; String publicId; String systemId; String notation; doc = (Document) baseT::load("staff", false); docType = doc.getDoctype(); baseT::assertNotNull(docType, __LINE__, __FILE__); entityList = docType.getEntities(); baseT::assertNotNull(entityList, __LINE__, __FILE__); entityNode = (Entity) entityList.getNamedItem(SA::construct_from_utf8("ent5")); baseT::skipIfNull(entityNode); publicId = entityNode.getPublicId(); baseT::assertEquals("entityURI", publicId, __LINE__, __FILE__); systemId = entityNode.getSystemId(); baseT::assertURIEquals("systemId", "", "", "", "entityFile", "", "", "", false, systemId); notation = entityNode.getNotationName(); baseT::assertEquals("notation1", notation, __LINE__, __FILE__); }
ReferenceDataType::ReferenceDataType(const DocumentType& targetDocType, int id) : DataType(vespalib::make_string("Reference<%s>", targetDocType.getName().c_str()), id), _targetDocType(targetDocType) { }
void HTMLDocument::setCompatibilityModeFromDoctype() { // There are three possible compatibility modes: // Quirks - quirks mode emulates WinIE and NS4. CSS parsing is also relaxed in this mode, e.g., unit types can // be omitted from numbers. // Limited Quirks - This mode is identical to no-quirks mode except for its treatment of line-height in the inline box model. // No Quirks - no quirks apply. Web pages will obey the specifications to the letter. DocumentType* docType = doctype(); if (!docType) return; // Check for Quirks Mode. const String& publicId = docType->publicId(); if (docType->name() != "html" || publicId.startsWith("+//Silmaril//dtd html Pro v0r11 19970101//", false) || publicId.startsWith("-//AdvaSoft Ltd//DTD HTML 3.0 asWedit + extensions//", false) || publicId.startsWith("-//AS//DTD HTML 3.0 asWedit + extensions//", false) || publicId.startsWith("-//IETF//DTD HTML 2.0 Level 1//", false) || publicId.startsWith("-//IETF//DTD HTML 2.0 Level 2//", false) || publicId.startsWith("-//IETF//DTD HTML 2.0 Strict Level 1//", false) || publicId.startsWith("-//IETF//DTD HTML 2.0 Strict Level 2//", false) || publicId.startsWith("-//IETF//DTD HTML 2.0 Strict//", false) || publicId.startsWith("-//IETF//DTD HTML 2.0//", false) || publicId.startsWith("-//IETF//DTD HTML 2.1E//", false) || publicId.startsWith("-//IETF//DTD HTML 3.0//", false) || publicId.startsWith("-//IETF//DTD HTML 3.2 Final//", false) || publicId.startsWith("-//IETF//DTD HTML 3.2//", false) || publicId.startsWith("-//IETF//DTD HTML 3//", false) || publicId.startsWith("-//IETF//DTD HTML Level 0//", false) || publicId.startsWith("-//IETF//DTD HTML Level 1//", false) || publicId.startsWith("-//IETF//DTD HTML Level 2//", false) || publicId.startsWith("-//IETF//DTD HTML Level 3//", false) || publicId.startsWith("-//IETF//DTD HTML Strict Level 0//", false) || publicId.startsWith("-//IETF//DTD HTML Strict Level 1//", false) || publicId.startsWith("-//IETF//DTD HTML Strict Level 2//", false) || publicId.startsWith("-//IETF//DTD HTML Strict Level 3//", false) || publicId.startsWith("-//IETF//DTD HTML Strict//", false) || publicId.startsWith("-//IETF//DTD HTML//", false) || publicId.startsWith("-//Metrius//DTD Metrius Presentational//", false) || publicId.startsWith("-//Microsoft//DTD Internet Explorer 2.0 HTML Strict//", false) || publicId.startsWith("-//Microsoft//DTD Internet Explorer 2.0 HTML//", false) || publicId.startsWith("-//Microsoft//DTD Internet Explorer 2.0 Tables//", false) || publicId.startsWith("-//Microsoft//DTD Internet Explorer 3.0 HTML Strict//", false) || publicId.startsWith("-//Microsoft//DTD Internet Explorer 3.0 HTML//", false) || publicId.startsWith("-//Microsoft//DTD Internet Explorer 3.0 Tables//", false) || publicId.startsWith("-//Netscape Comm. Corp.//DTD HTML//", false) || publicId.startsWith("-//Netscape Comm. Corp.//DTD Strict HTML//", false) || publicId.startsWith("-//O'Reilly and Associates//DTD HTML 2.0//", false) || publicId.startsWith("-//O'Reilly and Associates//DTD HTML Extended 1.0//", false) || publicId.startsWith("-//O'Reilly and Associates//DTD HTML Extended Relaxed 1.0//", false) || publicId.startsWith("-//SoftQuad Software//DTD HoTMetaL PRO 6.0::19990601::extensions to HTML 4.0//", false) || publicId.startsWith("-//SoftQuad//DTD HoTMetaL PRO 4.0::19971010::extensions to HTML 4.0//", false) || publicId.startsWith("-//Spyglass//DTD HTML 2.0 Extended//", false) || publicId.startsWith("-//SQ//DTD HTML 2.0 HoTMetaL + extensions//", false) || publicId.startsWith("-//Sun Microsystems Corp.//DTD HotJava HTML//", false) || publicId.startsWith("-//Sun Microsystems Corp.//DTD HotJava Strict HTML//", false) || publicId.startsWith("-//W3C//DTD HTML 3 1995-03-24//", false) || publicId.startsWith("-//W3C//DTD HTML 3.2 Draft//", false) || publicId.startsWith("-//W3C//DTD HTML 3.2 Final//", false) || publicId.startsWith("-//W3C//DTD HTML 3.2//", false) || publicId.startsWith("-//W3C//DTD HTML 3.2S Draft//", false) || publicId.startsWith("-//W3C//DTD HTML 4.0 Frameset//", false) || publicId.startsWith("-//W3C//DTD HTML 4.0 Transitional//", false) || publicId.startsWith("-//W3C//DTD HTML Experimental 19960712//", false) || publicId.startsWith("-//W3C//DTD HTML Experimental 970421//", false) || publicId.startsWith("-//W3C//DTD W3 HTML//", false) || publicId.startsWith("-//W3O//DTD W3 HTML 3.0//", false) || equalIgnoringCase(publicId, "-//W3O//DTD W3 HTML Strict 3.0//EN//") || publicId.startsWith("-//WebTechs//DTD Mozilla HTML 2.0//", false) || publicId.startsWith("-//WebTechs//DTD Mozilla HTML//", false) || equalIgnoringCase(publicId, "-/W3C/DTD HTML 4.0 Transitional/EN") || equalIgnoringCase(publicId, "HTML") || equalIgnoringCase(docType->systemId(), "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd") || (docType->systemId().isEmpty() && publicId.startsWith("-//W3C//DTD HTML 4.01 Frameset//", false)) || (docType->systemId().isEmpty() && publicId.startsWith("-//W3C//DTD HTML 4.01 Transitional//", false))) { setCompatibilityMode(QuirksMode); return; } // Check for Limited Quirks Mode. if (publicId.startsWith("-//W3C//DTD XHTML 1.0 Frameset//", false) || publicId.startsWith("-//W3C//DTD XHTML 1.0 Transitional//", false) || (!docType->systemId().isEmpty() && publicId.startsWith("-//W3C//DTD HTML 4.01 Frameset//", false)) || (!docType->systemId().isEmpty() && publicId.startsWith("-//W3C//DTD HTML 4.01 Transitional//", false))) { setCompatibilityMode(LimitedQuirksMode); return; } // Otherwise we are No Quirks Mode. setCompatibilityMode(NoQuirksMode); return; }
void FieldValueNode::initFieldPath(const DocumentType& type) const { if (_fieldPath.empty()) { type.buildFieldPath(_fieldPath, _fieldExpression); } }
JSValue* JSDocumentType::getValueProperty(ExecState* exec, int token) const { switch (token) { case NameAttrNum: { DocumentType* imp = static_cast<DocumentType*>(impl()); return jsString(exec, imp->name()); } case EntitiesAttrNum: { DocumentType* imp = static_cast<DocumentType*>(impl()); return toJS(exec, WTF::getPtr(imp->entities())); } case NotationsAttrNum: { DocumentType* imp = static_cast<DocumentType*>(impl()); return toJS(exec, WTF::getPtr(imp->notations())); } case PublicIdAttrNum: { DocumentType* imp = static_cast<DocumentType*>(impl()); return jsStringOrNull(exec, imp->publicId()); } case SystemIdAttrNum: { DocumentType* imp = static_cast<DocumentType*>(impl()); return jsStringOrNull(exec, imp->systemId()); } case InternalSubsetAttrNum: { DocumentType* imp = static_cast<DocumentType*>(impl()); return jsStringOrNull(exec, imp->internalSubset()); } case ConstructorAttrNum: return getConstructor(exec); } return 0; }