Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

auto generating the IDL interface

  • Loading branch information...
commit 08450f39a278d964197cb08236ef8f0a61322812 1 parent 5a83776
@tenderlove tenderlove authored
View
3  .gitignore
@@ -1,2 +1,3 @@
.*.swp
-*.tmproj
+*.tmproj
+lib/generated_interface.rb
View
17 Rakefile
@@ -3,11 +3,24 @@
require 'rubygems'
require 'hoe'
-$LOAD_PATH << File.expand_path(File.join(File.dirname(__FILE__), 'lib'))
-require 'nokogiri'
+LIB_DIR = File.expand_path(File.join(File.dirname(__FILE__), 'lib'))
+GENERATED_INTERFACE = File.join(LIB_DIR, 'nokogiri', 'generated_interface.rb')
+
+$LOAD_PATH << LIB_DIR
+
+require 'nokogiri/version'
Hoe.new('nokogiri', Nokogiri::VERSION) do |p|
p.developer('Aaron Patterson', 'aaronp@rubyforge.org')
+ p.clean_globs = [GENERATED_INTERFACE]
+end
+
+file GENERATED_INTERFACE => 'idl/dom.idl' do |t|
+ sh "omfg --prefix W3C::Org -o #{t.name} #{t.prerequisites.first}"
end
+Rake::Task[:test].prerequisites << GENERATED_INTERFACE
+Rake::Task[:check_manifest].prerequisites << GENERATED_INTERFACE
+
+
# vim: syntax=Ruby
View
100 idl/COPYRIGHT.html
@@ -0,0 +1,100 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
+ "http://www.w3.org/TR/REC-html40/loose.dtd">
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+ <title>W3C IPR SOFTWARE NOTICE</title>
+ </head>
+ <body bgcolor="#FFFFFF" text="#000000">
+ <h1>
+ W3C IPR SOFTWARE NOTICE
+ </h1>
+ <h3>
+ Copyright &copy; 2000 <loc href="http://www.w3.org/">World Wide Web
+ Consortium</loc>, (<loc href="http://www.lcs.mit.edu/">Massachusetts
+ Institute of Technology</loc>, <loc href="http://www.inria.fr/">Institut
+ National de Recherche en Informatique et en Automatique</loc>, <loc
+ href="http://www.keio.ac.jp/">Keio University</loc>). All Rights
+ Reserved.
+ </h3>
+ <p>
+ The DOM bindings are published under the W3C Software Copyright Notice
+ and License. The software license requires "Notice of any changes or
+ modifications to the W3C files, including the date changes were made."
+ Consequently, modified versions of the DOM bindings must document that
+ they do not conform to the W3C standard; in the case of the IDL binding,
+ the pragma prefix can no longer be 'w3c.org'; in the case of the Java
+ binding, the package names can no longer be in the 'org.w3c' package.
+ </p>
+ <p>
+ <b>Note:</b> The original version of the W3C Software Copyright Notice
+ and License could be found at <a
+ href='http://www.w3.org/Consortium/Legal/copyright-software-19980720'>http://www.w3.org/Consortium/Legal/copyright-software-19980720</a>
+ </p>
+ <h3>
+ Copyright &copy; 1994-2000 <a href="http://www.w3.org/">World Wide Web
+ Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
+ Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
+ National de Recherche en Informatique et en Automatique</a>, <a
+ href="http://www.keio.ac.jp/">Keio University</a>). All Rights
+ Reserved. http://www.w3.org/Consortium/Legal/
+ </h3>
+ <p>
+ This W3C work (including software, documents, or other related items) is
+ being provided by the copyright holders under the following license. By
+ obtaining, using and/or copying this work, you (the licensee) agree that
+ you have read, understood, and will comply with the following terms and
+ conditions:
+ </p>
+ <p>
+ Permission to use, copy, and modify this software and its documentation,
+ with or without modification,&nbsp; for any purpose and without fee or
+ royalty is hereby granted, provided that you include the following on ALL
+ copies of the software and documentation or portions thereof, including
+ modifications, that you make:
+ </p>
+ <ol>
+ <li>
+ The full text of this NOTICE in a location viewable to users of the
+ redistributed or derivative work.
+ </li>
+ <li>
+ Any pre-existing intellectual property disclaimers, notices, or terms
+ and conditions. If none exist, a short notice of the following form
+ (hypertext is preferred, text is permitted) should be used within the
+ body of any redistributed or derivative code: "Copyright &copy;
+ [$date-of-software] <a href="http://www.w3.org/">World Wide Web
+ Consortium</a>, (<a href="http://www.lcs.mit.edu/">Massachusetts
+ Institute of Technology</a>, <a href="http://www.inria.fr/">Institut
+ National de Recherche en Informatique et en Automatique</a>, <a
+ href="http://www.keio.ac.jp/">Keio University</a>). All Rights
+ Reserved. http://www.w3.org/Consortium/Legal/"
+ </li>
+ <li>
+ Notice of any changes or modifications to the W3C files, including the
+ date changes were made. (We recommend you provide URIs to the location
+ from which the code is derived.)
+ </li>
+ </ol>
+ <p>
+ THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT
+ HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
+ INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS
+ FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR
+ DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
+ TRADEMARKS OR OTHER RIGHTS.
+ </p>
+ <p>
+ COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
+ CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
+ DOCUMENTATION.
+ </p>
+ <p>
+ The name and trademarks of copyright holders may NOT be used in
+ advertising or publicity pertaining to the software without specific,
+ written prior permission. Title to copyright in this software and any
+ associated documentation will at all times remain with copyright
+ holders.
+ </p>
+ </body>
+</html>
View
320 idl/dom.idl
@@ -0,0 +1,320 @@
+/*
+ * Copyright (c) 2000 World Wide Web Consortium,
+ * (Massachusetts Institute of Technology, Institut National de
+ * Recherche en Informatique et en Automatique, Keio University). All
+ * Rights Reserved. This program is distributed under the W3C's Software
+ * Intellectual Property License. This program is distributed in the
+ * hope that it will be useful, but WITHOUT ANY WARRANTY; without even
+ * the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ * PURPOSE.
+ * See W3C License http://www.w3.org/Consortium/Legal/ for more details.
+ */
+
+// File: http://www.w3.org/TR/2000/REC-DOM-Level-2-Core-20001113/dom.idl
+
+#ifndef _DOM_IDL_
+#define _DOM_IDL_
+
+#pragma prefix "w3c.org"
+module dom
+{
+
+ valuetype DOMString sequence<unsigned short>;
+
+ typedef unsigned long long DOMTimeStamp;
+
+ interface DocumentType;
+ interface Document;
+ interface NodeList;
+ interface NamedNodeMap;
+ interface Element;
+
+ exception DOMException {
+ unsigned short code;
+ };
+ // ExceptionCode
+ const unsigned short INDEX_SIZE_ERR = 1;
+ const unsigned short DOMSTRING_SIZE_ERR = 2;
+ const unsigned short HIERARCHY_REQUEST_ERR = 3;
+ const unsigned short WRONG_DOCUMENT_ERR = 4;
+ const unsigned short INVALID_CHARACTER_ERR = 5;
+ const unsigned short NO_DATA_ALLOWED_ERR = 6;
+ const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7;
+ const unsigned short NOT_FOUND_ERR = 8;
+ const unsigned short NOT_SUPPORTED_ERR = 9;
+ const unsigned short INUSE_ATTRIBUTE_ERR = 10;
+ // Introduced in DOM Level 2:
+ const unsigned short INVALID_STATE_ERR = 11;
+ // Introduced in DOM Level 2:
+ const unsigned short SYNTAX_ERR = 12;
+ // Introduced in DOM Level 2:
+ const unsigned short INVALID_MODIFICATION_ERR = 13;
+ // Introduced in DOM Level 2:
+ const unsigned short NAMESPACE_ERR = 14;
+ // Introduced in DOM Level 2:
+ const unsigned short INVALID_ACCESS_ERR = 15;
+
+
+ interface DOMImplementation {
+ boolean hasFeature(in DOMString feature,
+ in DOMString version);
+ // Introduced in DOM Level 2:
+ DocumentType createDocumentType(in DOMString qualifiedName,
+ in DOMString publicId,
+ in DOMString systemId)
+ raises(DOMException);
+ // Introduced in DOM Level 2:
+ Document createDocument(in DOMString namespaceURI,
+ in DOMString qualifiedName,
+ in DocumentType doctype)
+ raises(DOMException);
+ };
+
+ interface Node {
+
+ // NodeType
+ const unsigned short ELEMENT_NODE = 1;
+ const unsigned short ATTRIBUTE_NODE = 2;
+ const unsigned short TEXT_NODE = 3;
+ const unsigned short CDATA_SECTION_NODE = 4;
+ const unsigned short ENTITY_REFERENCE_NODE = 5;
+ const unsigned short ENTITY_NODE = 6;
+ const unsigned short PROCESSING_INSTRUCTION_NODE = 7;
+ const unsigned short COMMENT_NODE = 8;
+ const unsigned short DOCUMENT_NODE = 9;
+ const unsigned short DOCUMENT_TYPE_NODE = 10;
+ const unsigned short DOCUMENT_FRAGMENT_NODE = 11;
+ const unsigned short NOTATION_NODE = 12;
+
+ readonly attribute DOMString nodeName;
+ attribute DOMString nodeValue;
+ // raises(DOMException) on setting
+ // raises(DOMException) on retrieval
+
+ readonly attribute unsigned short nodeType;
+ readonly attribute Node parentNode;
+ readonly attribute NodeList childNodes;
+ readonly attribute Node firstChild;
+ readonly attribute Node lastChild;
+ readonly attribute Node previousSibling;
+ readonly attribute Node nextSibling;
+ readonly attribute NamedNodeMap attributes;
+ // Modified in DOM Level 2:
+ readonly attribute Document ownerDocument;
+ Node insertBefore(in Node newChild,
+ in Node refChild)
+ raises(DOMException);
+ Node replaceChild(in Node newChild,
+ in Node oldChild)
+ raises(DOMException);
+ Node removeChild(in Node oldChild)
+ raises(DOMException);
+ Node appendChild(in Node newChild)
+ raises(DOMException);
+ boolean hasChildNodes();
+ Node cloneNode(in boolean deep);
+ // Modified in DOM Level 2:
+ void normalize();
+ // Introduced in DOM Level 2:
+ boolean isSupported(in DOMString feature,
+ in DOMString version);
+ // Introduced in DOM Level 2:
+ readonly attribute DOMString namespaceURI;
+ // Introduced in DOM Level 2:
+ attribute DOMString prefix;
+ // raises(DOMException) on setting
+
+ // Introduced in DOM Level 2:
+ readonly attribute DOMString localName;
+ // Introduced in DOM Level 2:
+ boolean hasAttributes();
+ };
+
+ interface NodeList {
+ Node item(in unsigned long index);
+ readonly attribute unsigned long length;
+ };
+
+ interface NamedNodeMap {
+ Node getNamedItem(in DOMString name);
+ Node setNamedItem(in Node arg)
+ raises(DOMException);
+ Node removeNamedItem(in DOMString name)
+ raises(DOMException);
+ Node item(in unsigned long index);
+ readonly attribute unsigned long length;
+ // Introduced in DOM Level 2:
+ Node getNamedItemNS(in DOMString namespaceURI,
+ in DOMString localName);
+ // Introduced in DOM Level 2:
+ Node setNamedItemNS(in Node arg)
+ raises(DOMException);
+ // Introduced in DOM Level 2:
+ Node removeNamedItemNS(in DOMString namespaceURI,
+ in DOMString localName)
+ raises(DOMException);
+ };
+
+ interface CharacterData : Node {
+ attribute DOMString data;
+ // raises(DOMException) on setting
+ // raises(DOMException) on retrieval
+
+ readonly attribute unsigned long length;
+ DOMString substringData(in unsigned long offset,
+ in unsigned long count)
+ raises(DOMException);
+ void appendData(in DOMString arg)
+ raises(DOMException);
+ void insertData(in unsigned long offset,
+ in DOMString arg)
+ raises(DOMException);
+ void deleteData(in unsigned long offset,
+ in unsigned long count)
+ raises(DOMException);
+ void replaceData(in unsigned long offset,
+ in unsigned long count,
+ in DOMString arg)
+ raises(DOMException);
+ };
+
+ interface Attr : Node {
+ readonly attribute DOMString name;
+ readonly attribute boolean specified;
+ attribute DOMString value;
+ // raises(DOMException) on setting
+
+ // Introduced in DOM Level 2:
+ readonly attribute Element ownerElement;
+ };
+
+ interface Element : Node {
+ readonly attribute DOMString tagName;
+ DOMString getAttribute(in DOMString name);
+ void setAttribute(in DOMString name,
+ in DOMString value)
+ raises(DOMException);
+ void removeAttribute(in DOMString name)
+ raises(DOMException);
+ Attr getAttributeNode(in DOMString name);
+ Attr setAttributeNode(in Attr newAttr)
+ raises(DOMException);
+ Attr removeAttributeNode(in Attr oldAttr)
+ raises(DOMException);
+ NodeList getElementsByTagName(in DOMString name);
+ // Introduced in DOM Level 2:
+ DOMString getAttributeNS(in DOMString namespaceURI,
+ in DOMString localName);
+ // Introduced in DOM Level 2:
+ void setAttributeNS(in DOMString namespaceURI,
+ in DOMString qualifiedName,
+ in DOMString value)
+ raises(DOMException);
+ // Introduced in DOM Level 2:
+ void removeAttributeNS(in DOMString namespaceURI,
+ in DOMString localName)
+ raises(DOMException);
+ // Introduced in DOM Level 2:
+ Attr getAttributeNodeNS(in DOMString namespaceURI,
+ in DOMString localName);
+ // Introduced in DOM Level 2:
+ Attr setAttributeNodeNS(in Attr newAttr)
+ raises(DOMException);
+ // Introduced in DOM Level 2:
+ NodeList getElementsByTagNameNS(in DOMString namespaceURI,
+ in DOMString localName);
+ // Introduced in DOM Level 2:
+ boolean hasAttribute(in DOMString name);
+ // Introduced in DOM Level 2:
+ boolean hasAttributeNS(in DOMString namespaceURI,
+ in DOMString localName);
+ };
+
+ interface Text : CharacterData {
+ Text splitText(in unsigned long offset)
+ raises(DOMException);
+ };
+
+ interface Comment : CharacterData {
+ };
+
+ interface CDATASection : Text {
+ };
+
+ interface DocumentType : Node {
+ readonly attribute DOMString name;
+ readonly attribute NamedNodeMap entities;
+ readonly attribute NamedNodeMap notations;
+ // Introduced in DOM Level 2:
+ readonly attribute DOMString publicId;
+ // Introduced in DOM Level 2:
+ readonly attribute DOMString systemId;
+ // Introduced in DOM Level 2:
+ readonly attribute DOMString internalSubset;
+ };
+
+ interface Notation : Node {
+ readonly attribute DOMString publicId;
+ readonly attribute DOMString systemId;
+ };
+
+ interface Entity : Node {
+ readonly attribute DOMString publicId;
+ readonly attribute DOMString systemId;
+ readonly attribute DOMString notationName;
+ };
+
+ interface EntityReference : Node {
+ };
+
+ interface ProcessingInstruction : Node {
+ readonly attribute DOMString target;
+ attribute DOMString data;
+ // raises(DOMException) on setting
+
+ };
+
+ interface DocumentFragment : Node {
+ };
+
+ interface Document : Node {
+ readonly attribute DocumentType doctype;
+ readonly attribute DOMImplementation implementation;
+ readonly attribute Element documentElement;
+ Element createElement(in DOMString tagName)
+ raises(DOMException);
+ DocumentFragment createDocumentFragment();
+ Text createTextNode(in DOMString data);
+ Comment createComment(in DOMString data);
+ CDATASection createCDATASection(in DOMString data)
+ raises(DOMException);
+ ProcessingInstruction createProcessingInstruction(in DOMString target,
+ in DOMString data)
+ raises(DOMException);
+ Attr createAttribute(in DOMString name)
+ raises(DOMException);
+ EntityReference createEntityReference(in DOMString name)
+ raises(DOMException);
+ NodeList getElementsByTagName(in DOMString tagname);
+ // Introduced in DOM Level 2:
+ Node importNode(in Node importedNode,
+ in boolean deep)
+ raises(DOMException);
+ // Introduced in DOM Level 2:
+ Element createElementNS(in DOMString namespaceURI,
+ in DOMString qualifiedName)
+ raises(DOMException);
+ // Introduced in DOM Level 2:
+ Attr createAttributeNS(in DOMString namespaceURI,
+ in DOMString qualifiedName)
+ raises(DOMException);
+ // Introduced in DOM Level 2:
+ NodeList getElementsByTagNameNS(in DOMString namespaceURI,
+ in DOMString localName);
+ // Introduced in DOM Level 2:
+ Element getElementById(in DOMString elementId);
+ };
+};
+
+#endif // _DOM_IDL_
+
View
3  lib/nokogiri.rb
@@ -1,3 +1,5 @@
+require 'nokogiri/version'
+require 'nokogiri/generated_interface'
require 'nokogiri_lib'
require 'nokogiri/node'
require 'nokogiri/node_set'
@@ -6,7 +8,6 @@
require 'nokogiri/html'
module Nokogiri
- VERSION = '1.0.0'
class << self
def parse(string, url = nil, encoding = nil, options = 32)
View
301 lib/nokogiri/generated_interface.rb
@@ -0,0 +1,301 @@
+#
+# DO NOT MODIFY!!!!
+# This file is automatically generated by zomg 1.0.1
+# from IDL file "idl/dom.idl".
+#
+
+module W3C
+module Org
+module Dom
+ # do nothing
+ # do nothing
+ # do nothing
+ # do nothing
+ # do nothing
+ # do nothing
+ # do nothing
+ class DOMException < Exception
+ attr_accessor(:code)
+ end
+ INDEX_SIZE_ERR = 1
+ DOMSTRING_SIZE_ERR = 2
+ HIERARCHY_REQUEST_ERR = 3
+ WRONG_DOCUMENT_ERR = 4
+ INVALID_CHARACTER_ERR = 5
+ NO_DATA_ALLOWED_ERR = 6
+ NO_MODIFICATION_ALLOWED_ERR = 7
+ NOT_FOUND_ERR = 8
+ NOT_SUPPORTED_ERR = 9
+ INUSE_ATTRIBUTE_ERR = 10
+ INVALID_STATE_ERR = 11
+ SYNTAX_ERR = 12
+ INVALID_MODIFICATION_ERR = 13
+ NAMESPACE_ERR = 14
+ INVALID_ACCESS_ERR = 15
+ module DOMImplementation
+ def hasFeature(feature, version)
+ raise(NotImplementedError.new)
+ end
+ def createDocumentType(qualifiedName, publicId, systemId)
+ raise(NotImplementedError.new)
+ end
+ def createDocument(namespaceURI, qualifiedName, doctype)
+ raise(NotImplementedError.new)
+ end
+ end
+ module Node
+ ELEMENT_NODE = 1
+ ATTRIBUTE_NODE = 2
+ TEXT_NODE = 3
+ CDATA_SECTION_NODE = 4
+ ENTITY_REFERENCE_NODE = 5
+ ENTITY_NODE = 6
+ PROCESSING_INSTRUCTION_NODE = 7
+ COMMENT_NODE = 8
+ DOCUMENT_NODE = 9
+ DOCUMENT_TYPE_NODE = 10
+ DOCUMENT_FRAGMENT_NODE = 11
+ NOTATION_NODE = 12
+ attr_reader(:nodeName)
+ attr_accessor(:nodeValue)
+ attr_reader(:nodeType)
+ attr_reader(:parentNode)
+ attr_reader(:childNodes)
+ attr_reader(:firstChild)
+ attr_reader(:lastChild)
+ attr_reader(:previousSibling)
+ attr_reader(:nextSibling)
+ attr_reader(:attributes)
+ attr_reader(:ownerDocument)
+ def insertBefore(newChild, refChild)
+ raise(NotImplementedError.new)
+ end
+ def replaceChild(newChild, oldChild)
+ raise(NotImplementedError.new)
+ end
+ def removeChild(oldChild)
+ raise(NotImplementedError.new)
+ end
+ def appendChild(newChild)
+ raise(NotImplementedError.new)
+ end
+ def hasChildNodes
+ raise(NotImplementedError.new)
+ end
+ def cloneNode(deep)
+ raise(NotImplementedError.new)
+ end
+ def normalize
+ raise(NotImplementedError.new)
+ end
+ def isSupported(feature, version)
+ raise(NotImplementedError.new)
+ end
+ attr_reader(:namespaceURI)
+ attr_accessor(:prefix)
+ attr_reader(:localName)
+ def hasAttributes
+ raise(NotImplementedError.new)
+ end
+ end
+ module NodeList
+ def item(index)
+ raise(NotImplementedError.new)
+ end
+ attr_reader(:length)
+ end
+ module NamedNodeMap
+ def getNamedItem(name)
+ raise(NotImplementedError.new)
+ end
+ def setNamedItem(arg)
+ raise(NotImplementedError.new)
+ end
+ def removeNamedItem(name)
+ raise(NotImplementedError.new)
+ end
+ def item(index)
+ raise(NotImplementedError.new)
+ end
+ attr_reader(:length)
+ def getNamedItemNS(namespaceURI, localName)
+ raise(NotImplementedError.new)
+ end
+ def setNamedItemNS(arg)
+ raise(NotImplementedError.new)
+ end
+ def removeNamedItemNS(namespaceURI, localName)
+ raise(NotImplementedError.new)
+ end
+ end
+ module CharacterData
+ include(Node)
+ attr_accessor(:data)
+ attr_reader(:length)
+ def substringData(offset, count)
+ raise(NotImplementedError.new)
+ end
+ def appendData(arg)
+ raise(NotImplementedError.new)
+ end
+ def insertData(offset, arg)
+ raise(NotImplementedError.new)
+ end
+ def deleteData(offset, count)
+ raise(NotImplementedError.new)
+ end
+ def replaceData(offset, count, arg)
+ raise(NotImplementedError.new)
+ end
+ end
+ module Attr
+ include(Node)
+ attr_reader(:name)
+ attr_reader(:specified)
+ attr_accessor(:value)
+ attr_reader(:ownerElement)
+ end
+ module Element
+ include(Node)
+ attr_reader(:tagName)
+ def getAttribute(name)
+ raise(NotImplementedError.new)
+ end
+ def setAttribute(name, value)
+ raise(NotImplementedError.new)
+ end
+ def removeAttribute(name)
+ raise(NotImplementedError.new)
+ end
+ def getAttributeNode(name)
+ raise(NotImplementedError.new)
+ end
+ def setAttributeNode(newAttr)
+ raise(NotImplementedError.new)
+ end
+ def removeAttributeNode(oldAttr)
+ raise(NotImplementedError.new)
+ end
+ def getElementsByTagName(name)
+ raise(NotImplementedError.new)
+ end
+ def getAttributeNS(namespaceURI, localName)
+ raise(NotImplementedError.new)
+ end
+ def setAttributeNS(namespaceURI, qualifiedName, value)
+ raise(NotImplementedError.new)
+ end
+ def removeAttributeNS(namespaceURI, localName)
+ raise(NotImplementedError.new)
+ end
+ def getAttributeNodeNS(namespaceURI, localName)
+ raise(NotImplementedError.new)
+ end
+ def setAttributeNodeNS(newAttr)
+ raise(NotImplementedError.new)
+ end
+ def getElementsByTagNameNS(namespaceURI, localName)
+ raise(NotImplementedError.new)
+ end
+ def hasAttribute(name)
+ raise(NotImplementedError.new)
+ end
+ def hasAttributeNS(namespaceURI, localName)
+ raise(NotImplementedError.new)
+ end
+ end
+ module Text
+ include(CharacterData)
+ def splitText(offset)
+ raise(NotImplementedError.new)
+ end
+ end
+ module Comment
+ include(CharacterData)
+ end
+ module CDATASection
+ include(Text)
+ end
+ module DocumentType
+ include(Node)
+ attr_reader(:name)
+ attr_reader(:entities)
+ attr_reader(:notations)
+ attr_reader(:publicId)
+ attr_reader(:systemId)
+ attr_reader(:internalSubset)
+ end
+ module Notation
+ include(Node)
+ attr_reader(:publicId)
+ attr_reader(:systemId)
+ end
+ module Entity
+ include(Node)
+ attr_reader(:publicId)
+ attr_reader(:systemId)
+ attr_reader(:notationName)
+ end
+ module EntityReference
+ include(Node)
+ end
+ module ProcessingInstruction
+ include(Node)
+ attr_reader(:target)
+ attr_accessor(:data)
+ end
+ module DocumentFragment
+ include(Node)
+ end
+ module Document
+ include(Node)
+ attr_reader(:doctype)
+ attr_reader(:implementation)
+ attr_reader(:documentElement)
+ def createElement(tagName)
+ raise(NotImplementedError.new)
+ end
+ def createDocumentFragment
+ raise(NotImplementedError.new)
+ end
+ def createTextNode(data)
+ raise(NotImplementedError.new)
+ end
+ def createComment(data)
+ raise(NotImplementedError.new)
+ end
+ def createCDATASection(data)
+ raise(NotImplementedError.new)
+ end
+ def createProcessingInstruction(target, data)
+ raise(NotImplementedError.new)
+ end
+ def createAttribute(name)
+ raise(NotImplementedError.new)
+ end
+ def createEntityReference(name)
+ raise(NotImplementedError.new)
+ end
+ def getElementsByTagName(tagname)
+ raise(NotImplementedError.new)
+ end
+ def importNode(importedNode, deep)
+ raise(NotImplementedError.new)
+ end
+ def createElementNS(namespaceURI, qualifiedName)
+ raise(NotImplementedError.new)
+ end
+ def createAttributeNS(namespaceURI, qualifiedName)
+ raise(NotImplementedError.new)
+ end
+ def getElementsByTagNameNS(namespaceURI, localName)
+ raise(NotImplementedError.new)
+ end
+ def getElementById(elementId)
+ raise(NotImplementedError.new)
+ end
+ end
+end
+
+end
+end
View
3  lib/nokogiri/version.rb
@@ -0,0 +1,3 @@
+module Nokogiri
+ VERSION = '1.0.0'
+end
Please sign in to comment.
Something went wrong with that request. Please try again.