vtd_xml 0.0.3-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +23 -0
- data/LICENSE.txt +20 -0
- data/README.md +29 -0
- data/Rakefile +20 -0
- data/bundle/bundler/setup.rb +10 -0
- data/bundle/jruby/1.9/bin/convert_to_should_syntax +23 -0
- data/bundle/jruby/1.9/bin/nokogiri +23 -0
- data/bundle/jruby/1.9/bin/rake +23 -0
- data/bundle/jruby/1.9/build_info/mini_portile-0.5.2.info +1 -0
- data/bundle/jruby/1.9/build_info/nokogiri-1.6.1-java.info +1 -0
- data/bundle/jruby/1.9/build_info/rake-10.1.1.info +1 -0
- data/bundle/jruby/1.9/build_info/shoulda-context-1.1.6.info +1 -0
- data/bundle/jruby/1.9/cache/mini_portile-0.5.2.gem +0 -0
- data/bundle/jruby/1.9/cache/nokogiri-1.6.1-java.gem +0 -0
- data/bundle/jruby/1.9/cache/rake-10.1.1.gem +0 -0
- data/bundle/jruby/1.9/cache/shoulda-context-1.1.6.gem +0 -0
- data/bundle/jruby/1.9/gems/mini_portile-0.5.2/History.txt +65 -0
- data/bundle/jruby/1.9/gems/mini_portile-0.5.2/LICENSE.txt +20 -0
- data/bundle/jruby/1.9/gems/mini_portile-0.5.2/README.rdoc +169 -0
- data/bundle/jruby/1.9/gems/mini_portile-0.5.2/Rakefile +44 -0
- data/bundle/jruby/1.9/gems/mini_portile-0.5.2/examples/Rakefile +55 -0
- data/bundle/jruby/1.9/gems/mini_portile-0.5.2/lib/mini_portile.rb +404 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/CHANGELOG.ja.rdoc +828 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/CHANGELOG.rdoc +835 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/C_CODING_STYLE.rdoc +33 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/Gemfile +21 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/Manifest.txt +315 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/README.ja.rdoc +106 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/README.rdoc +175 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ROADMAP.md +90 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/Rakefile +248 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/STANDARD_RESPONSES.md +47 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/Y_U_NO_GEMSPEC.md +155 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/bin/nokogiri +78 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/build_all +105 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/dependencies.yml +4 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/EncodingHandler.java +124 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/HtmlDocument.java +189 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/HtmlElementDescription.java +145 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/HtmlEntityLookup.java +79 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/HtmlSaxParserContext.java +259 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/NokogiriService.java +605 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/XmlAttr.java +190 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/XmlAttributeDecl.java +130 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/XmlCdata.java +84 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/XmlComment.java +95 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/XmlDocument.java +598 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/XmlDocumentFragment.java +210 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/XmlDtd.java +480 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/XmlElement.java +88 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/XmlElementContent.java +382 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/XmlElementDecl.java +152 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/XmlEntityDecl.java +162 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/XmlEntityReference.java +101 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/XmlNamespace.java +216 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/XmlNode.java +1637 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/XmlNodeSet.java +270 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/XmlProcessingInstruction.java +99 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/XmlReader.java +532 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/XmlRelaxng.java +144 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/XmlSaxParserContext.java +356 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/XmlSaxPushParser.java +232 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/XmlSchema.java +324 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/XmlSyntaxError.java +136 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/XmlText.java +107 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/XmlXpathContext.java +203 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/XsltStylesheet.java +360 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/ClosedStreamException.java +10 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/HtmlDomParserContext.java +243 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/NokogiriBlockingQueueInputStream.java +151 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/NokogiriDocumentCache.java +73 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/NokogiriDomParser.java +116 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/NokogiriEncodingReaderWrapper.java +109 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/NokogiriEntityResolver.java +123 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/NokogiriErrorHandler.java +86 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/NokogiriHandler.java +341 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/NokogiriHelpers.java +826 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/NokogiriNamespaceCache.java +180 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/NokogiriNamespaceContext.java +130 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/NokogiriNonStrictErrorHandler.java +98 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/NokogiriNonStrictErrorHandler4NekoHtml.java +121 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/NokogiriStrictErrorHandler.java +79 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/NokogiriXPathFunction.java +141 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/NokogiriXPathFunctionResolver.java +73 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/NokogiriXPathVariableResolver.java +67 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/NokogiriXsltErrorListener.java +87 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/ParserContext.java +289 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/ReaderNode.java +534 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/SaveContextVisitor.java +780 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/SchemaErrorHandler.java +76 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/UncloseableInputStream.java +102 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/XmlDeclHandler.java +42 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/XmlDomParserContext.java +275 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/XmlSaxParser.java +65 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/java/nokogiri/internals/XsltExtensionFunction.java +72 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/depend +358 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/extconf.rb +195 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/html_document.c +170 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/html_document.h +10 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/html_element_description.c +279 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/html_element_description.h +10 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/html_entity_lookup.c +32 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/html_entity_lookup.h +8 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/html_sax_parser_context.c +116 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/html_sax_parser_context.h +11 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/html_sax_push_parser.c +87 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/html_sax_push_parser.h +9 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/nokogiri.c +143 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/nokogiri.h +164 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_attr.c +94 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_attr.h +9 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_attribute_decl.c +70 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_attribute_decl.h +9 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_cdata.c +56 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_cdata.h +9 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_comment.c +54 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_comment.h +9 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_document.c +576 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_document.h +23 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_document_fragment.c +48 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_document_fragment.h +10 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_dtd.c +202 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_dtd.h +10 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_element_content.c +123 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_element_content.h +10 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_element_decl.c +69 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_element_decl.h +9 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_encoding_handler.c +79 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_encoding_handler.h +8 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_entity_decl.c +110 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_entity_decl.h +10 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_entity_reference.c +52 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_entity_reference.h +9 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_io.c +56 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_io.h +11 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_libxml2_hacks.c +112 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_libxml2_hacks.h +12 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_namespace.c +78 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_namespace.h +13 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_node.c +1534 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_node.h +13 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_node_set.c +467 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_node_set.h +14 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_processing_instruction.c +56 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_processing_instruction.h +9 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_reader.c +681 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_reader.h +10 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_relax_ng.c +161 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_relax_ng.h +9 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_sax_parser.c +312 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_sax_parser.h +39 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_sax_parser_context.c +222 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_sax_parser_context.h +10 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_sax_push_parser.c +115 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_sax_push_parser.h +9 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_schema.c +205 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_schema.h +9 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_syntax_error.c +58 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_syntax_error.h +13 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_text.c +52 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_text.h +9 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_xpath_context.c +319 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xml_xpath_context.h +10 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xslt_stylesheet.c +270 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/ext/nokogiri/xslt_stylesheet.h +14 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/isorelax.jar +0 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/jing.jar +0 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nekodtd.jar +0 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nekohtml.jar +0 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/css/node.rb +102 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/css/parser.rb +720 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/css/parser.y +258 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/css/parser_extras.rb +91 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/css/syntax_error.rb +7 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/css/tokenizer.rb +152 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/css/tokenizer.rex +55 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/css/xpath_visitor.rb +171 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/css.rb +27 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/decorators/slop.rb +35 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/html/builder.rb +35 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/html/document.rb +254 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/html/document_fragment.rb +41 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/html/element_description.rb +23 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/html/element_description_defaults.rb +671 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/html/entity_lookup.rb +13 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/html/sax/parser.rb +52 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/html/sax/parser_context.rb +16 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/html/sax/push_parser.rb +16 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/html.rb +37 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/nokogiri.jar +0 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/syntax_error.rb +4 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/version.rb +106 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/attr.rb +14 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/attribute_decl.rb +18 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/builder.rb +443 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/cdata.rb +11 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/character_data.rb +7 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/document.rb +279 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/document_fragment.rb +112 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/dtd.rb +22 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/element_content.rb +36 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/element_decl.rb +13 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/entity_decl.rb +19 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/namespace.rb +13 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/node/save_options.rb +61 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/node.rb +957 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/node_set.rb +355 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/notation.rb +6 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/parse_options.rb +98 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/pp/character_data.rb +18 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/pp/node.rb +56 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/pp.rb +2 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/processing_instruction.rb +8 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/reader.rb +112 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/relax_ng.rb +32 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/sax/document.rb +171 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/sax/parser.rb +123 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/sax/parser_context.rb +16 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/sax/push_parser.rb +60 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/sax.rb +4 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/schema.rb +63 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/syntax_error.rb +47 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/text.rb +9 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/xpath/syntax_error.rb +11 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/xpath.rb +10 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml/xpath_context.rb +16 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xml.rb +73 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xslt/stylesheet.rb +25 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri/xslt.rb +56 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/nokogiri.rb +128 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/xercesImpl.jar +0 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/lib/xsd/xmlparser/nokogiri.rb +102 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/tasks/cross_compile.rb +134 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/tasks/nokogiri.org.rb +24 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/tasks/test.rb +95 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/css/test_nthiness.rb +159 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/css/test_parser.rb +341 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/css/test_tokenizer.rb +198 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/css/test_xpath_visitor.rb +91 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/decorators/test_slop.rb +16 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/2ch.html +108 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/address_book.rlx +12 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/address_book.xml +10 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/bar/bar.xsd +4 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/bogus.xml +0 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/dont_hurt_em_why.xml +422 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/encoding.html +82 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/encoding.xhtml +84 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/exslt.xml +8 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/exslt.xslt +35 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/foo/foo.xsd +4 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/metacharset.html +10 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/noencoding.html +47 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/po.xml +32 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/po.xsd +66 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/saml/saml20assertion_schema.xsd +283 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/saml/saml20protocol_schema.xsd +302 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/saml/xenc_schema.xsd +146 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/saml/xmldsig_schema.xsd +318 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/shift_jis.html +10 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/shift_jis.xml +5 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/snuggles.xml +3 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/staff.dtd +10 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/staff.xml +59 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/staff.xslt +32 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/test_document_url/bar.xml +2 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/test_document_url/document.dtd +4 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/test_document_url/document.xml +6 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/tlm.html +850 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/to_be_xincluded.xml +2 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/valid_bar.xml +2 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/files/xinclude.xml +4 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/helper.rb +154 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/html/sax/test_parser.rb +141 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/html/sax/test_parser_context.rb +46 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/html/test_builder.rb +164 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/html/test_document.rb +552 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/html/test_document_encoding.rb +138 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/html/test_document_fragment.rb +261 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/html/test_element_description.rb +105 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/html/test_named_characters.rb +14 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/html/test_node.rb +196 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/html/test_node_encoding.rb +27 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/namespaces/test_additional_namespaces_in_builder_doc.rb +14 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/namespaces/test_namespaces_in_builder_doc.rb +75 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/namespaces/test_namespaces_in_created_doc.rb +75 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/namespaces/test_namespaces_in_parsed_doc.rb +66 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/test_convert_xpath.rb +135 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/test_css_cache.rb +45 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/test_encoding_handler.rb +46 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/test_memory_leak.rb +156 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/test_nokogiri.rb +132 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/test_reader.rb +555 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/test_soap4r_sax.rb +52 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/test_xslt_transforms.rb +254 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/node/test_save_options.rb +28 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/node/test_subclass.rb +44 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/sax/test_parser.rb +366 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/sax/test_parser_context.rb +106 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/sax/test_push_parser.rb +157 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_attr.rb +64 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_attribute_decl.rb +86 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_builder.rb +306 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_c14n.rb +151 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_cdata.rb +48 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_comment.rb +29 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_document.rb +868 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_document_encoding.rb +28 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_document_fragment.rb +223 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_dtd.rb +103 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_dtd_encoding.rb +33 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_element_content.rb +56 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_element_decl.rb +73 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_entity_decl.rb +122 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_entity_reference.rb +245 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_namespace.rb +95 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_node.rb +1137 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_node_attributes.rb +96 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_node_encoding.rb +107 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_node_inheritance.rb +32 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_node_reparenting.rb +374 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_node_set.rb +755 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_parse_options.rb +64 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_processing_instruction.rb +30 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_reader_encoding.rb +142 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_relax_ng.rb +60 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_schema.rb +103 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_syntax_error.rb +12 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_text.rb +45 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_unparented_node.rb +422 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_xinclude.rb +83 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xml/test_xpath.rb +295 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xslt/test_custom_functions.rb +133 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/xslt/test_exception_handling.rb +37 -0
- data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test_all +81 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/CHANGES +530 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/MIT-LICENSE +21 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/README.rdoc +187 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/Rakefile +374 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/TODO +21 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/bin/rake +33 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/command_line_usage.rdoc +152 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/example/Rakefile1 +38 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/example/Rakefile2 +35 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/example/a.c +6 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/example/b.c +6 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/example/main.c +11 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/glossary.rdoc +51 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/jamis.rb +591 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/proto_rake.rdoc +127 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/rake.1.gz +0 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/rakefile.rdoc +617 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/rational.rdoc +151 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-0.4.14.rdoc +23 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-0.4.15.rdoc +35 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-0.5.0.rdoc +53 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-0.5.3.rdoc +78 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-0.5.4.rdoc +46 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-0.6.0.rdoc +141 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-0.7.0.rdoc +119 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-0.7.1.rdoc +59 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-0.7.2.rdoc +121 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-0.7.3.rdoc +47 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-0.8.0.rdoc +114 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-0.8.2.rdoc +165 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-0.8.3.rdoc +112 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-0.8.4.rdoc +147 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-0.8.5.rdoc +53 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-0.8.6.rdoc +55 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-0.8.7.rdoc +55 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-0.9.0.rdoc +112 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-0.9.1.rdoc +52 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-0.9.2.2.rdoc +55 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-0.9.2.rdoc +49 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-0.9.3.rdoc +102 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-0.9.4.rdoc +110 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-0.9.5.rdoc +114 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-0.9.6.rdoc +127 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-10.0.0.rdoc +178 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-10.0.1.rdoc +187 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-10.0.2.rdoc +191 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-10.0.3.rdoc +191 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/doc/release_notes/rake-10.1.0.rdoc +61 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/install.rb +80 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/alt_system.rb +108 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/application.rb +728 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/backtrace.rb +20 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/clean.rb +55 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/cloneable.rb +16 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/contrib/compositepublisher.rb +21 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/contrib/ftptools.rb +139 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/contrib/publisher.rb +73 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/contrib/rubyforgepublisher.rb +16 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/contrib/sshpublisher.rb +50 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/contrib/sys.rb +2 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/default_loader.rb +10 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/dsl_definition.rb +157 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/early_time.rb +18 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/ext/core.rb +28 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/ext/module.rb +0 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/ext/string.rb +166 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/ext/time.rb +15 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/file_creation_task.rb +24 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/file_list.rb +416 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/file_task.rb +46 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/file_utils.rb +116 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/file_utils_ext.rb +144 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/gempackagetask.rb +2 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/invocation_chain.rb +57 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/invocation_exception_mixin.rb +16 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/linked_list.rb +103 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/loaders/makefile.rb +40 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/multi_task.rb +13 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/name_space.rb +25 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/packagetask.rb +190 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/pathmap.rb +1 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/phony.rb +15 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/private_reader.rb +20 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/promise.rb +99 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/pseudo_status.rb +29 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/rake_module.rb +37 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/rake_test_loader.rb +22 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/rdoctask.rb +2 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/ruby182_test_unit_fix.rb +27 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/rule_recursion_overflow_error.rb +20 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/runtest.rb +22 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/scope.rb +42 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/task.rb +378 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/task_argument_error.rb +7 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/task_arguments.rb +89 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/task_manager.rb +297 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/tasklib.rb +22 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/testtask.rb +201 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/thread_history_display.rb +48 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/thread_pool.rb +161 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/trace_output.rb +22 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/version.rb +9 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake/win32.rb +56 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/lib/rake.rb +73 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/file_creation.rb +34 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/helper.rb +128 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/support/rakefile_definitions.rb +444 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/support/ruby_runner.rb +33 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_private_reader.rb +42 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake.rb +40 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_application.rb +517 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_application_options.rb +457 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_backtrace.rb +113 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_clean.rb +46 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_definitions.rb +79 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_directory_task.rb +57 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_dsl.rb +40 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_early_time.rb +31 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_extension.rb +59 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_file_creation_task.rb +56 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_file_list.rb +627 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_file_list_path_map.rb +8 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_file_task.rb +122 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_file_utils.rb +309 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_ftp_file.rb +74 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_functional.rb +466 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_invocation_chain.rb +64 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_linked_list.rb +84 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_makefile_loader.rb +46 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_multi_task.rb +58 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_name_space.rb +43 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_package_task.rb +79 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_path_map.rb +168 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_path_map_explode.rb +34 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_path_map_partial.rb +18 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_pseudo_status.rb +21 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_rake_test_loader.rb +20 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_reduce_compat.rb +26 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_require.rb +40 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_rules.rb +362 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_scope.rb +44 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_task.rb +376 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_task_argument_parsing.rb +103 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_task_arguments.rb +121 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_task_lib.rb +9 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_task_manager.rb +158 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_task_manager_argument_resolution.rb +19 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_task_with_arguments.rb +171 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_test_task.rb +119 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_thread_pool.rb +142 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_top_level_functions.rb +71 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_rake_win32.rb +72 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_thread_history_display.rb +101 -0
- data/bundle/jruby/1.9/gems/rake-10.1.1/test/test_trace_output.rb +52 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/Appraisals +21 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/CONTRIBUTING.md +38 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/Gemfile +3 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/MIT-LICENSE +22 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/README.md +54 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/Rakefile +21 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/bin/convert_to_should_syntax +42 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/gemfiles/3.0.gemfile +7 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/gemfiles/3.0.gemfile.lock +91 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/gemfiles/3.1.gemfile +9 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/gemfiles/3.1.gemfile.lock +112 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/gemfiles/3.2.gemfile +9 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/gemfiles/3.2.gemfile.lock +111 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/gemfiles/4.0.gemfile +9 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/gemfiles/4.0.gemfile.lock +107 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/init.rb +1 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/lib/shoulda/context/assertions.rb +96 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/lib/shoulda/context/autoload_macros.rb +46 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/lib/shoulda/context/context.rb +481 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/lib/shoulda/context/proc_extensions.rb +14 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/lib/shoulda/context/tasks/list_tests.rake +29 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/lib/shoulda/context/tasks/yaml_to_shoulda.rake +28 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/lib/shoulda/context/tasks.rb +3 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/lib/shoulda/context/version.rb +5 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/lib/shoulda/context.rb +33 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/lib/shoulda-context.rb +1 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/rails/init.rb +4 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/shoulda-context.gemspec +27 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/tasks/shoulda.rake +1 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/test/fake_rails_root/test/shoulda_macros/custom_macro.rb +6 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/test/shoulda/autoload_macro_test.rb +18 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/test/shoulda/context_test.rb +360 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/test/shoulda/convert_to_should_syntax_test.rb +63 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/test/shoulda/helpers_test.rb +190 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/test/shoulda/should_test.rb +291 -0
- data/bundle/jruby/1.9/gems/shoulda-context-1.1.6/test/test_helper.rb +11 -0
- data/bundle/jruby/1.9/specifications/mini_portile-0.5.2.gemspec +22 -0
- data/bundle/jruby/1.9/specifications/nokogiri-1.6.1-java.gemspec +69 -0
- data/bundle/jruby/1.9/specifications/rake-10.1.1.gemspec +35 -0
- data/bundle/jruby/1.9/specifications/shoulda-context-1.1.6.gemspec +44 -0
- data/lib/vtd-xml-2.11.jar +0 -0
- data/lib/vtd_xml/document.rb +124 -0
- data/lib/vtd_xml/extraction_error.rb +4 -0
- data/lib/vtd_xml/modify_error.rb +5 -0
- data/lib/vtd_xml/parse_error.rb +5 -0
- data/lib/vtd_xml/version.rb +4 -0
- data/lib/vtd_xml/xpath_error.rb +4 -0
- data/lib/vtd_xml.rb +8 -0
- data/pkg/vtd_xml-0.0.3-java.gem +0 -0
- data/test/test_load_paths.rb +18 -0
- data/test/unit/vtd_xml/document_test.rb +266 -0
- data/vtd_xml.gemspec +25 -0
- data/vtd_xml.iml +16 -0
- metadata +648 -0
@@ -0,0 +1,261 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require "helper"
|
3
|
+
|
4
|
+
module Nokogiri
|
5
|
+
module HTML
|
6
|
+
class TestDocumentFragment < Nokogiri::TestCase
|
7
|
+
def setup
|
8
|
+
super
|
9
|
+
@html = Nokogiri::HTML.parse(File.read(HTML_FILE), HTML_FILE)
|
10
|
+
end
|
11
|
+
|
12
|
+
if RUBY_VERSION >= '1.9'
|
13
|
+
def test_inspect_encoding
|
14
|
+
fragment = "<div>こんにちは!</div>".encode('EUC-JP')
|
15
|
+
f = Nokogiri::HTML::DocumentFragment.parse fragment
|
16
|
+
assert_equal "こんにちは!", f.content
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_html_parse_encoding
|
20
|
+
fragment = "<div>こんにちは!</div>".encode 'EUC-JP'
|
21
|
+
f = Nokogiri::HTML.fragment fragment
|
22
|
+
assert_equal 'EUC-JP', f.document.encoding
|
23
|
+
assert_equal "こんにちは!", f.content
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_colons_are_not_removed
|
28
|
+
doc = Nokogiri::HTML::DocumentFragment.parse("<span>3:30pm</span>")
|
29
|
+
assert_match(/3:30/, doc.to_s)
|
30
|
+
end
|
31
|
+
|
32
|
+
def test_parse_encoding
|
33
|
+
fragment = "<div>hello world</div>"
|
34
|
+
f = Nokogiri::HTML::DocumentFragment.parse fragment, 'ISO-8859-1'
|
35
|
+
assert_equal 'ISO-8859-1', f.document.encoding
|
36
|
+
assert_equal "hello world", f.content
|
37
|
+
end
|
38
|
+
|
39
|
+
def test_html_parse_with_encoding
|
40
|
+
fragment = "<div>hello world</div>"
|
41
|
+
f = Nokogiri::HTML.fragment fragment, 'ISO-8859-1'
|
42
|
+
assert_equal 'ISO-8859-1', f.document.encoding
|
43
|
+
assert_equal "hello world", f.content
|
44
|
+
end
|
45
|
+
|
46
|
+
def test_parse_in_context
|
47
|
+
assert_equal('<br>', @html.root.parse('<br />').to_s)
|
48
|
+
end
|
49
|
+
|
50
|
+
def test_inner_html=
|
51
|
+
fragment = Nokogiri::HTML.fragment '<hr />'
|
52
|
+
|
53
|
+
fragment.inner_html = "hello"
|
54
|
+
assert_equal 'hello', fragment.inner_html
|
55
|
+
end
|
56
|
+
|
57
|
+
def test_ancestors_search
|
58
|
+
html = %q{
|
59
|
+
<div>
|
60
|
+
<ul>
|
61
|
+
<li>foo</li>
|
62
|
+
</ul>
|
63
|
+
</div>
|
64
|
+
}
|
65
|
+
fragment = Nokogiri::HTML.fragment html
|
66
|
+
li = fragment.at('li')
|
67
|
+
assert li.matches?('li')
|
68
|
+
end
|
69
|
+
|
70
|
+
def test_fun_encoding
|
71
|
+
string = %Q(<body>こんにちは</body>)
|
72
|
+
html = Nokogiri::HTML::DocumentFragment.parse(
|
73
|
+
string
|
74
|
+
).to_html(:encoding => 'UTF-8')
|
75
|
+
assert_equal string, html
|
76
|
+
end
|
77
|
+
|
78
|
+
def test_new
|
79
|
+
assert Nokogiri::HTML::DocumentFragment.new(@html)
|
80
|
+
end
|
81
|
+
|
82
|
+
def test_body_fragment_should_contain_body
|
83
|
+
fragment = Nokogiri::HTML::DocumentFragment.parse(" <body><div>foo</div></body>")
|
84
|
+
assert_match(/^<body>/, fragment.to_s)
|
85
|
+
end
|
86
|
+
|
87
|
+
def test_nonbody_fragment_should_not_contain_body
|
88
|
+
fragment = Nokogiri::HTML::DocumentFragment.parse("<div>foo</div>")
|
89
|
+
assert_match(/^<div>/, fragment.to_s)
|
90
|
+
end
|
91
|
+
|
92
|
+
def test_fragment_should_have_document
|
93
|
+
fragment = Nokogiri::HTML::DocumentFragment.new(@html)
|
94
|
+
assert_equal @html, fragment.document
|
95
|
+
end
|
96
|
+
|
97
|
+
def test_empty_fragment_should_be_searchable_by_css
|
98
|
+
fragment = Nokogiri::HTML.fragment("")
|
99
|
+
assert_equal 0, fragment.css("a").size
|
100
|
+
end
|
101
|
+
|
102
|
+
def test_empty_fragment_should_be_searchable
|
103
|
+
fragment = Nokogiri::HTML.fragment("")
|
104
|
+
assert_equal 0, fragment.search("//a").size
|
105
|
+
end
|
106
|
+
|
107
|
+
def test_name
|
108
|
+
fragment = Nokogiri::HTML::DocumentFragment.new(@html)
|
109
|
+
assert_equal '#document-fragment', fragment.name
|
110
|
+
end
|
111
|
+
|
112
|
+
def test_static_method
|
113
|
+
fragment = Nokogiri::HTML::DocumentFragment.parse("<div>a</div>")
|
114
|
+
assert_instance_of Nokogiri::HTML::DocumentFragment, fragment
|
115
|
+
end
|
116
|
+
|
117
|
+
def test_many_fragments
|
118
|
+
100.times { Nokogiri::HTML::DocumentFragment.new(@html) }
|
119
|
+
end
|
120
|
+
|
121
|
+
def test_subclass
|
122
|
+
klass = Class.new(Nokogiri::HTML::DocumentFragment)
|
123
|
+
fragment = klass.new(@html, "<div>a</div>")
|
124
|
+
assert_instance_of klass, fragment
|
125
|
+
end
|
126
|
+
|
127
|
+
def test_subclass_parse
|
128
|
+
klass = Class.new(Nokogiri::HTML::DocumentFragment)
|
129
|
+
doc = klass.parse("<div>a</div>")
|
130
|
+
assert_instance_of klass, doc
|
131
|
+
end
|
132
|
+
|
133
|
+
def test_html_fragment
|
134
|
+
fragment = Nokogiri::HTML.fragment("<div>a</div>")
|
135
|
+
assert_equal "<div>a</div>", fragment.to_s
|
136
|
+
end
|
137
|
+
|
138
|
+
def test_html_fragment_has_outer_text
|
139
|
+
doc = "a<div>b</div>c"
|
140
|
+
fragment = Nokogiri::HTML::Document.new.fragment(doc)
|
141
|
+
if Nokogiri.uses_libxml? &&
|
142
|
+
Nokogiri::VERSION_INFO['libxml']['loaded'] <= "2.6.16"
|
143
|
+
assert_equal "a<div>b</div><p>c</p>", fragment.to_s
|
144
|
+
else
|
145
|
+
assert_equal "a<div>b</div>c", fragment.to_s
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
def test_html_fragment_case_insensitivity
|
150
|
+
doc = "<Div>b</Div>"
|
151
|
+
fragment = Nokogiri::HTML::Document.new.fragment(doc)
|
152
|
+
assert_equal "<div>b</div>", fragment.to_s
|
153
|
+
end
|
154
|
+
|
155
|
+
def test_html_fragment_with_leading_whitespace
|
156
|
+
doc = " <div>b</div> "
|
157
|
+
fragment = Nokogiri::HTML::Document.new.fragment(doc)
|
158
|
+
assert_match %r% <div>b</div> *%, fragment.to_s
|
159
|
+
end
|
160
|
+
|
161
|
+
def test_html_fragment_with_leading_whitespace_and_newline
|
162
|
+
doc = " \n<div>b</div> "
|
163
|
+
fragment = Nokogiri::HTML::Document.new.fragment(doc)
|
164
|
+
assert_match %r% \n<div>b</div> *%, fragment.to_s
|
165
|
+
end
|
166
|
+
|
167
|
+
def test_html_fragment_with_leading_text_and_newline
|
168
|
+
fragment = HTML::Document.new.fragment("First line\nSecond line<br>Broken line")
|
169
|
+
assert_equal fragment.to_s, "First line\nSecond line<br>Broken line"
|
170
|
+
end
|
171
|
+
|
172
|
+
def test_html_fragment_with_leading_whitespace_and_text_and_newline
|
173
|
+
fragment = HTML::Document.new.fragment(" First line\nSecond line<br>Broken line")
|
174
|
+
assert_equal " First line\nSecond line<br>Broken line", fragment.to_s
|
175
|
+
end
|
176
|
+
|
177
|
+
def test_html_fragment_with_leading_entity
|
178
|
+
failed = ""test<br/>test""
|
179
|
+
fragment = Nokogiri::HTML::DocumentFragment.parse(failed)
|
180
|
+
assert_equal '"test<br>test"', fragment.to_html
|
181
|
+
end
|
182
|
+
|
183
|
+
def test_to_s
|
184
|
+
doc = "<span>foo<br></span><span>bar</span>"
|
185
|
+
fragment = Nokogiri::HTML::Document.new.fragment(doc)
|
186
|
+
assert_equal "<span>foo<br></span><span>bar</span>", fragment.to_s
|
187
|
+
end
|
188
|
+
|
189
|
+
def test_to_html
|
190
|
+
doc = "<span>foo<br></span><span>bar</span>"
|
191
|
+
fragment = Nokogiri::HTML::Document.new.fragment(doc)
|
192
|
+
assert_equal "<span>foo<br></span><span>bar</span>", fragment.to_html
|
193
|
+
end
|
194
|
+
|
195
|
+
def test_to_xhtml
|
196
|
+
doc = "<span>foo<br></span><span>bar</span>"
|
197
|
+
fragment = Nokogiri::HTML::Document.new.fragment(doc)
|
198
|
+
if Nokogiri.jruby? || Nokogiri::VERSION_INFO['libxml']['loaded'] >= "2.7.0"
|
199
|
+
assert_equal "<span>foo<br /></span><span>bar</span>", fragment.to_xhtml
|
200
|
+
else
|
201
|
+
# FIXME: why are we doing this ? this violates the spec,
|
202
|
+
# see http://www.w3.org/TR/xhtml1/#C_2
|
203
|
+
assert_equal "<span>foo<br></span><span>bar</span>", fragment.to_xhtml
|
204
|
+
end
|
205
|
+
end
|
206
|
+
|
207
|
+
def test_to_xml
|
208
|
+
doc = "<span>foo<br></span><span>bar</span>"
|
209
|
+
fragment = Nokogiri::HTML::Document.new.fragment(doc)
|
210
|
+
assert_equal "<span>foo<br/></span><span>bar</span>", fragment.to_xml
|
211
|
+
end
|
212
|
+
|
213
|
+
def test_fragment_script_tag_with_cdata
|
214
|
+
doc = HTML::Document.new
|
215
|
+
fragment = doc.fragment("<script>var foo = 'bar';</script>")
|
216
|
+
assert_equal("<script>var foo = 'bar';</script>",
|
217
|
+
fragment.to_s)
|
218
|
+
end
|
219
|
+
|
220
|
+
def test_fragment_with_comment
|
221
|
+
doc = HTML::Document.new
|
222
|
+
fragment = doc.fragment("<p>hello<!-- your ad here --></p>")
|
223
|
+
assert_equal("<p>hello<!-- your ad here --></p>",
|
224
|
+
fragment.to_s)
|
225
|
+
end
|
226
|
+
|
227
|
+
def test_malformed_fragment_is_corrected
|
228
|
+
fragment = HTML::DocumentFragment.parse("<div </div>")
|
229
|
+
assert_equal "<div></div>", fragment.to_s
|
230
|
+
end
|
231
|
+
|
232
|
+
def test_unclosed_script_tag
|
233
|
+
# see GH#315
|
234
|
+
fragment = HTML::DocumentFragment.parse("foo <script>bar")
|
235
|
+
assert_equal "foo <script>bar</script>", fragment.to_html
|
236
|
+
end
|
237
|
+
|
238
|
+
def test_error_propagation_on_fragment_parse
|
239
|
+
frag = Nokogiri::HTML::DocumentFragment.parse "<hello>oh, hello there.</hello>"
|
240
|
+
assert frag.errors.any?{|err| err.to_s =~ /Tag hello invalid/}, "errors should be copied to the fragment"
|
241
|
+
end
|
242
|
+
|
243
|
+
def test_error_propagation_on_fragment_parse_in_node_context
|
244
|
+
doc = Nokogiri::HTML::Document.parse "<html><body><div></div></body></html>"
|
245
|
+
context_node = doc.at_css "div"
|
246
|
+
frag = Nokogiri::HTML::DocumentFragment.new doc, "<hello>oh, hello there.</hello>", context_node
|
247
|
+
assert frag.errors.any?{|err| err.to_s =~ /Tag hello invalid/}, "errors should be on the context node's document"
|
248
|
+
end
|
249
|
+
|
250
|
+
def test_error_propagation_on_fragment_parse_in_node_context_should_not_include_preexisting_errors
|
251
|
+
doc = Nokogiri::HTML::Document.parse "<html><body><div></div><jimmy></jimmy></body></html>"
|
252
|
+
assert doc.errors.any?{|err| err.to_s =~ /jimmy/}, "assert on setup"
|
253
|
+
|
254
|
+
context_node = doc.at_css "div"
|
255
|
+
frag = Nokogiri::HTML::DocumentFragment.new doc, "<hello>oh, hello there.</hello>", context_node
|
256
|
+
assert frag.errors.any?{|err| err.to_s =~ /Tag hello invalid/}, "errors should be on the context node's document"
|
257
|
+
assert frag.errors.none?{|err| err.to_s =~ /jimmy/}, "errors should not include pre-existing document errors"
|
258
|
+
end
|
259
|
+
end
|
260
|
+
end
|
261
|
+
end
|
@@ -0,0 +1,105 @@
|
|
1
|
+
require "helper"
|
2
|
+
|
3
|
+
module Nokogiri
|
4
|
+
module HTML
|
5
|
+
class TestElementDescription < Nokogiri::TestCase
|
6
|
+
def test_fetch_nonexistent
|
7
|
+
assert_nil ElementDescription['foo']
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_fetch_element_description
|
11
|
+
assert desc = ElementDescription['a']
|
12
|
+
assert_instance_of ElementDescription, desc
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_name
|
16
|
+
assert_equal 'a', ElementDescription['a'].name
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_implied_start_tag?
|
20
|
+
assert !ElementDescription['a'].implied_start_tag?
|
21
|
+
end
|
22
|
+
|
23
|
+
def test_implied_end_tag?
|
24
|
+
assert !ElementDescription['a'].implied_end_tag?
|
25
|
+
assert ElementDescription['p'].implied_end_tag?
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_save_end_tag?
|
29
|
+
assert !ElementDescription['a'].save_end_tag?
|
30
|
+
assert ElementDescription['br'].save_end_tag?
|
31
|
+
end
|
32
|
+
|
33
|
+
def test_empty?
|
34
|
+
assert ElementDescription['br'].empty?
|
35
|
+
assert !ElementDescription['a'].empty?
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_deprecated?
|
39
|
+
assert ElementDescription['applet'].deprecated?
|
40
|
+
assert !ElementDescription['br'].deprecated?
|
41
|
+
end
|
42
|
+
|
43
|
+
def test_inline?
|
44
|
+
assert ElementDescription['a'].inline?
|
45
|
+
assert !ElementDescription['div'].inline?
|
46
|
+
end
|
47
|
+
|
48
|
+
def test_block?
|
49
|
+
element = ElementDescription['a']
|
50
|
+
assert_equal(!element.inline?, element.block?)
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_description
|
54
|
+
assert ElementDescription['a'].description
|
55
|
+
end
|
56
|
+
|
57
|
+
def test_subelements
|
58
|
+
sub_elements = ElementDescription['body'].sub_elements
|
59
|
+
if Nokogiri.uses_libxml? && Nokogiri::LIBXML_VERSION >= '2.7.7'
|
60
|
+
assert_equal 65, sub_elements.length
|
61
|
+
elsif Nokogiri.uses_libxml?
|
62
|
+
assert_equal 61, sub_elements.length
|
63
|
+
else
|
64
|
+
assert sub_elements.length > 0
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
def test_default_sub_element
|
69
|
+
assert_equal 'div', ElementDescription['body'].default_sub_element
|
70
|
+
end
|
71
|
+
|
72
|
+
def test_null_default_sub_element
|
73
|
+
doc = Nokogiri::HTML('foo')
|
74
|
+
doc.root.description.default_sub_element
|
75
|
+
end
|
76
|
+
|
77
|
+
def test_optional_attributes
|
78
|
+
attrs = ElementDescription['table'].optional_attributes
|
79
|
+
assert attrs
|
80
|
+
end
|
81
|
+
|
82
|
+
def test_deprecated_attributes
|
83
|
+
attrs = ElementDescription['table'].deprecated_attributes
|
84
|
+
assert attrs
|
85
|
+
assert_equal 2, attrs.length
|
86
|
+
end
|
87
|
+
|
88
|
+
def test_required_attributes
|
89
|
+
attrs = ElementDescription['table'].required_attributes
|
90
|
+
assert attrs
|
91
|
+
assert_equal 0, attrs.length
|
92
|
+
end
|
93
|
+
|
94
|
+
def test_inspect
|
95
|
+
desc = ElementDescription['input']
|
96
|
+
assert_match desc.name, desc.inspect
|
97
|
+
end
|
98
|
+
|
99
|
+
def test_to_s
|
100
|
+
desc = ElementDescription['input']
|
101
|
+
assert_match desc.name, desc.to_s
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require "helper"
|
2
|
+
|
3
|
+
module Nokogiri
|
4
|
+
module HTML
|
5
|
+
class TestNamedCharacters < Nokogiri::TestCase
|
6
|
+
def test_named_character
|
7
|
+
copy = NamedCharacters.get('copy')
|
8
|
+
assert_equal 169, NamedCharacters['copy']
|
9
|
+
assert_equal copy.value, NamedCharacters['copy']
|
10
|
+
assert copy.description
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,196 @@
|
|
1
|
+
require "helper"
|
2
|
+
|
3
|
+
require 'nkf'
|
4
|
+
|
5
|
+
module Nokogiri
|
6
|
+
module HTML
|
7
|
+
class TestNode < Nokogiri::TestCase
|
8
|
+
def setup
|
9
|
+
super
|
10
|
+
@html = Nokogiri::HTML(<<-eohtml)
|
11
|
+
<html>
|
12
|
+
<head></head>
|
13
|
+
<body>
|
14
|
+
<div class='baz'><a href="foo" class="bar">first</a></div>
|
15
|
+
</body>
|
16
|
+
</html>
|
17
|
+
eohtml
|
18
|
+
end
|
19
|
+
|
20
|
+
def test_to_a
|
21
|
+
assert_equal [['class', 'bar'], ['href', 'foo']],@html.at('a').to_a.sort
|
22
|
+
end
|
23
|
+
|
24
|
+
def test_attr
|
25
|
+
node = @html.at('div.baz')
|
26
|
+
assert_equal node['class'], node.attr('class')
|
27
|
+
end
|
28
|
+
|
29
|
+
def test_get_attribute
|
30
|
+
element = @html.at('div')
|
31
|
+
assert_equal 'baz', element.get_attribute('class')
|
32
|
+
assert_equal 'baz', element['class']
|
33
|
+
element['href'] = "javascript:alert(\"AGGA-KA-BOO!\")"
|
34
|
+
assert_match(/%22AGGA-KA-BOO!%22/, element.to_html)
|
35
|
+
end
|
36
|
+
|
37
|
+
# The HTML parser ignores namespaces, so even properly declared namespaces
|
38
|
+
# are treated as as undeclared and have to be accessed via prefix:tagname
|
39
|
+
def test_ns_attribute
|
40
|
+
html = '<i foo:bar="baz"></i>'
|
41
|
+
doc = Nokogiri::HTML(html)
|
42
|
+
assert_equal 'baz', (doc%'i')['foo:bar']
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_css_path_round_trip
|
46
|
+
doc = Nokogiri::HTML(File.read(HTML_FILE))
|
47
|
+
%w{ #header small div[2] div.post body }.each do |css_sel|
|
48
|
+
ele = doc.at css_sel
|
49
|
+
assert_equal ele, doc.at(ele.css_path), ele.css_path
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_path_round_trip
|
54
|
+
doc = Nokogiri::HTML(File.read(HTML_FILE))
|
55
|
+
%w{ #header small div[2] div.post body }.each do |css_sel|
|
56
|
+
ele = doc.at css_sel
|
57
|
+
assert_equal ele, doc.at(ele.path), ele.path
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
def test_append_with_document
|
62
|
+
assert_raises(ArgumentError) do
|
63
|
+
@html.root << Nokogiri::HTML::Document.new
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
###
|
68
|
+
# Make sure a document that doesn't declare a meta encoding returns
|
69
|
+
# nil.
|
70
|
+
def test_meta_encoding
|
71
|
+
assert_nil @html.meta_encoding
|
72
|
+
end
|
73
|
+
|
74
|
+
def test_description
|
75
|
+
assert desc = @html.at('a.bar').description
|
76
|
+
assert_equal 'a', desc.name
|
77
|
+
end
|
78
|
+
|
79
|
+
def test_ancestors_with_selector
|
80
|
+
assert node = @html.at('a.bar').child
|
81
|
+
assert list = node.ancestors('.baz')
|
82
|
+
assert_equal 1, list.length
|
83
|
+
assert_equal 'div', list.first.name
|
84
|
+
end
|
85
|
+
|
86
|
+
def test_matches_inside_fragment
|
87
|
+
fragment = DocumentFragment.new @html
|
88
|
+
fragment << XML::Node.new('a', @html)
|
89
|
+
|
90
|
+
a = fragment.children.last
|
91
|
+
assert a.matches?('a'), 'a should match'
|
92
|
+
end
|
93
|
+
|
94
|
+
def test_css_matches?
|
95
|
+
assert node = @html.at('a.bar')
|
96
|
+
assert node.matches?('a.bar')
|
97
|
+
end
|
98
|
+
|
99
|
+
def test_xpath_matches?
|
100
|
+
assert node = @html.at('//a')
|
101
|
+
assert node.matches?('//a')
|
102
|
+
end
|
103
|
+
|
104
|
+
def test_unlink_then_swap
|
105
|
+
node = @html.at('a')
|
106
|
+
node.unlink
|
107
|
+
|
108
|
+
another_node = @html.at('div')
|
109
|
+
assert another_node, 'should have a node'
|
110
|
+
|
111
|
+
# This used to segv
|
112
|
+
assert node.add_previous_sibling another_node
|
113
|
+
end
|
114
|
+
|
115
|
+
def test_swap
|
116
|
+
@html.at('div').swap('<a href="foo">bar</a>')
|
117
|
+
a_tag = @html.css('a').first
|
118
|
+
assert_equal 'body', a_tag.parent.name
|
119
|
+
assert_equal 0, @html.css('div').length
|
120
|
+
end
|
121
|
+
|
122
|
+
def test_swap_with_regex_characters
|
123
|
+
@html.at('div').swap('<a href="foo">ba)r</a>')
|
124
|
+
a_tag = @html.css('a').first
|
125
|
+
assert_equal 'ba)r', a_tag.text
|
126
|
+
end
|
127
|
+
|
128
|
+
def test_attribute_decodes_entities
|
129
|
+
node = @html.at('div')
|
130
|
+
node['href'] = 'foo&bar'
|
131
|
+
assert_equal 'foo&bar', node['href']
|
132
|
+
node['href'] += '&baz'
|
133
|
+
assert_equal 'foo&bar&baz', node['href']
|
134
|
+
end
|
135
|
+
|
136
|
+
def test_parse_config_option
|
137
|
+
node = @html.at('div')
|
138
|
+
options = nil
|
139
|
+
node.parse("<div></div>") do |config|
|
140
|
+
options = config
|
141
|
+
end
|
142
|
+
assert_equal Nokogiri::XML::ParseOptions::DEFAULT_HTML, options.to_i
|
143
|
+
end
|
144
|
+
|
145
|
+
def test_fragment_handler_does_not_regurge_on_invalid_attributes
|
146
|
+
iframe = %Q{<iframe style="width: 0%; height: 0px" src="http://someurl" allowtransparency></iframe>}
|
147
|
+
assert @html.at('div').fragment(iframe)
|
148
|
+
end
|
149
|
+
|
150
|
+
def test_fragment
|
151
|
+
fragment = @html.fragment(<<-eohtml)
|
152
|
+
hello
|
153
|
+
<div class="foo">
|
154
|
+
<p>bar</p>
|
155
|
+
</div>
|
156
|
+
world
|
157
|
+
eohtml
|
158
|
+
assert_match(/^hello/, fragment.inner_html.strip)
|
159
|
+
assert_equal 3, fragment.children.length
|
160
|
+
assert p_tag = fragment.css('p').first
|
161
|
+
assert_equal 'div', p_tag.parent.name
|
162
|
+
assert_equal 'foo', p_tag.parent['class']
|
163
|
+
end
|
164
|
+
|
165
|
+
def test_fragment_serialization
|
166
|
+
fragment = Nokogiri::HTML.fragment("<div>foo</div>")
|
167
|
+
assert_equal "<div>foo</div>", fragment.serialize.chomp
|
168
|
+
assert_equal "<div>foo</div>", fragment.to_xml.chomp
|
169
|
+
assert_equal "<div>foo</div>", fragment.inner_html
|
170
|
+
assert_equal "<div>foo</div>", fragment.to_html
|
171
|
+
assert_equal "<div>foo</div>", fragment.to_s
|
172
|
+
end
|
173
|
+
|
174
|
+
def test_to_html_does_not_contain_entities
|
175
|
+
return unless defined?(NKF) # NKF is not implemented on Rubinius as of 2009-11-23
|
176
|
+
html = NKF.nkf("-e --msdos", <<-EOH)
|
177
|
+
<html><body>
|
178
|
+
<p> test paragraph
|
179
|
+
foo bar </p>
|
180
|
+
</body></html>
|
181
|
+
EOH
|
182
|
+
nokogiri = Nokogiri::HTML.parse(html)
|
183
|
+
|
184
|
+
if RUBY_PLATFORM =~ /java/
|
185
|
+
# NKF linebreak modes are not supported as of jruby 1.2
|
186
|
+
# see http://jira.codehaus.org/browse/JRUBY-3602 for status
|
187
|
+
assert_equal "<p>testparagraph\nfoobar</p>",
|
188
|
+
nokogiri.at("p").to_html.gsub(/ /, '')
|
189
|
+
else
|
190
|
+
assert_equal "<p>testparagraph\r\nfoobar</p>",
|
191
|
+
nokogiri.at("p").to_html.gsub(/ /, '')
|
192
|
+
end
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|
196
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
require "helper"
|
3
|
+
|
4
|
+
module Nokogiri
|
5
|
+
module HTML
|
6
|
+
if RUBY_VERSION =~ /^1\.9/
|
7
|
+
class TestNodeEncoding < Nokogiri::TestCase
|
8
|
+
def test_inner_html
|
9
|
+
doc = Nokogiri::HTML File.open(SHIFT_JIS_HTML, 'rb')
|
10
|
+
|
11
|
+
hello = "こんにちは"
|
12
|
+
|
13
|
+
contents = doc.at('h2').inner_html
|
14
|
+
assert_equal doc.encoding, contents.encoding.name
|
15
|
+
assert_match hello.encode('Shift_JIS'), contents
|
16
|
+
|
17
|
+
contents = doc.at('h2').inner_html(:encoding => 'UTF-8')
|
18
|
+
assert_match hello, contents
|
19
|
+
|
20
|
+
doc.encoding = 'UTF-8'
|
21
|
+
contents = doc.at('h2').inner_html
|
22
|
+
assert_match hello, contents
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require "helper"
|
2
|
+
|
3
|
+
module Nokogiri
|
4
|
+
module XML
|
5
|
+
class TestAdditionalNamespacesInBuilderDoc < Nokogiri::TestCase
|
6
|
+
def test_builder_namespaced_root_node_ns
|
7
|
+
b = Nokogiri::XML::Builder.new do |x|
|
8
|
+
x[:foo].RDF(:'xmlns:foo' => 'http://foo.io')
|
9
|
+
end
|
10
|
+
assert_equal 'http://foo.io', b.doc.root.namespace.href
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/bundle/jruby/1.9/gems/nokogiri-1.6.1-java/test/namespaces/test_namespaces_in_builder_doc.rb
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
require "helper"
|
2
|
+
|
3
|
+
module Nokogiri
|
4
|
+
module XML
|
5
|
+
class TestNamespacesInBuilderDoc < Nokogiri::TestCase
|
6
|
+
def setup
|
7
|
+
super
|
8
|
+
b = Nokogiri::XML::Builder.new do |x|
|
9
|
+
x.fruit(:xmlns => 'ns:fruit', :'xmlns:veg' => 'ns:veg', :'xmlns:xlink' => 'http://www.w3.org/1999/xlink') do
|
10
|
+
x.pear { x.bosc }
|
11
|
+
x.orange
|
12
|
+
x[:veg].carrot do
|
13
|
+
x.cheese(:xmlns => 'ns:dairy', :'xlink:href' => 'http://example.com/cheese/')
|
14
|
+
end
|
15
|
+
x[:meat].bacon(:'xmlns:meat' => 'ns:meat') do
|
16
|
+
x.apple :count => 2
|
17
|
+
x[:veg].tomato
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
@doc = b.doc
|
23
|
+
end
|
24
|
+
|
25
|
+
def check_namespace e
|
26
|
+
e.namespace.nil? ? nil : e.namespace.href
|
27
|
+
end
|
28
|
+
|
29
|
+
def test_builder_default_ns
|
30
|
+
assert_equal 'ns:fruit', check_namespace(@doc.root)
|
31
|
+
end
|
32
|
+
def test_builder_parent_default_ns
|
33
|
+
assert_equal 'ns:fruit', check_namespace(@doc.root.elements[0])
|
34
|
+
assert_equal 'ns:fruit', check_namespace(@doc.root.elements[1])
|
35
|
+
end
|
36
|
+
def test_builder_grandparent_default_ns
|
37
|
+
assert_equal 'ns:fruit', check_namespace(@doc.root.elements[0].elements[0])
|
38
|
+
end
|
39
|
+
def test_builder_parent_nondefault_ns
|
40
|
+
assert_equal 'ns:veg', check_namespace(@doc.root.elements[2])
|
41
|
+
end
|
42
|
+
def test_builder_single_decl_ns_1
|
43
|
+
assert_equal 'ns:dairy', check_namespace(@doc.root.elements[2].elements[0])
|
44
|
+
end
|
45
|
+
def test_builder_nondefault_attr_ns
|
46
|
+
assert_equal 'http://www.w3.org/1999/xlink',
|
47
|
+
check_namespace(@doc.root.elements[2].elements[0].attribute_nodes.find { |a| a.name =~ /href/ })
|
48
|
+
end
|
49
|
+
def test_builder_single_decl_ns_2
|
50
|
+
assert_equal 'ns:meat', check_namespace(@doc.root.elements[3])
|
51
|
+
end
|
52
|
+
def test_builder_buried_default_ns
|
53
|
+
assert_equal 'ns:fruit', check_namespace(@doc.root.elements[3].elements[0])
|
54
|
+
end
|
55
|
+
def test_builder_buried_decl_ns
|
56
|
+
assert_equal 'ns:veg', check_namespace(@doc.root.elements[3].elements[1])
|
57
|
+
end
|
58
|
+
def test_builder_namespace_count
|
59
|
+
n = @doc.root.clone
|
60
|
+
n.children.each(&:remove)
|
61
|
+
ns_attrs = n.to_xml.scan(/\bxmlns(?::.+?)?=/)
|
62
|
+
assert_equal 3, ns_attrs.length
|
63
|
+
end
|
64
|
+
|
65
|
+
def test_builder_namespaced_attribute_on_unparented_node
|
66
|
+
doc = Nokogiri::XML::Builder.new do |x|
|
67
|
+
x.root('xmlns:foo' => 'http://foo.io') {
|
68
|
+
x.obj('foo:attr' => 'baz')
|
69
|
+
}
|
70
|
+
end.doc
|
71
|
+
assert_equal 'http://foo.io', doc.root.children.first.attribute_nodes.first.namespace.href
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|