Skip to content

Commit

Permalink
Add xalan jars to fix issues with sparklemotion#1114
Browse files Browse the repository at this point in the history
  • Loading branch information
atambo committed Aug 21, 2015
1 parent 1be8831 commit a1ad684
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
24 changes: 12 additions & 12 deletions ext/java/nokogiri/XmlXpathContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
Expand Down Expand Up @@ -58,13 +58,13 @@
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

import com.sun.org.apache.xml.internal.dtm.DTM;
import com.sun.org.apache.xml.internal.utils.PrefixResolver;
import com.sun.org.apache.xpath.internal.XPathContext;
import com.sun.org.apache.xpath.internal.jaxp.JAXPExtensionsProvider;
import com.sun.org.apache.xpath.internal.jaxp.JAXPPrefixResolver;
import com.sun.org.apache.xpath.internal.jaxp.JAXPVariableStack;
import com.sun.org.apache.xpath.internal.objects.XObject;
import org.apache.xml.dtm.DTM;
import org.apache.xml.utils.PrefixResolver;
import org.apache.xpath.XPathContext;
import org.apache.xpath.jaxp.JAXPExtensionsProvider;
import org.apache.xpath.jaxp.JAXPPrefixResolver;
import org.apache.xpath.jaxp.JAXPVariableStack;
import org.apache.xpath.objects.XObject;

/**
* Class for Nokogiri::XML::XpathContext
Expand Down Expand Up @@ -110,7 +110,7 @@ private void setNode(XmlNode node) throws IllegalArgumentException, ClassNotFoun
}

private JAXPExtensionsProvider getProviderInstance() throws ClassNotFoundException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException {
Class<?> clazz = Class.forName("com.sun.org.apache.xpath.internal.jaxp.JAXPExtensionsProvider");
Class<?> clazz = Class.forName("org.apache.xpath.jaxp.JAXPExtensionsProvider");
Constructor[] constructors = clazz.getDeclaredConstructors();
for (int i = 0; i < constructors.length; i++) {
Class[] parameterTypes = constructors[i].getParameterTypes();
Expand Down Expand Up @@ -184,8 +184,8 @@ private IRubyObject tryGetNodeSet(ThreadContext thread_context, String expr) thr
Node contextNode = context.node;

try {
com.sun.org.apache.xpath.internal.XPath xpathInternal = new com.sun.org.apache.xpath.internal.XPath (expr, null,
prefixResolver, com.sun.org.apache.xpath.internal.XPath.SELECT );
org.apache.xpath.XPath xpathInternal = new org.apache.xpath.XPath (expr, null,
prefixResolver, org.apache.xpath.XPath.SELECT );

// We always need to have a ContextNode with Xalan XPath implementation
// To allow simple expression evaluation like 1+1 we are setting
Expand Down
3 changes: 3 additions & 0 deletions lib/nokogiri.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
require 'nekohtml.jar'
require 'nekodtd.jar'
require 'xercesImpl.jar'
require 'serializer.jar'
require 'xalan.jar'
require 'xml-apis.jar'
end
end

Expand Down
Binary file added lib/serializer.jar
Binary file not shown.
Binary file added lib/xalan.jar
Binary file not shown.
Binary file modified lib/xercesImpl.jar
100644 → 100755
Binary file not shown.
Binary file added lib/xml-apis.jar
Binary file not shown.

0 comments on commit a1ad684

Please sign in to comment.