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,254 @@
|
|
1
|
+
require "helper"
|
2
|
+
|
3
|
+
class TestXsltTransforms < Nokogiri::TestCase
|
4
|
+
def setup
|
5
|
+
@doc = Nokogiri::XML(File.open(XML_FILE))
|
6
|
+
end
|
7
|
+
|
8
|
+
def test_class_methods
|
9
|
+
style = Nokogiri::XSLT(File.read(XSLT_FILE))
|
10
|
+
|
11
|
+
assert result = style.apply_to(@doc, ['title', '"Grandma"'])
|
12
|
+
assert_match %r{<h1>Grandma</h1>}, result
|
13
|
+
end
|
14
|
+
|
15
|
+
def test_transform
|
16
|
+
assert style = Nokogiri::XSLT.parse(File.read(XSLT_FILE))
|
17
|
+
|
18
|
+
assert result = style.apply_to(@doc, ['title', '"Booyah"'])
|
19
|
+
assert_match %r{<h1>Booyah</h1>}, result
|
20
|
+
assert_match %r{<th.*Employee ID</th>}, result
|
21
|
+
assert_match %r{<th.*Name</th>}, result
|
22
|
+
assert_match %r{<th.*Position</th>}, result
|
23
|
+
assert_match %r{<th.*Salary</th>}, result
|
24
|
+
assert_match %r{<td>EMP0003</td>}, result
|
25
|
+
assert_match %r{<td>Margaret Martin</td>}, result
|
26
|
+
assert_match %r{<td>Computer Specialist</td>}, result
|
27
|
+
assert_match %r{<td>100,000</td>}, result
|
28
|
+
assert_no_match %r{Dallas|Texas}, result
|
29
|
+
assert_no_match %r{Female}, result
|
30
|
+
|
31
|
+
assert result = style.apply_to(@doc, ['title', '"Grandma"'])
|
32
|
+
assert_match %r{<h1>Grandma</h1>}, result
|
33
|
+
|
34
|
+
assert result = style.apply_to(@doc)
|
35
|
+
assert_match %r{<h1></h1>}, result
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_transform_with_output_style
|
39
|
+
xslt = ""
|
40
|
+
if Nokogiri.jruby?
|
41
|
+
xslt = Nokogiri::XSLT(<<-eoxslt)
|
42
|
+
<?xml version="1.0" encoding="ISO-8859-1"?>
|
43
|
+
|
44
|
+
<xsl:stylesheet version="1.0"
|
45
|
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
46
|
+
<xsl:output method="text" version="1.0"
|
47
|
+
encoding="iso-8859-1" indent="yes"/>
|
48
|
+
|
49
|
+
<xsl:param name="title"/>
|
50
|
+
|
51
|
+
<xsl:template match="/">
|
52
|
+
<html>
|
53
|
+
<body>
|
54
|
+
<xsl:for-each select="staff/employee">
|
55
|
+
<tr>
|
56
|
+
<td><xsl:value-of select="employeeId"/></td>
|
57
|
+
<td><xsl:value-of select="name"/></td>
|
58
|
+
<td><xsl:value-of select="position"/></td>
|
59
|
+
<td><xsl:value-of select="salary"/></td>
|
60
|
+
</tr>
|
61
|
+
</xsl:for-each>
|
62
|
+
</body>
|
63
|
+
</html>
|
64
|
+
</xsl:template>
|
65
|
+
|
66
|
+
</xsl:stylesheet>
|
67
|
+
eoxslt
|
68
|
+
else
|
69
|
+
xslt = Nokogiri::XSLT(<<-eoxslt)
|
70
|
+
<?xml version="1.0" encoding="ISO-8859-1"?>
|
71
|
+
|
72
|
+
<xsl:stylesheet version="1.0"
|
73
|
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
74
|
+
<xsl:output method="text" version="1.0"
|
75
|
+
encoding="iso-8859-1" indent="yes"/>
|
76
|
+
|
77
|
+
<xsl:param name="title"/>
|
78
|
+
|
79
|
+
<xsl:template match="/">
|
80
|
+
<html>
|
81
|
+
<body>
|
82
|
+
<xsl:for-each select="staff/employee">
|
83
|
+
<tr>
|
84
|
+
<td><xsl:value-of select="employeeId"/></td>
|
85
|
+
<td><xsl:value-of select="name"/></td>
|
86
|
+
<td><xsl:value-of select="position"/></td>
|
87
|
+
<td><xsl:value-of select="salary"/></td>
|
88
|
+
</tr>
|
89
|
+
</xsl:for-each>
|
90
|
+
</table>
|
91
|
+
</body>
|
92
|
+
</html>
|
93
|
+
</xsl:template>
|
94
|
+
|
95
|
+
</xsl:stylesheet>
|
96
|
+
eoxslt
|
97
|
+
end
|
98
|
+
assert_no_match(/<td>/, xslt.apply_to(@doc, ['title', 'foo']))
|
99
|
+
end
|
100
|
+
|
101
|
+
def test_transform_arg_error
|
102
|
+
assert style = Nokogiri::XSLT(File.read(XSLT_FILE))
|
103
|
+
assert_raises(TypeError) do
|
104
|
+
style.transform(@doc, :foo)
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
def test_transform_with_hash
|
109
|
+
assert style = Nokogiri::XSLT(File.read(XSLT_FILE))
|
110
|
+
result = style.transform(@doc, {'title' => '"Booyah"'})
|
111
|
+
assert result.html?
|
112
|
+
assert_equal "Booyah", result.at_css("h1").content
|
113
|
+
end
|
114
|
+
|
115
|
+
def test_transform2
|
116
|
+
assert style = Nokogiri::XSLT(File.open(XSLT_FILE))
|
117
|
+
assert result_doc = style.transform(@doc)
|
118
|
+
assert result_doc.html?
|
119
|
+
assert_equal "", result_doc.at_css("h1").content
|
120
|
+
|
121
|
+
assert style = Nokogiri::XSLT(File.read(XSLT_FILE))
|
122
|
+
assert result_doc = style.transform(@doc, ['title', '"Booyah"'])
|
123
|
+
assert result_doc.html?
|
124
|
+
assert_equal "Booyah", result_doc.at_css("h1").content
|
125
|
+
|
126
|
+
assert result_string = style.apply_to(@doc, ['title', '"Booyah"'])
|
127
|
+
assert_equal result_string, style.serialize(result_doc)
|
128
|
+
end
|
129
|
+
|
130
|
+
def test_transform_with_quote_params
|
131
|
+
assert style = Nokogiri::XSLT(File.open(XSLT_FILE))
|
132
|
+
assert result_doc = style.transform(@doc, Nokogiri::XSLT.quote_params(['title', 'Booyah']))
|
133
|
+
assert result_doc.html?
|
134
|
+
assert_equal "Booyah", result_doc.at_css("h1").content
|
135
|
+
|
136
|
+
assert style = Nokogiri::XSLT.parse(File.read(XSLT_FILE))
|
137
|
+
assert result_doc = style.transform(@doc, Nokogiri::XSLT.quote_params({'title' => 'Booyah'}))
|
138
|
+
assert result_doc.html?
|
139
|
+
assert_equal "Booyah", result_doc.at_css("h1").content
|
140
|
+
end
|
141
|
+
|
142
|
+
def test_quote_params
|
143
|
+
h = {
|
144
|
+
:sym => %{xxx},
|
145
|
+
'str' => %{"xxx"},
|
146
|
+
:sym2 => %{'xxx'},
|
147
|
+
'str2' => %{x'x'x},
|
148
|
+
:sym3 => %{x"x"x},
|
149
|
+
}
|
150
|
+
hh=h.dup
|
151
|
+
result_hash = Nokogiri::XSLT.quote_params(h)
|
152
|
+
assert_equal hh, h # non-destructive
|
153
|
+
|
154
|
+
a=h.to_a.flatten
|
155
|
+
result_array = Nokogiri::XSLT.quote_params(a)
|
156
|
+
assert_equal h.to_a.flatten, a #non-destructive
|
157
|
+
|
158
|
+
assert_equal result_array, result_hash
|
159
|
+
end
|
160
|
+
|
161
|
+
if Nokogiri.uses_libxml?
|
162
|
+
# By now, cannot get it working on JRuby, see:
|
163
|
+
# http://yokolet.blogspot.com/2010/10/pure-java-nokogiri-xslt-extension.html
|
164
|
+
def test_exslt
|
165
|
+
assert doc = Nokogiri::XML.parse(File.read(EXML_FILE))
|
166
|
+
assert doc.xml?
|
167
|
+
|
168
|
+
assert style = Nokogiri::XSLT.parse(File.read(EXSLT_FILE))
|
169
|
+
params = {
|
170
|
+
:p1 => 'xxx',
|
171
|
+
:p2 => "x'x'x",
|
172
|
+
:p3 => 'x"x"x',
|
173
|
+
:p4 => '"xxx"'
|
174
|
+
}
|
175
|
+
result_doc = Nokogiri::XML.parse(style.apply_to(doc,
|
176
|
+
Nokogiri::XSLT.quote_params(params)))
|
177
|
+
|
178
|
+
assert_equal 'func-result', result_doc.at('/root/function').content
|
179
|
+
assert_equal 3, result_doc.at('/root/max').content.to_i
|
180
|
+
assert_match(
|
181
|
+
/\d{4}-\d\d-\d\d([-|+]\d\d:\d\d)?/,
|
182
|
+
result_doc.at('/root/date').content
|
183
|
+
)
|
184
|
+
result_doc.xpath('/root/params/*').each do |p|
|
185
|
+
assert_equal p.content, params[p.name.intern]
|
186
|
+
end
|
187
|
+
check_params result_doc, params
|
188
|
+
result_doc = Nokogiri::XML.parse(style.apply_to(doc,
|
189
|
+
Nokogiri::XSLT.quote_params(params.to_a.flatten)))
|
190
|
+
check_params result_doc, params
|
191
|
+
end
|
192
|
+
|
193
|
+
def test_xslt_paramaters
|
194
|
+
xslt_str = <<-EOX
|
195
|
+
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
|
196
|
+
<xsl:template match="/">
|
197
|
+
<xsl:value-of select="$foo" />
|
198
|
+
</xsl:template>
|
199
|
+
</xsl:stylesheet>
|
200
|
+
EOX
|
201
|
+
|
202
|
+
xslt = Nokogiri::XSLT(xslt_str)
|
203
|
+
doc = Nokogiri::XML("<root />")
|
204
|
+
assert_match %r{bar}, xslt.transform(doc, Nokogiri::XSLT.quote_params('foo' => 'bar')).to_s
|
205
|
+
end
|
206
|
+
|
207
|
+
def test_xslt_transform_error
|
208
|
+
xslt_str = <<-EOX
|
209
|
+
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
|
210
|
+
<xsl:template match="/">
|
211
|
+
<xsl:value-of select="$foo" />
|
212
|
+
</xsl:template>
|
213
|
+
</xsl:stylesheet>
|
214
|
+
EOX
|
215
|
+
|
216
|
+
xslt = Nokogiri::XSLT(xslt_str)
|
217
|
+
doc = Nokogiri::XML("<root />")
|
218
|
+
assert_raises(RuntimeError) { xslt.transform(doc) }
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
|
223
|
+
def test_xslt_parse_error
|
224
|
+
xslt_str = <<-EOX
|
225
|
+
<xsl:stylesheet version="1.0"
|
226
|
+
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
|
227
|
+
<!-- Not well-formed: -->
|
228
|
+
<xsl:template match="/"/>
|
229
|
+
<values>
|
230
|
+
<xsl:for-each select="//*">
|
231
|
+
<value>
|
232
|
+
<xsl:value-of select="@id"/>
|
233
|
+
</value>
|
234
|
+
</xsl:for-each>
|
235
|
+
</values>
|
236
|
+
</xsl:template>
|
237
|
+
</xsl:stylesheet>}
|
238
|
+
EOX
|
239
|
+
assert_raises(RuntimeError) { Nokogiri::XSLT.parse(xslt_str) }
|
240
|
+
end
|
241
|
+
|
242
|
+
|
243
|
+
def test_passing_a_non_document_to_transform
|
244
|
+
xsl = Nokogiri::XSLT('<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"></xsl:stylesheet>')
|
245
|
+
assert_raises(ArgumentError) { xsl.transform("<div></div>") }
|
246
|
+
assert_raises(ArgumentError) { xsl.transform(Nokogiri::HTML("").css("body")) }
|
247
|
+
end
|
248
|
+
|
249
|
+
def check_params result_doc, params
|
250
|
+
result_doc.xpath('/root/params/*').each do |p|
|
251
|
+
assert_equal p.content, params[p.name.intern]
|
252
|
+
end
|
253
|
+
end
|
254
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require "helper"
|
2
|
+
|
3
|
+
module Nokogiri
|
4
|
+
module XML
|
5
|
+
class Node
|
6
|
+
class TestSaveOptions < Nokogiri::TestCase
|
7
|
+
SaveOptions.constants.each do |constant|
|
8
|
+
class_eval <<-EOEVAL
|
9
|
+
def test_predicate_#{constant.downcase}
|
10
|
+
options = SaveOptions.new(SaveOptions::#{constant})
|
11
|
+
assert options.#{constant.downcase}?
|
12
|
+
|
13
|
+
assert SaveOptions.new.#{constant.downcase}.#{constant.downcase}?
|
14
|
+
end
|
15
|
+
EOEVAL
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_default_xml_save_options
|
19
|
+
if Nokogiri.jruby?
|
20
|
+
assert_equal 0, (SaveOptions::DEFAULT_XML & SaveOptions::FORMAT)
|
21
|
+
else
|
22
|
+
assert_equal SaveOptions::FORMAT, (SaveOptions::DEFAULT_XML & SaveOptions::FORMAT)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require "helper"
|
2
|
+
|
3
|
+
module Nokogiri
|
4
|
+
module XML
|
5
|
+
class Node
|
6
|
+
class TestSubclass < Nokogiri::TestCase
|
7
|
+
{
|
8
|
+
Nokogiri::XML::CDATA => 'doc, "foo"',
|
9
|
+
Nokogiri::XML::Attr => 'doc, "foo"',
|
10
|
+
Nokogiri::XML::Comment => 'doc, "foo"',
|
11
|
+
Nokogiri::XML::EntityReference => 'doc, "foo"',
|
12
|
+
Nokogiri::XML::ProcessingInstruction => 'doc, "foo", "bar"',
|
13
|
+
Nokogiri::XML::DocumentFragment => 'doc',
|
14
|
+
Nokogiri::XML::Node => '"foo", doc',
|
15
|
+
Nokogiri::XML::Text => '"foo", doc',
|
16
|
+
}.each do |klass, constructor|
|
17
|
+
class_eval %{
|
18
|
+
def test_subclass_#{klass.name.gsub('::', '_')}
|
19
|
+
doc = Nokogiri::XML::Document.new
|
20
|
+
klass = Class.new(#{klass.name})
|
21
|
+
node = klass.new(#{constructor})
|
22
|
+
assert_instance_of klass, node
|
23
|
+
end
|
24
|
+
}
|
25
|
+
|
26
|
+
class_eval <<-eocode, __FILE__, __LINE__ + 1
|
27
|
+
def test_subclass_initialize_#{klass.name.gsub('::', '_')}
|
28
|
+
doc = Nokogiri::XML::Document.new
|
29
|
+
klass = Class.new(#{klass.name}) do
|
30
|
+
attr_accessor :initialized_with
|
31
|
+
|
32
|
+
def initialize *args
|
33
|
+
@initialized_with = args
|
34
|
+
end
|
35
|
+
end
|
36
|
+
node = klass.new(#{constructor}, 1)
|
37
|
+
assert_equal [#{constructor}, 1], node.initialized_with
|
38
|
+
end
|
39
|
+
eocode
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,366 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
|
3
|
+
require "helper"
|
4
|
+
|
5
|
+
module Nokogiri
|
6
|
+
module XML
|
7
|
+
module SAX
|
8
|
+
class TestParser < Nokogiri::SAX::TestCase
|
9
|
+
def setup
|
10
|
+
super
|
11
|
+
@parser = XML::SAX::Parser.new(Doc.new)
|
12
|
+
end
|
13
|
+
|
14
|
+
def test_parser_context_yielded_io
|
15
|
+
doc = Doc.new
|
16
|
+
parser = XML::SAX::Parser.new doc
|
17
|
+
xml = "<foo a='&b'/>"
|
18
|
+
|
19
|
+
block_called = false
|
20
|
+
parser.parse(StringIO.new(xml)) { |ctx|
|
21
|
+
block_called = true
|
22
|
+
ctx.replace_entities = true
|
23
|
+
}
|
24
|
+
|
25
|
+
assert block_called
|
26
|
+
|
27
|
+
assert_equal [['foo', [['a', '&b']]]], doc.start_elements
|
28
|
+
end
|
29
|
+
|
30
|
+
def test_parser_context_yielded_in_memory
|
31
|
+
doc = Doc.new
|
32
|
+
parser = XML::SAX::Parser.new doc
|
33
|
+
xml = "<foo a='&b'/>"
|
34
|
+
|
35
|
+
block_called = false
|
36
|
+
parser.parse(xml) { |ctx|
|
37
|
+
block_called = true
|
38
|
+
ctx.replace_entities = true
|
39
|
+
}
|
40
|
+
|
41
|
+
assert block_called
|
42
|
+
|
43
|
+
assert_equal [['foo', [['a', '&b']]]], doc.start_elements
|
44
|
+
end
|
45
|
+
|
46
|
+
def test_xml_decl
|
47
|
+
{
|
48
|
+
'' => nil,
|
49
|
+
'<?xml version="1.0" ?>' => ['1.0'],
|
50
|
+
'<?xml version="1.0" encoding="UTF-8" ?>' => ['1.0', 'UTF-8'],
|
51
|
+
'<?xml version="1.0" standalone="yes"?>' => ['1.0', 'yes'],
|
52
|
+
'<?xml version="1.0" standalone="no"?>' => ['1.0', 'no'],
|
53
|
+
}.each do |decl,value|
|
54
|
+
parser = XML::SAX::Parser.new(Doc.new)
|
55
|
+
|
56
|
+
xml = "#{decl}\n<root />"
|
57
|
+
parser.parse xml
|
58
|
+
assert parser.document.start_document_called, xml
|
59
|
+
assert_equal value, parser.document.xmldecls, xml
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
def test_parse_empty
|
64
|
+
assert_raises RuntimeError do
|
65
|
+
@parser.parse('')
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
def test_namespace_declaration_order_is_saved
|
70
|
+
@parser.parse <<-eoxml
|
71
|
+
<root xmlns:foo='http://foo.example.com/' xmlns='http://example.com/'>
|
72
|
+
<a foo:bar='hello' />
|
73
|
+
</root>
|
74
|
+
eoxml
|
75
|
+
assert_equal 2, @parser.document.start_elements_namespace.length
|
76
|
+
el = @parser.document.start_elements_namespace.first
|
77
|
+
namespaces = el.last
|
78
|
+
assert_equal ['foo', 'http://foo.example.com/'], namespaces.first
|
79
|
+
assert_equal [nil, 'http://example.com/'], namespaces.last
|
80
|
+
end
|
81
|
+
|
82
|
+
def test_bad_document_calls_error_handler
|
83
|
+
@parser.parse('<foo><bar></foo>')
|
84
|
+
assert @parser.document.errors
|
85
|
+
assert @parser.document.errors.length > 0
|
86
|
+
end
|
87
|
+
|
88
|
+
def test_namespace_are_super_fun_to_parse
|
89
|
+
@parser.parse <<-eoxml
|
90
|
+
<root xmlns:foo='http://foo.example.com/'>
|
91
|
+
<a foo:bar='hello' />
|
92
|
+
<b xmlns:foo='http://bar.example.com/'>
|
93
|
+
<a foo:bar='hello' />
|
94
|
+
</b>
|
95
|
+
<foo:bar>hello world</foo:bar>
|
96
|
+
</root>
|
97
|
+
eoxml
|
98
|
+
|
99
|
+
assert @parser.document.start_elements_namespace.length > 0
|
100
|
+
el = @parser.document.start_elements_namespace[1]
|
101
|
+
assert_equal 'a', el.first
|
102
|
+
assert_equal 1, el[1].length
|
103
|
+
|
104
|
+
attribute = el[1].first
|
105
|
+
assert_equal 'bar', attribute.localname
|
106
|
+
assert_equal 'foo', attribute.prefix
|
107
|
+
assert_equal 'hello', attribute.value
|
108
|
+
assert_equal 'http://foo.example.com/', attribute.uri
|
109
|
+
end
|
110
|
+
|
111
|
+
def test_sax_v1_namespace_attribute_declarations
|
112
|
+
@parser.parse <<-eoxml
|
113
|
+
<root xmlns:foo='http://foo.example.com/' xmlns='http://example.com/'>
|
114
|
+
<a foo:bar='hello' />
|
115
|
+
<b xmlns:foo='http://bar.example.com/'>
|
116
|
+
<a foo:bar='hello' />
|
117
|
+
</b>
|
118
|
+
<foo:bar>hello world</foo:bar>
|
119
|
+
</root>
|
120
|
+
eoxml
|
121
|
+
assert @parser.document.start_elements.length > 0
|
122
|
+
elm = @parser.document.start_elements.first
|
123
|
+
assert_equal 'root', elm.first
|
124
|
+
assert elm[1].include?(['xmlns:foo', 'http://foo.example.com/'])
|
125
|
+
assert elm[1].include?(['xmlns', 'http://example.com/'])
|
126
|
+
end
|
127
|
+
|
128
|
+
def test_sax_v1_namespace_nodes
|
129
|
+
@parser.parse <<-eoxml
|
130
|
+
<root xmlns:foo='http://foo.example.com/' xmlns='http://example.com/'>
|
131
|
+
<a foo:bar='hello' />
|
132
|
+
<b xmlns:foo='http://bar.example.com/'>
|
133
|
+
<a foo:bar='hello' />
|
134
|
+
</b>
|
135
|
+
<foo:bar>hello world</foo:bar>
|
136
|
+
</root>
|
137
|
+
eoxml
|
138
|
+
assert_equal 5, @parser.document.start_elements.length
|
139
|
+
assert @parser.document.start_elements.map { |se|
|
140
|
+
se.first
|
141
|
+
}.include?('foo:bar')
|
142
|
+
assert @parser.document.end_elements.map { |se|
|
143
|
+
se.first
|
144
|
+
}.include?('foo:bar')
|
145
|
+
end
|
146
|
+
|
147
|
+
def test_start_is_called_without_namespace
|
148
|
+
@parser.parse(<<-eoxml)
|
149
|
+
<root xmlns:foo='http://foo.example.com/' xmlns='http://example.com/'>
|
150
|
+
<foo:f><bar></foo:f>
|
151
|
+
</root>
|
152
|
+
eoxml
|
153
|
+
assert_equal ['root', 'foo:f', 'bar'],
|
154
|
+
@parser.document.start_elements.map { |x| x.first }
|
155
|
+
end
|
156
|
+
|
157
|
+
def test_parser_sets_encoding
|
158
|
+
parser = XML::SAX::Parser.new(Doc.new, 'UTF-8')
|
159
|
+
assert_equal 'UTF-8', parser.encoding
|
160
|
+
end
|
161
|
+
|
162
|
+
def test_errors_set_after_parsing_bad_dom
|
163
|
+
doc = Nokogiri::XML('<foo><bar></foo>')
|
164
|
+
assert doc.errors
|
165
|
+
|
166
|
+
@parser.parse('<foo><bar></foo>')
|
167
|
+
assert @parser.document.errors
|
168
|
+
assert @parser.document.errors.length > 0
|
169
|
+
|
170
|
+
if RUBY_VERSION =~ /^1\.9/
|
171
|
+
doc.errors.each do |error|
|
172
|
+
assert_equal 'UTF-8', error.message.encoding.name
|
173
|
+
end
|
174
|
+
end
|
175
|
+
|
176
|
+
# when using JRuby Nokogiri, more errors will be generated as the DOM
|
177
|
+
# parser continue to parse an ill formed document, while the sax parser
|
178
|
+
# will stop at the first error
|
179
|
+
unless Nokogiri.jruby?
|
180
|
+
assert_equal doc.errors.length, @parser.document.errors.length
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
def test_parse_with_memory_argument
|
185
|
+
@parser.parse(File.read(XML_FILE))
|
186
|
+
assert(@parser.document.cdata_blocks.length > 0)
|
187
|
+
end
|
188
|
+
|
189
|
+
def test_parse_with_io_argument
|
190
|
+
File.open(XML_FILE, 'rb') { |f|
|
191
|
+
@parser.parse(f)
|
192
|
+
}
|
193
|
+
assert(@parser.document.cdata_blocks.length > 0)
|
194
|
+
end
|
195
|
+
|
196
|
+
def test_parse_io
|
197
|
+
call_parse_io_with_encoding 'UTF-8'
|
198
|
+
end
|
199
|
+
|
200
|
+
# issue #828
|
201
|
+
def test_parse_io_lower_case_encoding
|
202
|
+
call_parse_io_with_encoding 'utf-8'
|
203
|
+
end
|
204
|
+
|
205
|
+
def call_parse_io_with_encoding encoding
|
206
|
+
File.open(XML_FILE, 'rb') { |f|
|
207
|
+
@parser.parse_io(f, encoding)
|
208
|
+
}
|
209
|
+
assert(@parser.document.cdata_blocks.length > 0)
|
210
|
+
if RUBY_VERSION =~ /^1\.9/
|
211
|
+
called = false
|
212
|
+
@parser.document.start_elements.flatten.each do |thing|
|
213
|
+
assert_equal 'UTF-8', thing.encoding.name
|
214
|
+
called = true
|
215
|
+
end
|
216
|
+
assert called
|
217
|
+
|
218
|
+
called = false
|
219
|
+
@parser.document.end_elements.flatten.each do |thing|
|
220
|
+
assert_equal 'UTF-8', thing.encoding.name
|
221
|
+
called = true
|
222
|
+
end
|
223
|
+
assert called
|
224
|
+
|
225
|
+
called = false
|
226
|
+
@parser.document.data.each do |thing|
|
227
|
+
assert_equal 'UTF-8', thing.encoding.name
|
228
|
+
called = true
|
229
|
+
end
|
230
|
+
assert called
|
231
|
+
|
232
|
+
called = false
|
233
|
+
@parser.document.comments.flatten.each do |thing|
|
234
|
+
assert_equal 'UTF-8', thing.encoding.name
|
235
|
+
called = true
|
236
|
+
end
|
237
|
+
assert called
|
238
|
+
|
239
|
+
called = false
|
240
|
+
@parser.document.cdata_blocks.flatten.each do |thing|
|
241
|
+
assert_equal 'UTF-8', thing.encoding.name
|
242
|
+
called = true
|
243
|
+
end
|
244
|
+
assert called
|
245
|
+
end
|
246
|
+
end
|
247
|
+
|
248
|
+
def test_parse_file
|
249
|
+
@parser.parse_file(XML_FILE)
|
250
|
+
|
251
|
+
assert_raises(ArgumentError) {
|
252
|
+
@parser.parse_file(nil)
|
253
|
+
}
|
254
|
+
|
255
|
+
assert_raises(Errno::ENOENT) {
|
256
|
+
@parser.parse_file('')
|
257
|
+
}
|
258
|
+
assert_raises(Errno::EISDIR) {
|
259
|
+
@parser.parse_file(File.expand_path(File.dirname(__FILE__)))
|
260
|
+
}
|
261
|
+
end
|
262
|
+
|
263
|
+
def test_render_parse_nil_param
|
264
|
+
assert_raises(ArgumentError) { @parser.parse_memory(nil) }
|
265
|
+
end
|
266
|
+
|
267
|
+
def test_bad_encoding_args
|
268
|
+
assert_raises(ArgumentError) { XML::SAX::Parser.new(Doc.new, 'not an encoding') }
|
269
|
+
assert_raises(ArgumentError) { @parser.parse_io(StringIO.new('<root/>'), 'not an encoding')}
|
270
|
+
end
|
271
|
+
|
272
|
+
def test_ctag
|
273
|
+
@parser.parse_memory(<<-eoxml)
|
274
|
+
<p id="asdfasdf">
|
275
|
+
<![CDATA[ This is a comment ]]>
|
276
|
+
Paragraph 1
|
277
|
+
</p>
|
278
|
+
eoxml
|
279
|
+
assert_equal [' This is a comment '], @parser.document.cdata_blocks
|
280
|
+
end
|
281
|
+
|
282
|
+
def test_comment
|
283
|
+
@parser.parse_memory(<<-eoxml)
|
284
|
+
<p id="asdfasdf">
|
285
|
+
<!-- This is a comment -->
|
286
|
+
Paragraph 1
|
287
|
+
</p>
|
288
|
+
eoxml
|
289
|
+
assert_equal [' This is a comment '], @parser.document.comments
|
290
|
+
end
|
291
|
+
|
292
|
+
def test_characters
|
293
|
+
@parser.parse_memory(<<-eoxml)
|
294
|
+
<p id="asdfasdf">Paragraph 1</p>
|
295
|
+
eoxml
|
296
|
+
assert_equal ['Paragraph 1'], @parser.document.data
|
297
|
+
end
|
298
|
+
|
299
|
+
def test_end_document
|
300
|
+
@parser.parse_memory(<<-eoxml)
|
301
|
+
<p id="asdfasdf">Paragraph 1</p>
|
302
|
+
eoxml
|
303
|
+
assert @parser.document.end_document_called
|
304
|
+
end
|
305
|
+
|
306
|
+
def test_end_element
|
307
|
+
@parser.parse_memory(<<-eoxml)
|
308
|
+
<p id="asdfasdf">Paragraph 1</p>
|
309
|
+
eoxml
|
310
|
+
assert_equal [["p"]],
|
311
|
+
@parser.document.end_elements
|
312
|
+
end
|
313
|
+
|
314
|
+
def test_start_element_attrs
|
315
|
+
@parser.parse_memory(<<-eoxml)
|
316
|
+
<p id="asdfasdf">Paragraph 1</p>
|
317
|
+
eoxml
|
318
|
+
assert_equal [["p", [["id", "asdfasdf"]]]],
|
319
|
+
@parser.document.start_elements
|
320
|
+
end
|
321
|
+
|
322
|
+
def test_start_element_attrs_include_namespaces
|
323
|
+
@parser.parse_memory(<<-eoxml)
|
324
|
+
<p xmlns:foo='http://foo.example.com/'>Paragraph 1</p>
|
325
|
+
eoxml
|
326
|
+
assert_equal [["p", [['xmlns:foo', 'http://foo.example.com/']]]],
|
327
|
+
@parser.document.start_elements
|
328
|
+
end
|
329
|
+
|
330
|
+
def test_processing_instruction
|
331
|
+
@parser.parse_memory(<<-eoxml)
|
332
|
+
<?xml-stylesheet href="a.xsl" type="text/xsl"?>
|
333
|
+
<?xml version="1.0"?>
|
334
|
+
eoxml
|
335
|
+
assert_equal [['xml-stylesheet', 'href="a.xsl" type="text/xsl"']],
|
336
|
+
@parser.document.processing_instructions
|
337
|
+
end
|
338
|
+
|
339
|
+
if Nokogiri.uses_libxml? # JRuby SAXParser only parses well-formed XML documents
|
340
|
+
def test_parse_document
|
341
|
+
@parser.parse_memory(<<-eoxml)
|
342
|
+
<p>Paragraph 1</p>
|
343
|
+
<p>Paragraph 2</p>
|
344
|
+
eoxml
|
345
|
+
end
|
346
|
+
end
|
347
|
+
|
348
|
+
def test_parser_attributes
|
349
|
+
xml = <<-eoxml
|
350
|
+
<?xml version="1.0" ?><root><foo a="&b" c=">d" /></root>
|
351
|
+
eoxml
|
352
|
+
|
353
|
+
block_called = false
|
354
|
+
@parser.parse(xml) { |ctx|
|
355
|
+
block_called = true
|
356
|
+
ctx.replace_entities = true
|
357
|
+
}
|
358
|
+
|
359
|
+
assert block_called
|
360
|
+
|
361
|
+
assert_equal [['root', []], ['foo', [['a', '&b'], ['c', '>d']]]], @parser.document.start_elements
|
362
|
+
end
|
363
|
+
end
|
364
|
+
end
|
365
|
+
end
|
366
|
+
end
|