diff options
Diffstat (limited to 'recipes-core/xml-commons/dom4j-1.6.1')
-rw-r--r-- | recipes-core/xml-commons/dom4j-1.6.1/debian.patch | 1628 |
1 files changed, 1628 insertions, 0 deletions
diff --git a/recipes-core/xml-commons/dom4j-1.6.1/debian.patch b/recipes-core/xml-commons/dom4j-1.6.1/debian.patch new file mode 100644 index 0000000..87fda85 --- /dev/null +++ b/recipes-core/xml-commons/dom4j-1.6.1/debian.patch | |||
@@ -0,0 +1,1628 @@ | |||
1 | --- dom4j-1.6.1+dfsg.orig/src/java/org/jaxen/dom4j/DocumentNavigator.java | ||
2 | +++ dom4j-1.6.1+dfsg/src/java/org/jaxen/dom4j/DocumentNavigator.java | ||
3 | @@ -0,0 +1,501 @@ | ||
4 | +package org.jaxen.dom4j; | ||
5 | + | ||
6 | +/* | ||
7 | + * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/dom4j/DocumentNavigator.java,v 1.33 2006/07/03 13:17:30 elharo Exp $ | ||
8 | + * $Revision: 1.33 $ | ||
9 | + * $Date: 2006/07/03 13:17:30 $ | ||
10 | + * | ||
11 | + * ==================================================================== | ||
12 | + * | ||
13 | + * Copyright 2000-2005 bob mcwhirter & James Strachan. | ||
14 | + * All rights reserved. | ||
15 | + * | ||
16 | + * | ||
17 | + * Redistribution and use in source and binary forms, with or without | ||
18 | + * modification, are permitted provided that the following conditions are | ||
19 | + * met: | ||
20 | + * | ||
21 | + * * Redistributions of source code must retain the above copyright | ||
22 | + * notice, this list of conditions and the following disclaimer. | ||
23 | + * | ||
24 | + * * Redistributions in binary form must reproduce the above copyright | ||
25 | + * notice, this list of conditions and the following disclaimer in the | ||
26 | + * documentation and/or other materials provided with the distribution. | ||
27 | + * | ||
28 | + * * Neither the name of the Jaxen Project nor the names of its | ||
29 | + * contributors may be used to endorse or promote products derived | ||
30 | + * from this software without specific prior written permission. | ||
31 | + * | ||
32 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | ||
33 | + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | ||
34 | + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A | ||
35 | + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER | ||
36 | + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
37 | + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
38 | + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
39 | + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
40 | + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
41 | + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
42 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
43 | + * | ||
44 | + * ==================================================================== | ||
45 | + * This software consists of voluntary contributions made by many | ||
46 | + * individuals on behalf of the Jaxen Project and was originally | ||
47 | + * created by bob mcwhirter <bob@werken.com> and | ||
48 | + * James Strachan <jstrachan@apache.org>. For more information on the | ||
49 | + * Jaxen Project, please see <http://www.jaxen.org/>. | ||
50 | + * | ||
51 | + * $Id: DocumentNavigator.java,v 1.33 2006/07/03 13:17:30 elharo Exp $ | ||
52 | +*/ | ||
53 | + | ||
54 | +import java.util.ArrayList; | ||
55 | +import java.util.HashSet; | ||
56 | +import java.util.Iterator; | ||
57 | +import java.util.List; | ||
58 | + | ||
59 | +import org.dom4j.Attribute; | ||
60 | +import org.dom4j.Branch; | ||
61 | +import org.dom4j.CDATA; | ||
62 | +import org.dom4j.Comment; | ||
63 | +import org.dom4j.Document; | ||
64 | +import org.dom4j.DocumentException; | ||
65 | +import org.dom4j.Element; | ||
66 | +import org.dom4j.Namespace; | ||
67 | +import org.dom4j.Node; | ||
68 | +import org.dom4j.ProcessingInstruction; | ||
69 | +import org.dom4j.QName; | ||
70 | +import org.dom4j.Text; | ||
71 | +import org.dom4j.io.SAXReader; | ||
72 | +import org.jaxen.DefaultNavigator; | ||
73 | +import org.jaxen.FunctionCallException; | ||
74 | +import org.jaxen.NamedAccessNavigator; | ||
75 | +import org.jaxen.Navigator; | ||
76 | +import org.jaxen.XPath; | ||
77 | +import org.jaxen.JaxenConstants; | ||
78 | +import org.jaxen.saxpath.SAXPathException; | ||
79 | +import org.jaxen.util.SingleObjectIterator; | ||
80 | + | ||
81 | +/** | ||
82 | + * Interface for navigating around the DOM4J object model. | ||
83 | + * | ||
84 | + * <p> | ||
85 | + * This class is not intended for direct usage, but is | ||
86 | + * used by the Jaxen engine during evaluation. | ||
87 | + * </p> | ||
88 | + * | ||
89 | + * @see XPath | ||
90 | + * | ||
91 | + * @author <a href="mailto:bob@werken.com">bob mcwhirter</a> | ||
92 | + * @author Stephen Colebourne | ||
93 | + */ | ||
94 | +public class DocumentNavigator extends DefaultNavigator implements NamedAccessNavigator | ||
95 | +{ | ||
96 | + | ||
97 | + /** | ||
98 | + * | ||
99 | + */ | ||
100 | + private static final long serialVersionUID = 5582300797286535936L; | ||
101 | + private transient SAXReader reader; | ||
102 | + | ||
103 | + /** Singleton implementation. | ||
104 | + */ | ||
105 | + private static class Singleton | ||
106 | + { | ||
107 | + /** Singleton instance. | ||
108 | + */ | ||
109 | + private static DocumentNavigator instance = new DocumentNavigator(); | ||
110 | + } | ||
111 | + | ||
112 | + /** Retrieve the singleton instance of this <code>DocumentNavigator</code>. | ||
113 | + */ | ||
114 | + public static Navigator getInstance() | ||
115 | + { | ||
116 | + return Singleton.instance; | ||
117 | + } | ||
118 | + | ||
119 | + public boolean isElement(Object obj) | ||
120 | + { | ||
121 | + return obj instanceof Element; | ||
122 | + } | ||
123 | + | ||
124 | + public boolean isComment(Object obj) | ||
125 | + { | ||
126 | + return obj instanceof Comment; | ||
127 | + } | ||
128 | + | ||
129 | + public boolean isText(Object obj) | ||
130 | + { | ||
131 | + return ( obj instanceof Text | ||
132 | + || | ||
133 | + obj instanceof CDATA ); | ||
134 | + } | ||
135 | + | ||
136 | + public boolean isAttribute(Object obj) | ||
137 | + { | ||
138 | + return obj instanceof Attribute; | ||
139 | + } | ||
140 | + | ||
141 | + public boolean isProcessingInstruction(Object obj) | ||
142 | + { | ||
143 | + return obj instanceof ProcessingInstruction; | ||
144 | + } | ||
145 | + | ||
146 | + public boolean isDocument(Object obj) | ||
147 | + { | ||
148 | + return obj instanceof Document; | ||
149 | + } | ||
150 | + | ||
151 | + public boolean isNamespace(Object obj) | ||
152 | + { | ||
153 | + return obj instanceof Namespace; | ||
154 | + } | ||
155 | + | ||
156 | + public String getElementName(Object obj) | ||
157 | + { | ||
158 | + Element elem = (Element) obj; | ||
159 | + | ||
160 | + return elem.getName(); | ||
161 | + } | ||
162 | + | ||
163 | + public String getElementNamespaceUri(Object obj) | ||
164 | + { | ||
165 | + Element elem = (Element) obj; | ||
166 | + | ||
167 | + String uri = elem.getNamespaceURI(); | ||
168 | + if ( uri == null) | ||
169 | + return ""; | ||
170 | + else | ||
171 | + return uri; | ||
172 | + } | ||
173 | + | ||
174 | + public String getElementQName(Object obj) | ||
175 | + { | ||
176 | + Element elem = (Element) obj; | ||
177 | + | ||
178 | + return elem.getQualifiedName(); | ||
179 | + } | ||
180 | + | ||
181 | + public String getAttributeName(Object obj) | ||
182 | + { | ||
183 | + Attribute attr = (Attribute) obj; | ||
184 | + | ||
185 | + return attr.getName(); | ||
186 | + } | ||
187 | + | ||
188 | + public String getAttributeNamespaceUri(Object obj) | ||
189 | + { | ||
190 | + Attribute attr = (Attribute) obj; | ||
191 | + | ||
192 | + String uri = attr.getNamespaceURI(); | ||
193 | + if ( uri == null) | ||
194 | + return ""; | ||
195 | + else | ||
196 | + return uri; | ||
197 | + } | ||
198 | + | ||
199 | + public String getAttributeQName(Object obj) | ||
200 | + { | ||
201 | + Attribute attr = (Attribute) obj; | ||
202 | + | ||
203 | + return attr.getQualifiedName(); | ||
204 | + } | ||
205 | + | ||
206 | + public Iterator getChildAxisIterator(Object contextNode) | ||
207 | + { | ||
208 | + Iterator result = null; | ||
209 | + if ( contextNode instanceof Branch ) | ||
210 | + { | ||
211 | + Branch node = (Branch) contextNode; | ||
212 | + result = node.nodeIterator(); | ||
213 | + } | ||
214 | + if (result != null) { | ||
215 | + return result; | ||
216 | + } | ||
217 | + return JaxenConstants.EMPTY_ITERATOR; | ||
218 | + } | ||
219 | + | ||
220 | + /** | ||
221 | + * Retrieves an <code>Iterator</code> over the child elements that | ||
222 | + * match the supplied name. | ||
223 | + * | ||
224 | + * @param contextNode the origin context node | ||
225 | + * @param localName the local name of the children to return, always present | ||
226 | + * @param namespacePrefix the prefix of the namespace of the children to return | ||
227 | + * @param namespaceURI the uri of the namespace of the children to return | ||
228 | + * | ||
229 | + * @return an Iterator that traverses the named children, or null if none | ||
230 | + */ | ||
231 | + public Iterator getChildAxisIterator( | ||
232 | + Object contextNode, String localName, String namespacePrefix, String namespaceURI) { | ||
233 | + | ||
234 | + if ( contextNode instanceof Element ) { | ||
235 | + Element node = (Element) contextNode; | ||
236 | + return node.elementIterator(QName.get(localName, namespacePrefix, namespaceURI)); | ||
237 | + } | ||
238 | + if ( contextNode instanceof Document ) { | ||
239 | + Document node = (Document) contextNode; | ||
240 | + Element el = node.getRootElement(); | ||
241 | + if (el == null || el.getName().equals(localName) == false) { | ||
242 | + return JaxenConstants.EMPTY_ITERATOR; | ||
243 | + } | ||
244 | + if (namespaceURI != null) { | ||
245 | + if (namespaceURI.equals(el.getNamespaceURI()) == false) { | ||
246 | + return JaxenConstants.EMPTY_ITERATOR; | ||
247 | + } | ||
248 | + } | ||
249 | + return new SingleObjectIterator(el); | ||
250 | + } | ||
251 | + | ||
252 | + return JaxenConstants.EMPTY_ITERATOR; | ||
253 | + } | ||
254 | + | ||
255 | + public Iterator getParentAxisIterator(Object contextNode) | ||
256 | + { | ||
257 | + if ( contextNode instanceof Document ) | ||
258 | + { | ||
259 | + return JaxenConstants.EMPTY_ITERATOR; | ||
260 | + } | ||
261 | + | ||
262 | + Node node = (Node) contextNode; | ||
263 | + | ||
264 | + Object parent = node.getParent(); | ||
265 | + | ||
266 | + if ( parent == null ) | ||
267 | + { | ||
268 | + parent = node.getDocument(); | ||
269 | + } | ||
270 | + | ||
271 | + return new SingleObjectIterator( parent ); | ||
272 | + } | ||
273 | + | ||
274 | + public Iterator getAttributeAxisIterator(Object contextNode) | ||
275 | + { | ||
276 | + if ( ! ( contextNode instanceof Element ) ) | ||
277 | + { | ||
278 | + return JaxenConstants.EMPTY_ITERATOR; | ||
279 | + } | ||
280 | + | ||
281 | + Element elem = (Element) contextNode; | ||
282 | + | ||
283 | + return elem.attributeIterator(); | ||
284 | + } | ||
285 | + | ||
286 | + /** | ||
287 | + * Retrieves an <code>Iterator</code> over the attribute elements that | ||
288 | + * match the supplied name. | ||
289 | + * | ||
290 | + * @param contextNode the origin context node | ||
291 | + * @param localName the local name of the attributes to return, always present | ||
292 | + * @param namespacePrefix the prefix of the namespace of the attributes to return | ||
293 | + * @param namespaceURI the URI of the namespace of the attributes to return | ||
294 | + * @return an Iterator that traverses the named attributes, not null | ||
295 | + */ | ||
296 | + public Iterator getAttributeAxisIterator( | ||
297 | + Object contextNode, String localName, String namespacePrefix, String namespaceURI) { | ||
298 | + | ||
299 | + if ( contextNode instanceof Element ) { | ||
300 | + Element node = (Element) contextNode; | ||
301 | + Attribute attr = node.attribute(QName.get(localName, namespacePrefix, namespaceURI)); | ||
302 | + if (attr == null) { | ||
303 | + return JaxenConstants.EMPTY_ITERATOR; | ||
304 | + } | ||
305 | + return new SingleObjectIterator(attr); | ||
306 | + } | ||
307 | + return JaxenConstants.EMPTY_ITERATOR; | ||
308 | + } | ||
309 | + | ||
310 | + public Iterator getNamespaceAxisIterator(Object contextNode) | ||
311 | + { | ||
312 | + if ( ! ( contextNode instanceof Element ) ) | ||
313 | + { | ||
314 | + return JaxenConstants.EMPTY_ITERATOR; | ||
315 | + } | ||
316 | + | ||
317 | + Element element = (Element) contextNode; | ||
318 | + List nsList = new ArrayList(); | ||
319 | + HashSet prefixes = new HashSet(); | ||
320 | + for ( Element context = element; context != null; context = context.getParent() ) { | ||
321 | + List declaredNS = new ArrayList(context.declaredNamespaces()); | ||
322 | + declaredNS.add(context.getNamespace()); | ||
323 | + | ||
324 | + for ( Iterator iter = context.attributes().iterator(); iter.hasNext(); ) | ||
325 | + { | ||
326 | + Attribute attr = (Attribute) iter.next(); | ||
327 | + declaredNS.add(attr.getNamespace()); | ||
328 | + } | ||
329 | + | ||
330 | + for ( Iterator iter = declaredNS.iterator(); iter.hasNext(); ) | ||
331 | + { | ||
332 | + Namespace namespace = (Namespace) iter.next(); | ||
333 | + if (namespace != Namespace.NO_NAMESPACE) | ||
334 | + { | ||
335 | + String prefix = namespace.getPrefix(); | ||
336 | + if ( ! prefixes.contains( prefix ) ) { | ||
337 | + prefixes.add( prefix ); | ||
338 | + nsList.add( namespace.asXPathResult( element ) ); | ||
339 | + } | ||
340 | + } | ||
341 | + } | ||
342 | + } | ||
343 | + nsList.add( Namespace.XML_NAMESPACE.asXPathResult( element ) ); | ||
344 | + return nsList.iterator(); | ||
345 | + } | ||
346 | + | ||
347 | + public Object getDocumentNode(Object contextNode) | ||
348 | + { | ||
349 | + if ( contextNode instanceof Document ) | ||
350 | + { | ||
351 | + return contextNode; | ||
352 | + } | ||
353 | + else if ( contextNode instanceof Node ) | ||
354 | + { | ||
355 | + Node node = (Node) contextNode; | ||
356 | + return node.getDocument(); | ||
357 | + } | ||
358 | + return null; | ||
359 | + } | ||
360 | + | ||
361 | + /** Returns a parsed form of the given XPath string, which will be suitable | ||
362 | + * for queries on DOM4J documents. | ||
363 | + */ | ||
364 | + public XPath parseXPath (String xpath) throws SAXPathException | ||
365 | + { | ||
366 | + return new Dom4jXPath(xpath); | ||
367 | + } | ||
368 | + | ||
369 | + public Object getParentNode(Object contextNode) | ||
370 | + { | ||
371 | + if ( contextNode instanceof Node ) | ||
372 | + { | ||
373 | + Node node = (Node) contextNode; | ||
374 | + Object answer = node.getParent(); | ||
375 | + if ( answer == null ) | ||
376 | + { | ||
377 | + answer = node.getDocument(); | ||
378 | + if (answer == contextNode) { | ||
379 | + return null; | ||
380 | + } | ||
381 | + } | ||
382 | + return answer; | ||
383 | + } | ||
384 | + return null; | ||
385 | + } | ||
386 | + | ||
387 | + public String getTextStringValue(Object obj) | ||
388 | + { | ||
389 | + return getNodeStringValue( (Node) obj ); | ||
390 | + } | ||
391 | + | ||
392 | + public String getElementStringValue(Object obj) | ||
393 | + { | ||
394 | + return getNodeStringValue( (Node) obj ); | ||
395 | + } | ||
396 | + | ||
397 | + public String getAttributeStringValue(Object obj) | ||
398 | + { | ||
399 | + return getNodeStringValue( (Node) obj ); | ||
400 | + } | ||
401 | + | ||
402 | + private String getNodeStringValue(Node node) | ||
403 | + { | ||
404 | + return node.getStringValue(); | ||
405 | + } | ||
406 | + | ||
407 | + public String getNamespaceStringValue(Object obj) | ||
408 | + { | ||
409 | + Namespace ns = (Namespace) obj; | ||
410 | + | ||
411 | + return ns.getURI(); | ||
412 | + } | ||
413 | + | ||
414 | + public String getNamespacePrefix(Object obj) | ||
415 | + { | ||
416 | + Namespace ns = (Namespace) obj; | ||
417 | + | ||
418 | + return ns.getPrefix(); | ||
419 | + } | ||
420 | + | ||
421 | + public String getCommentStringValue(Object obj) | ||
422 | + { | ||
423 | + Comment cmt = (Comment) obj; | ||
424 | + | ||
425 | + return cmt.getText(); | ||
426 | + } | ||
427 | + | ||
428 | + public String translateNamespacePrefixToUri(String prefix, Object context) | ||
429 | + { | ||
430 | + Element element = null; | ||
431 | + if ( context instanceof Element ) | ||
432 | + { | ||
433 | + element = (Element) context; | ||
434 | + } | ||
435 | + else if ( context instanceof Node ) | ||
436 | + { | ||
437 | + Node node = (Node) context; | ||
438 | + element = node.getParent(); | ||
439 | + } | ||
440 | + if ( element != null ) | ||
441 | + { | ||
442 | + Namespace namespace = element.getNamespaceForPrefix( prefix ); | ||
443 | + | ||
444 | + if ( namespace != null ) | ||
445 | + { | ||
446 | + return namespace.getURI(); | ||
447 | + } | ||
448 | + } | ||
449 | + return null; | ||
450 | + } | ||
451 | + | ||
452 | + public short getNodeType(Object node) | ||
453 | + { | ||
454 | + if ( node instanceof Node ) | ||
455 | + { | ||
456 | + return ((Node) node).getNodeType(); | ||
457 | + } | ||
458 | + return 0; | ||
459 | + } | ||
460 | + | ||
461 | + public Object getDocument(String uri) throws FunctionCallException | ||
462 | + { | ||
463 | + try | ||
464 | + { | ||
465 | + return getSAXReader().read( uri ); | ||
466 | + } | ||
467 | + catch (DocumentException e) | ||
468 | + { | ||
469 | + throw new FunctionCallException("Failed to parse document for URI: " + uri, e); | ||
470 | + } | ||
471 | + } | ||
472 | + | ||
473 | + public String getProcessingInstructionTarget(Object obj) | ||
474 | + { | ||
475 | + ProcessingInstruction pi = (ProcessingInstruction) obj; | ||
476 | + | ||
477 | + return pi.getTarget(); | ||
478 | + } | ||
479 | + | ||
480 | + public String getProcessingInstructionData(Object obj) | ||
481 | + { | ||
482 | + ProcessingInstruction pi = (ProcessingInstruction) obj; | ||
483 | + | ||
484 | + return pi.getText(); | ||
485 | + } | ||
486 | + | ||
487 | + // Properties | ||
488 | + //------------------------------------------------------------------------- | ||
489 | + public SAXReader getSAXReader() | ||
490 | + { | ||
491 | + if ( reader == null ) | ||
492 | + { | ||
493 | + reader = new SAXReader(); | ||
494 | + reader.setMergeAdjacentText( true ); | ||
495 | + } | ||
496 | + return reader; | ||
497 | + } | ||
498 | + | ||
499 | + public void setSAXReader(SAXReader reader) | ||
500 | + { | ||
501 | + this.reader = reader; | ||
502 | + } | ||
503 | + | ||
504 | +} | ||
505 | --- dom4j-1.6.1+dfsg.orig/src/java/org/jaxen/dom4j/Dom4jXPath.java | ||
506 | +++ dom4j-1.6.1+dfsg/src/java/org/jaxen/dom4j/Dom4jXPath.java | ||
507 | @@ -0,0 +1,94 @@ | ||
508 | +/* | ||
509 | + * $Header: /home/projects/jaxen/scm/jaxen/src/java/main/org/jaxen/dom4j/Dom4jXPath.java,v 1.8 2006/06/03 20:44:53 elharo Exp $ | ||
510 | + * $Revision: 1.8 $ | ||
511 | + * $Date: 2006/06/03 20:44:53 $ | ||
512 | + * | ||
513 | + * ==================================================================== | ||
514 | + * | ||
515 | + * Copyright 2000-2002 bob mcwhirter & James Strachan. | ||
516 | + * All rights reserved. | ||
517 | + * | ||
518 | + * Redistribution and use in source and binary forms, with or without | ||
519 | + * modification, are permitted provided that the following conditions are | ||
520 | + * met: | ||
521 | + * | ||
522 | + * * Redistributions of source code must retain the above copyright | ||
523 | + * notice, this list of conditions and the following disclaimer. | ||
524 | + * | ||
525 | + * * Redistributions in binary form must reproduce the above copyright | ||
526 | + * notice, this list of conditions and the following disclaimer in the | ||
527 | + * documentation and/or other materials provided with the distribution. | ||
528 | + * | ||
529 | + * * Neither the name of the Jaxen Project nor the names of its | ||
530 | + * contributors may be used to endorse or promote products derived | ||
531 | + * from this software without specific prior written permission. | ||
532 | + * | ||
533 | + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS | ||
534 | + * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | ||
535 | + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A | ||
536 | + * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER | ||
537 | + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
538 | + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
539 | + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
540 | + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
541 | + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
542 | + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
543 | + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
544 | + * | ||
545 | + * ==================================================================== | ||
546 | + * This software consists of voluntary contributions made by many | ||
547 | + * individuals on behalf of the Jaxen Project and was originally | ||
548 | + * created by bob mcwhirter <bob@werken.com> and | ||
549 | + * James Strachan <jstrachan@apache.org>. For more information on the | ||
550 | + * Jaxen Project, please see <http://www.jaxen.org/>. | ||
551 | + * | ||
552 | + * $Id: Dom4jXPath.java,v 1.8 2006/06/03 20:44:53 elharo Exp $ | ||
553 | + */ | ||
554 | + | ||
555 | + | ||
556 | + | ||
557 | +package org.jaxen.dom4j; | ||
558 | + | ||
559 | +import org.jaxen.BaseXPath; | ||
560 | +import org.jaxen.JaxenException; | ||
561 | + | ||
562 | +/** An XPath implementation for the dom4j model | ||
563 | + * | ||
564 | + * <p>This is the main entry point for matching an XPath against a DOM | ||
565 | + * tree. You create a compiled XPath object, then match it against | ||
566 | + * one or more context nodes using the {@link #selectNodes(Object)} | ||
567 | + * method, as in the following example:</p> | ||
568 | + * | ||
569 | + * <pre> | ||
570 | + * Node node = ...; | ||
571 | + * XPath path = new Dom4jXPath("a/b/c"); | ||
572 | + * List results = path.selectNodes(node); | ||
573 | + * </pre> | ||
574 | + * | ||
575 | + * @see BaseXPath | ||
576 | + * @see <a href="http://dom4j.org/">The dom4j website</a> | ||
577 | + * | ||
578 | + * @author <a href="mailto:bob@werken.com">bob mcwhirter</a> | ||
579 | + * @author <a href="mailto:jstachan@apache.org">James Strachan</a> | ||
580 | + * | ||
581 | + * @version $Revision: 1.8 $ | ||
582 | + */ | ||
583 | +public class Dom4jXPath extends BaseXPath | ||
584 | +{ | ||
585 | + /** | ||
586 | + * | ||
587 | + */ | ||
588 | + private static final long serialVersionUID = -75510941087659775L; | ||
589 | + | ||
590 | + /** Construct given an XPath expression string. | ||
591 | + * | ||
592 | + * @param xpathExpr the XPath expression | ||
593 | + * | ||
594 | + * @throws JaxenException if there is a syntax error while | ||
595 | + * parsing the expression | ||
596 | + */ | ||
597 | + public Dom4jXPath(String xpathExpr) throws JaxenException | ||
598 | + { | ||
599 | + super( xpathExpr, DocumentNavigator.getInstance() ); | ||
600 | + } | ||
601 | +} | ||
602 | --- dom4j-1.6.1+dfsg.orig/src/java/org/dom4j/dom/DOMAttribute.java | ||
603 | +++ dom4j-1.6.1+dfsg/src/java/org/dom4j/dom/DOMAttribute.java | ||
604 | @@ -14,7 +14,10 @@ | ||
605 | import org.w3c.dom.DOMException; | ||
606 | import org.w3c.dom.Document; | ||
607 | import org.w3c.dom.NamedNodeMap; | ||
608 | +import org.w3c.dom.Node; | ||
609 | import org.w3c.dom.NodeList; | ||
610 | +import org.w3c.dom.TypeInfo; | ||
611 | +import org.w3c.dom.UserDataHandler; | ||
612 | |||
613 | /** | ||
614 | * <p> | ||
615 | @@ -179,6 +182,76 @@ | ||
616 | public org.w3c.dom.Element getOwnerElement() { | ||
617 | return DOMNodeHelper.asDOMElement(getParent()); | ||
618 | } | ||
619 | + | ||
620 | + public TypeInfo getSchemaTypeInfo() { | ||
621 | + // TODO Auto-generated method stub | ||
622 | + return null; | ||
623 | + } | ||
624 | + | ||
625 | + public boolean isId() { | ||
626 | + // TODO Auto-generated method stub | ||
627 | + return false; | ||
628 | + } | ||
629 | + | ||
630 | + public String getBaseURI() { | ||
631 | + // TODO Auto-generated method stub | ||
632 | + return null; | ||
633 | + } | ||
634 | + | ||
635 | + public short compareDocumentPosition(Node other) throws DOMException { | ||
636 | + // TODO Auto-generated method stub | ||
637 | + return 0; | ||
638 | + } | ||
639 | + | ||
640 | + public String getTextContent() throws DOMException { | ||
641 | + // TODO Auto-generated method stub | ||
642 | + return null; | ||
643 | + } | ||
644 | + | ||
645 | + public void setTextContent(String textContent) throws DOMException { | ||
646 | + // TODO Auto-generated method stub | ||
647 | + | ||
648 | + } | ||
649 | + | ||
650 | + public boolean isSameNode(Node other) { | ||
651 | + // TODO Auto-generated method stub | ||
652 | + return false; | ||
653 | + } | ||
654 | + | ||
655 | + public String lookupPrefix(String namespaceURI) { | ||
656 | + // TODO Auto-generated method stub | ||
657 | + return null; | ||
658 | + } | ||
659 | + | ||
660 | + public boolean isDefaultNamespace(String namespaceURI) { | ||
661 | + // TODO Auto-generated method stub | ||
662 | + return false; | ||
663 | + } | ||
664 | + | ||
665 | + public String lookupNamespaceURI(String prefix) { | ||
666 | + // TODO Auto-generated method stub | ||
667 | + return null; | ||
668 | + } | ||
669 | + | ||
670 | + public boolean isEqualNode(Node arg) { | ||
671 | + // TODO Auto-generated method stub | ||
672 | + return false; | ||
673 | + } | ||
674 | + | ||
675 | + public Object getFeature(String feature, String version) { | ||
676 | + // TODO Auto-generated method stub | ||
677 | + return null; | ||
678 | + } | ||
679 | + | ||
680 | + public Object setUserData(String key, Object data, UserDataHandler handler) { | ||
681 | + // TODO Auto-generated method stub | ||
682 | + return null; | ||
683 | + } | ||
684 | + | ||
685 | + public Object getUserData(String key) { | ||
686 | + // TODO Auto-generated method stub | ||
687 | + return null; | ||
688 | + } | ||
689 | } | ||
690 | |||
691 | /* | ||
692 | --- dom4j-1.6.1+dfsg.orig/src/java/org/dom4j/dom/DOMCDATA.java | ||
693 | +++ dom4j-1.6.1+dfsg/src/java/org/dom4j/dom/DOMCDATA.java | ||
694 | @@ -14,7 +14,10 @@ | ||
695 | import org.w3c.dom.DOMException; | ||
696 | import org.w3c.dom.Document; | ||
697 | import org.w3c.dom.NamedNodeMap; | ||
698 | +import org.w3c.dom.Node; | ||
699 | import org.w3c.dom.NodeList; | ||
700 | +import org.w3c.dom.Text; | ||
701 | +import org.w3c.dom.UserDataHandler; | ||
702 | |||
703 | /** | ||
704 | * <p> | ||
705 | @@ -225,6 +228,81 @@ | ||
706 | protected CDATA createCDATA(String text) { | ||
707 | return new DOMCDATA(text); | ||
708 | } | ||
709 | + | ||
710 | + public boolean isElementContentWhitespace() { | ||
711 | + // TODO Auto-generated method stub | ||
712 | + return false; | ||
713 | + } | ||
714 | + | ||
715 | + public String getWholeText() { | ||
716 | + // TODO Auto-generated method stub | ||
717 | + return null; | ||
718 | + } | ||
719 | + | ||
720 | + public Text replaceWholeText(String content) throws DOMException { | ||
721 | + // TODO Auto-generated method stub | ||
722 | + return null; | ||
723 | + } | ||
724 | + | ||
725 | + public String getBaseURI() { | ||
726 | + // TODO Auto-generated method stub | ||
727 | + return null; | ||
728 | + } | ||
729 | + | ||
730 | + public short compareDocumentPosition(Node other) throws DOMException { | ||
731 | + // TODO Auto-generated method stub | ||
732 | + return 0; | ||
733 | + } | ||
734 | + | ||
735 | + public String getTextContent() throws DOMException { | ||
736 | + // TODO Auto-generated method stub | ||
737 | + return null; | ||
738 | + } | ||
739 | + | ||
740 | + public void setTextContent(String textContent) throws DOMException { | ||
741 | + // TODO Auto-generated method stub | ||
742 | + | ||
743 | + } | ||
744 | + | ||
745 | + public boolean isSameNode(Node other) { | ||
746 | + // TODO Auto-generated method stub | ||
747 | + return false; | ||
748 | + } | ||
749 | + | ||
750 | + public String lookupPrefix(String namespaceURI) { | ||
751 | + // TODO Auto-generated method stub | ||
752 | + return null; | ||
753 | + } | ||
754 | + | ||
755 | + public boolean isDefaultNamespace(String namespaceURI) { | ||
756 | + // TODO Auto-generated method stub | ||
757 | + return false; | ||
758 | + } | ||
759 | + | ||
760 | + public String lookupNamespaceURI(String prefix) { | ||
761 | + // TODO Auto-generated method stub | ||
762 | + return null; | ||
763 | + } | ||
764 | + | ||
765 | + public boolean isEqualNode(Node arg) { | ||
766 | + // TODO Auto-generated method stub | ||
767 | + return false; | ||
768 | + } | ||
769 | + | ||
770 | + public Object getFeature(String feature, String version) { | ||
771 | + // TODO Auto-generated method stub | ||
772 | + return null; | ||
773 | + } | ||
774 | + | ||
775 | + public Object setUserData(String key, Object data, UserDataHandler handler) { | ||
776 | + // TODO Auto-generated method stub | ||
777 | + return null; | ||
778 | + } | ||
779 | + | ||
780 | + public Object getUserData(String key) { | ||
781 | + // TODO Auto-generated method stub | ||
782 | + return null; | ||
783 | + } | ||
784 | } | ||
785 | |||
786 | /* | ||
787 | --- dom4j-1.6.1+dfsg.orig/src/java/org/dom4j/dom/DOMComment.java | ||
788 | +++ dom4j-1.6.1+dfsg/src/java/org/dom4j/dom/DOMComment.java | ||
789 | @@ -13,7 +13,9 @@ | ||
790 | import org.w3c.dom.DOMException; | ||
791 | import org.w3c.dom.Document; | ||
792 | import org.w3c.dom.NamedNodeMap; | ||
793 | +import org.w3c.dom.Node; | ||
794 | import org.w3c.dom.NodeList; | ||
795 | +import org.w3c.dom.UserDataHandler; | ||
796 | |||
797 | /** | ||
798 | * <p> | ||
799 | @@ -187,6 +189,66 @@ | ||
800 | throws DOMException { | ||
801 | DOMNodeHelper.replaceData(this, offset, count, arg); | ||
802 | } | ||
803 | + | ||
804 | + public String getBaseURI() { | ||
805 | + // TODO Auto-generated method stub | ||
806 | + return null; | ||
807 | + } | ||
808 | + | ||
809 | + public short compareDocumentPosition(Node other) throws DOMException { | ||
810 | + // TODO Auto-generated method stub | ||
811 | + return 0; | ||
812 | + } | ||
813 | + | ||
814 | + public String getTextContent() throws DOMException { | ||
815 | + // TODO Auto-generated method stub | ||
816 | + return null; | ||
817 | + } | ||
818 | + | ||
819 | + public void setTextContent(String textContent) throws DOMException { | ||
820 | + // TODO Auto-generated method stub | ||
821 | + | ||
822 | + } | ||
823 | + | ||
824 | + public boolean isSameNode(Node other) { | ||
825 | + // TODO Auto-generated method stub | ||
826 | + return false; | ||
827 | + } | ||
828 | + | ||
829 | + public String lookupPrefix(String namespaceURI) { | ||
830 | + // TODO Auto-generated method stub | ||
831 | + return null; | ||
832 | + } | ||
833 | + | ||
834 | + public boolean isDefaultNamespace(String namespaceURI) { | ||
835 | + // TODO Auto-generated method stub | ||
836 | + return false; | ||
837 | + } | ||
838 | + | ||
839 | + public String lookupNamespaceURI(String prefix) { | ||
840 | + // TODO Auto-generated method stub | ||
841 | + return null; | ||
842 | + } | ||
843 | + | ||
844 | + public boolean isEqualNode(Node arg) { | ||
845 | + // TODO Auto-generated method stub | ||
846 | + return false; | ||
847 | + } | ||
848 | + | ||
849 | + public Object getFeature(String feature, String version) { | ||
850 | + // TODO Auto-generated method stub | ||
851 | + return null; | ||
852 | + } | ||
853 | + | ||
854 | + public Object setUserData(String key, Object data, UserDataHandler handler) { | ||
855 | + // TODO Auto-generated method stub | ||
856 | + return null; | ||
857 | + } | ||
858 | + | ||
859 | + public Object getUserData(String key) { | ||
860 | + // TODO Auto-generated method stub | ||
861 | + return null; | ||
862 | + } | ||
863 | } | ||
864 | |||
865 | /* | ||
866 | --- dom4j-1.6.1+dfsg.orig/src/java/org/dom4j/dom/DOMDocumentFactory.java | ||
867 | +++ dom4j-1.6.1+dfsg/src/java/org/dom4j/dom/DOMDocumentFactory.java | ||
868 | @@ -174,6 +174,11 @@ | ||
869 | docType.getPublicId(), docType.getSystemId()); | ||
870 | } | ||
871 | } | ||
872 | + | ||
873 | + public Object getFeature(String arg0, String arg1) { | ||
874 | + // TODO Auto-generated method stub | ||
875 | + return null; | ||
876 | + } | ||
877 | } | ||
878 | |||
879 | |||
880 | @@ -213,4 +218,4 @@ | ||
881 | * POSSIBILITY OF SUCH DAMAGE. | ||
882 | * | ||
883 | * Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved. | ||
884 | - */ | ||
885 | \ No newline at end of file | ||
886 | + */ | ||
887 | --- dom4j-1.6.1+dfsg.orig/src/java/org/dom4j/dom/DOMDocument.java | ||
888 | +++ dom4j-1.6.1+dfsg/src/java/org/dom4j/dom/DOMDocument.java | ||
889 | @@ -15,12 +15,15 @@ | ||
890 | |||
891 | import org.w3c.dom.Attr; | ||
892 | import org.w3c.dom.CDATASection; | ||
893 | +import org.w3c.dom.DOMConfiguration; | ||
894 | import org.w3c.dom.DOMException; | ||
895 | import org.w3c.dom.Document; | ||
896 | import org.w3c.dom.EntityReference; | ||
897 | import org.w3c.dom.NamedNodeMap; | ||
898 | +import org.w3c.dom.Node; | ||
899 | import org.w3c.dom.NodeList; | ||
900 | import org.w3c.dom.ProcessingInstruction; | ||
901 | +import org.w3c.dom.UserDataHandler; | ||
902 | |||
903 | /** | ||
904 | * <p> | ||
905 | @@ -301,6 +304,136 @@ | ||
906 | return super.getDocumentFactory(); | ||
907 | } | ||
908 | } | ||
909 | + | ||
910 | + public String getInputEncoding() { | ||
911 | + // TODO Auto-generated method stub | ||
912 | + return null; | ||
913 | + } | ||
914 | + | ||
915 | + public String getXmlEncoding() { | ||
916 | + // TODO Auto-generated method stub | ||
917 | + return null; | ||
918 | + } | ||
919 | + | ||
920 | + public boolean getXmlStandalone() { | ||
921 | + // TODO Auto-generated method stub | ||
922 | + return false; | ||
923 | + } | ||
924 | + | ||
925 | + public void setXmlStandalone(boolean arg0) throws DOMException { | ||
926 | + // TODO Auto-generated method stub | ||
927 | + | ||
928 | + } | ||
929 | + | ||
930 | + public String getXmlVersion() { | ||
931 | + // TODO Auto-generated method stub | ||
932 | + return null; | ||
933 | + } | ||
934 | + | ||
935 | + public void setXmlVersion(String arg0) throws DOMException { | ||
936 | + // TODO Auto-generated method stub | ||
937 | + | ||
938 | + } | ||
939 | + | ||
940 | + public boolean getStrictErrorChecking() { | ||
941 | + // TODO Auto-generated method stub | ||
942 | + return false; | ||
943 | + } | ||
944 | + | ||
945 | + public void setStrictErrorChecking(boolean arg0) { | ||
946 | + // TODO Auto-generated method stub | ||
947 | + | ||
948 | + } | ||
949 | + | ||
950 | + public String getDocumentURI() { | ||
951 | + // TODO Auto-generated method stub | ||
952 | + return null; | ||
953 | + } | ||
954 | + | ||
955 | + public void setDocumentURI(String arg0) { | ||
956 | + // TODO Auto-generated method stub | ||
957 | + | ||
958 | + } | ||
959 | + | ||
960 | + public Node adoptNode(Node arg0) throws DOMException { | ||
961 | + // TODO Auto-generated method stub | ||
962 | + return null; | ||
963 | + } | ||
964 | + | ||
965 | + public DOMConfiguration getDomConfig() { | ||
966 | + // TODO Auto-generated method stub | ||
967 | + return null; | ||
968 | + } | ||
969 | + | ||
970 | + public void normalizeDocument() { | ||
971 | + // TODO Auto-generated method stub | ||
972 | + | ||
973 | + } | ||
974 | + | ||
975 | + public Node renameNode(Node arg0, String arg1, String arg2) throws DOMException { | ||
976 | + // TODO Auto-generated method stub | ||
977 | + return null; | ||
978 | + } | ||
979 | + | ||
980 | + public String getBaseURI() { | ||
981 | + // TODO Auto-generated method stub | ||
982 | + return null; | ||
983 | + } | ||
984 | + | ||
985 | + public short compareDocumentPosition(Node arg0) throws DOMException { | ||
986 | + // TODO Auto-generated method stub | ||
987 | + return 0; | ||
988 | + } | ||
989 | + | ||
990 | + public String getTextContent() throws DOMException { | ||
991 | + // TODO Auto-generated method stub | ||
992 | + return null; | ||
993 | + } | ||
994 | + | ||
995 | + public void setTextContent(String arg0) throws DOMException { | ||
996 | + // TODO Auto-generated method stub | ||
997 | + | ||
998 | + } | ||
999 | + | ||
1000 | + public boolean isSameNode(Node arg0) { | ||
1001 | + // TODO Auto-generated method stub | ||
1002 | + return false; | ||
1003 | + } | ||
1004 | + | ||
1005 | + public String lookupPrefix(String arg0) { | ||
1006 | + // TODO Auto-generated method stub | ||
1007 | + return null; | ||
1008 | + } | ||
1009 | + | ||
1010 | + public boolean isDefaultNamespace(String arg0) { | ||
1011 | + // TODO Auto-generated method stub | ||
1012 | + return false; | ||
1013 | + } | ||
1014 | + | ||
1015 | + public String lookupNamespaceURI(String arg0) { | ||
1016 | + // TODO Auto-generated method stub | ||
1017 | + return null; | ||
1018 | + } | ||
1019 | + | ||
1020 | + public boolean isEqualNode(Node arg0) { | ||
1021 | + // TODO Auto-generated method stub | ||
1022 | + return false; | ||
1023 | + } | ||
1024 | + | ||
1025 | + public Object getFeature(String arg0, String arg1) { | ||
1026 | + // TODO Auto-generated method stub | ||
1027 | + return null; | ||
1028 | + } | ||
1029 | + | ||
1030 | + public Object setUserData(String arg0, Object arg1, UserDataHandler arg2) { | ||
1031 | + // TODO Auto-generated method stub | ||
1032 | + return null; | ||
1033 | + } | ||
1034 | + | ||
1035 | + public Object getUserData(String arg0) { | ||
1036 | + // TODO Auto-generated method stub | ||
1037 | + return null; | ||
1038 | + } | ||
1039 | } | ||
1040 | |||
1041 | /* | ||
1042 | --- dom4j-1.6.1+dfsg.orig/src/java/org/dom4j/dom/DOMDocumentType.java | ||
1043 | +++ dom4j-1.6.1+dfsg/src/java/org/dom4j/dom/DOMDocumentType.java | ||
1044 | @@ -12,7 +12,9 @@ | ||
1045 | import org.w3c.dom.DOMException; | ||
1046 | import org.w3c.dom.Document; | ||
1047 | import org.w3c.dom.NamedNodeMap; | ||
1048 | +import org.w3c.dom.Node; | ||
1049 | import org.w3c.dom.NodeList; | ||
1050 | +import org.w3c.dom.UserDataHandler; | ||
1051 | |||
1052 | /** | ||
1053 | * <p> | ||
1054 | @@ -177,6 +179,66 @@ | ||
1055 | public String getInternalSubset() { | ||
1056 | return getElementName(); | ||
1057 | } | ||
1058 | + | ||
1059 | + public String getBaseURI() { | ||
1060 | + // TODO Auto-generated method stub | ||
1061 | + return null; | ||
1062 | + } | ||
1063 | + | ||
1064 | + public short compareDocumentPosition(Node arg0) throws DOMException { | ||
1065 | + // TODO Auto-generated method stub | ||
1066 | + return 0; | ||
1067 | + } | ||
1068 | + | ||
1069 | + public String getTextContent() throws DOMException { | ||
1070 | + // TODO Auto-generated method stub | ||
1071 | + return null; | ||
1072 | + } | ||
1073 | + | ||
1074 | + public void setTextContent(String arg0) throws DOMException { | ||
1075 | + // TODO Auto-generated method stub | ||
1076 | + | ||
1077 | + } | ||
1078 | + | ||
1079 | + public boolean isSameNode(Node arg0) { | ||
1080 | + // TODO Auto-generated method stub | ||
1081 | + return false; | ||
1082 | + } | ||
1083 | + | ||
1084 | + public String lookupPrefix(String arg0) { | ||
1085 | + // TODO Auto-generated method stub | ||
1086 | + return null; | ||
1087 | + } | ||
1088 | + | ||
1089 | + public boolean isDefaultNamespace(String arg0) { | ||
1090 | + // TODO Auto-generated method stub | ||
1091 | + return false; | ||
1092 | + } | ||
1093 | + | ||
1094 | + public String lookupNamespaceURI(String arg0) { | ||
1095 | + // TODO Auto-generated method stub | ||
1096 | + return null; | ||
1097 | + } | ||
1098 | + | ||
1099 | + public boolean isEqualNode(Node arg0) { | ||
1100 | + // TODO Auto-generated method stub | ||
1101 | + return false; | ||
1102 | + } | ||
1103 | + | ||
1104 | + public Object getFeature(String arg0, String arg1) { | ||
1105 | + // TODO Auto-generated method stub | ||
1106 | + return null; | ||
1107 | + } | ||
1108 | + | ||
1109 | + public Object setUserData(String arg0, Object arg1, UserDataHandler arg2) { | ||
1110 | + // TODO Auto-generated method stub | ||
1111 | + return null; | ||
1112 | + } | ||
1113 | + | ||
1114 | + public Object getUserData(String arg0) { | ||
1115 | + // TODO Auto-generated method stub | ||
1116 | + return null; | ||
1117 | + } | ||
1118 | } | ||
1119 | |||
1120 | /* | ||
1121 | --- dom4j-1.6.1+dfsg.orig/src/java/org/dom4j/dom/DOMElement.java | ||
1122 | +++ dom4j-1.6.1+dfsg/src/java/org/dom4j/dom/DOMElement.java | ||
1123 | @@ -16,11 +16,14 @@ | ||
1124 | import org.dom4j.QName; | ||
1125 | import org.dom4j.tree.DefaultElement; | ||
1126 | |||
1127 | +import org.w3c.dom.Attr; | ||
1128 | import org.w3c.dom.DOMException; | ||
1129 | import org.w3c.dom.Document; | ||
1130 | import org.w3c.dom.NamedNodeMap; | ||
1131 | import org.w3c.dom.Node; | ||
1132 | import org.w3c.dom.NodeList; | ||
1133 | +import org.w3c.dom.TypeInfo; | ||
1134 | +import org.w3c.dom.UserDataHandler; | ||
1135 | |||
1136 | /** | ||
1137 | * <p> | ||
1138 | @@ -389,6 +392,86 @@ | ||
1139 | |||
1140 | return getDocumentFactory().createQName(localName, prefix, namespace); | ||
1141 | } | ||
1142 | + | ||
1143 | + public TypeInfo getSchemaTypeInfo() { | ||
1144 | + // TODO Auto-generated method stub | ||
1145 | + return null; | ||
1146 | + } | ||
1147 | + | ||
1148 | + public void setIdAttribute(String arg0, boolean arg1) throws DOMException { | ||
1149 | + // TODO Auto-generated method stub | ||
1150 | + | ||
1151 | + } | ||
1152 | + | ||
1153 | + public void setIdAttributeNS(String arg0, String arg1, boolean arg2) throws DOMException { | ||
1154 | + // TODO Auto-generated method stub | ||
1155 | + | ||
1156 | + } | ||
1157 | + | ||
1158 | + public void setIdAttributeNode(Attr arg0, boolean arg1) throws DOMException { | ||
1159 | + // TODO Auto-generated method stub | ||
1160 | + | ||
1161 | + } | ||
1162 | + | ||
1163 | + public String getBaseURI() { | ||
1164 | + // TODO Auto-generated method stub | ||
1165 | + return null; | ||
1166 | + } | ||
1167 | + | ||
1168 | + public short compareDocumentPosition(Node arg0) throws DOMException { | ||
1169 | + // TODO Auto-generated method stub | ||
1170 | + return 0; | ||
1171 | + } | ||
1172 | + | ||
1173 | + public String getTextContent() throws DOMException { | ||
1174 | + // TODO Auto-generated method stub | ||
1175 | + return null; | ||
1176 | + } | ||
1177 | + | ||
1178 | + public void setTextContent(String arg0) throws DOMException { | ||
1179 | + // TODO Auto-generated method stub | ||
1180 | + | ||
1181 | + } | ||
1182 | + | ||
1183 | + public boolean isSameNode(Node arg0) { | ||
1184 | + // TODO Auto-generated method stub | ||
1185 | + return false; | ||
1186 | + } | ||
1187 | + | ||
1188 | + public String lookupPrefix(String arg0) { | ||
1189 | + // TODO Auto-generated method stub | ||
1190 | + return null; | ||
1191 | + } | ||
1192 | + | ||
1193 | + public boolean isDefaultNamespace(String arg0) { | ||
1194 | + // TODO Auto-generated method stub | ||
1195 | + return false; | ||
1196 | + } | ||
1197 | + | ||
1198 | + public String lookupNamespaceURI(String arg0) { | ||
1199 | + // TODO Auto-generated method stub | ||
1200 | + return null; | ||
1201 | + } | ||
1202 | + | ||
1203 | + public boolean isEqualNode(Node arg0) { | ||
1204 | + // TODO Auto-generated method stub | ||
1205 | + return false; | ||
1206 | + } | ||
1207 | + | ||
1208 | + public Object getFeature(String arg0, String arg1) { | ||
1209 | + // TODO Auto-generated method stub | ||
1210 | + return null; | ||
1211 | + } | ||
1212 | + | ||
1213 | + public Object setUserData(String arg0, Object arg1, UserDataHandler arg2) { | ||
1214 | + // TODO Auto-generated method stub | ||
1215 | + return null; | ||
1216 | + } | ||
1217 | + | ||
1218 | + public Object getUserData(String arg0) { | ||
1219 | + // TODO Auto-generated method stub | ||
1220 | + return null; | ||
1221 | + } | ||
1222 | } | ||
1223 | |||
1224 | /* | ||
1225 | --- dom4j-1.6.1+dfsg.orig/src/java/org/dom4j/dom/DOMEntityReference.java | ||
1226 | +++ dom4j-1.6.1+dfsg/src/java/org/dom4j/dom/DOMEntityReference.java | ||
1227 | @@ -13,7 +13,9 @@ | ||
1228 | import org.w3c.dom.DOMException; | ||
1229 | import org.w3c.dom.Document; | ||
1230 | import org.w3c.dom.NamedNodeMap; | ||
1231 | +import org.w3c.dom.Node; | ||
1232 | import org.w3c.dom.NodeList; | ||
1233 | +import org.w3c.dom.UserDataHandler; | ||
1234 | |||
1235 | /** | ||
1236 | * <p> | ||
1237 | @@ -166,6 +168,66 @@ | ||
1238 | public boolean hasAttributes() { | ||
1239 | return DOMNodeHelper.hasAttributes(this); | ||
1240 | } | ||
1241 | + | ||
1242 | + public String getBaseURI() { | ||
1243 | + // TODO Auto-generated method stub | ||
1244 | + return null; | ||
1245 | + } | ||
1246 | + | ||
1247 | + public short compareDocumentPosition(Node arg0) throws DOMException { | ||
1248 | + // TODO Auto-generated method stub | ||
1249 | + return 0; | ||
1250 | + } | ||
1251 | + | ||
1252 | + public String getTextContent() throws DOMException { | ||
1253 | + // TODO Auto-generated method stub | ||
1254 | + return null; | ||
1255 | + } | ||
1256 | + | ||
1257 | + public void setTextContent(String arg0) throws DOMException { | ||
1258 | + // TODO Auto-generated method stub | ||
1259 | + | ||
1260 | + } | ||
1261 | + | ||
1262 | + public boolean isSameNode(Node arg0) { | ||
1263 | + // TODO Auto-generated method stub | ||
1264 | + return false; | ||
1265 | + } | ||
1266 | + | ||
1267 | + public String lookupPrefix(String arg0) { | ||
1268 | + // TODO Auto-generated method stub | ||
1269 | + return null; | ||
1270 | + } | ||
1271 | + | ||
1272 | + public boolean isDefaultNamespace(String arg0) { | ||
1273 | + // TODO Auto-generated method stub | ||
1274 | + return false; | ||
1275 | + } | ||
1276 | + | ||
1277 | + public String lookupNamespaceURI(String arg0) { | ||
1278 | + // TODO Auto-generated method stub | ||
1279 | + return null; | ||
1280 | + } | ||
1281 | + | ||
1282 | + public boolean isEqualNode(Node arg0) { | ||
1283 | + // TODO Auto-generated method stub | ||
1284 | + return false; | ||
1285 | + } | ||
1286 | + | ||
1287 | + public Object getFeature(String arg0, String arg1) { | ||
1288 | + // TODO Auto-generated method stub | ||
1289 | + return null; | ||
1290 | + } | ||
1291 | + | ||
1292 | + public Object setUserData(String arg0, Object arg1, UserDataHandler arg2) { | ||
1293 | + // TODO Auto-generated method stub | ||
1294 | + return null; | ||
1295 | + } | ||
1296 | + | ||
1297 | + public Object getUserData(String arg0) { | ||
1298 | + // TODO Auto-generated method stub | ||
1299 | + return null; | ||
1300 | + } | ||
1301 | } | ||
1302 | |||
1303 | /* | ||
1304 | --- dom4j-1.6.1+dfsg.orig/src/java/org/dom4j/dom/DOMNamespace.java | ||
1305 | +++ dom4j-1.6.1+dfsg/src/java/org/dom4j/dom/DOMNamespace.java | ||
1306 | @@ -13,7 +13,9 @@ | ||
1307 | import org.w3c.dom.DOMException; | ||
1308 | import org.w3c.dom.Document; | ||
1309 | import org.w3c.dom.NamedNodeMap; | ||
1310 | +import org.w3c.dom.Node; | ||
1311 | import org.w3c.dom.NodeList; | ||
1312 | +import org.w3c.dom.UserDataHandler; | ||
1313 | |||
1314 | /** | ||
1315 | * <p> | ||
1316 | @@ -140,6 +142,66 @@ | ||
1317 | public boolean hasAttributes() { | ||
1318 | return DOMNodeHelper.hasAttributes(this); | ||
1319 | } | ||
1320 | + | ||
1321 | + public String getBaseURI() { | ||
1322 | + // TODO Auto-generated method stub | ||
1323 | + return null; | ||
1324 | + } | ||
1325 | + | ||
1326 | + public short compareDocumentPosition(Node arg0) throws DOMException { | ||
1327 | + // TODO Auto-generated method stub | ||
1328 | + return 0; | ||
1329 | + } | ||
1330 | + | ||
1331 | + public String getTextContent() throws DOMException { | ||
1332 | + // TODO Auto-generated method stub | ||
1333 | + return null; | ||
1334 | + } | ||
1335 | + | ||
1336 | + public void setTextContent(String arg0) throws DOMException { | ||
1337 | + // TODO Auto-generated method stub | ||
1338 | + | ||
1339 | + } | ||
1340 | + | ||
1341 | + public boolean isSameNode(Node arg0) { | ||
1342 | + // TODO Auto-generated method stub | ||
1343 | + return false; | ||
1344 | + } | ||
1345 | + | ||
1346 | + public String lookupPrefix(String arg0) { | ||
1347 | + // TODO Auto-generated method stub | ||
1348 | + return null; | ||
1349 | + } | ||
1350 | + | ||
1351 | + public boolean isDefaultNamespace(String arg0) { | ||
1352 | + // TODO Auto-generated method stub | ||
1353 | + return false; | ||
1354 | + } | ||
1355 | + | ||
1356 | + public String lookupNamespaceURI(String arg0) { | ||
1357 | + // TODO Auto-generated method stub | ||
1358 | + return null; | ||
1359 | + } | ||
1360 | + | ||
1361 | + public boolean isEqualNode(Node arg0) { | ||
1362 | + // TODO Auto-generated method stub | ||
1363 | + return false; | ||
1364 | + } | ||
1365 | + | ||
1366 | + public Object getFeature(String arg0, String arg1) { | ||
1367 | + // TODO Auto-generated method stub | ||
1368 | + return null; | ||
1369 | + } | ||
1370 | + | ||
1371 | + public Object setUserData(String arg0, Object arg1, UserDataHandler arg2) { | ||
1372 | + // TODO Auto-generated method stub | ||
1373 | + return null; | ||
1374 | + } | ||
1375 | + | ||
1376 | + public Object getUserData(String arg0) { | ||
1377 | + // TODO Auto-generated method stub | ||
1378 | + return null; | ||
1379 | + } | ||
1380 | } | ||
1381 | |||
1382 | /* | ||
1383 | --- dom4j-1.6.1+dfsg.orig/src/java/org/dom4j/dom/DOMProcessingInstruction.java | ||
1384 | +++ dom4j-1.6.1+dfsg/src/java/org/dom4j/dom/DOMProcessingInstruction.java | ||
1385 | @@ -15,7 +15,9 @@ | ||
1386 | import org.w3c.dom.DOMException; | ||
1387 | import org.w3c.dom.Document; | ||
1388 | import org.w3c.dom.NamedNodeMap; | ||
1389 | +import org.w3c.dom.Node; | ||
1390 | import org.w3c.dom.NodeList; | ||
1391 | +import org.w3c.dom.UserDataHandler; | ||
1392 | |||
1393 | /** | ||
1394 | * <p> | ||
1395 | @@ -177,6 +179,66 @@ | ||
1396 | } | ||
1397 | } | ||
1398 | |||
1399 | + public String getBaseURI() { | ||
1400 | + // TODO Auto-generated method stub | ||
1401 | + return null; | ||
1402 | + } | ||
1403 | + | ||
1404 | + public short compareDocumentPosition(Node arg0) throws DOMException { | ||
1405 | + // TODO Auto-generated method stub | ||
1406 | + return 0; | ||
1407 | + } | ||
1408 | + | ||
1409 | + public String getTextContent() throws DOMException { | ||
1410 | + // TODO Auto-generated method stub | ||
1411 | + return null; | ||
1412 | + } | ||
1413 | + | ||
1414 | + public void setTextContent(String arg0) throws DOMException { | ||
1415 | + // TODO Auto-generated method stub | ||
1416 | + | ||
1417 | + } | ||
1418 | + | ||
1419 | + public boolean isSameNode(Node arg0) { | ||
1420 | + // TODO Auto-generated method stub | ||
1421 | + return false; | ||
1422 | + } | ||
1423 | + | ||
1424 | + public String lookupPrefix(String arg0) { | ||
1425 | + // TODO Auto-generated method stub | ||
1426 | + return null; | ||
1427 | + } | ||
1428 | + | ||
1429 | + public boolean isDefaultNamespace(String arg0) { | ||
1430 | + // TODO Auto-generated method stub | ||
1431 | + return false; | ||
1432 | + } | ||
1433 | + | ||
1434 | + public String lookupNamespaceURI(String arg0) { | ||
1435 | + // TODO Auto-generated method stub | ||
1436 | + return null; | ||
1437 | + } | ||
1438 | + | ||
1439 | + public boolean isEqualNode(Node arg0) { | ||
1440 | + // TODO Auto-generated method stub | ||
1441 | + return false; | ||
1442 | + } | ||
1443 | + | ||
1444 | + public Object getFeature(String arg0, String arg1) { | ||
1445 | + // TODO Auto-generated method stub | ||
1446 | + return null; | ||
1447 | + } | ||
1448 | + | ||
1449 | + public Object setUserData(String arg0, Object arg1, UserDataHandler arg2) { | ||
1450 | + // TODO Auto-generated method stub | ||
1451 | + return null; | ||
1452 | + } | ||
1453 | + | ||
1454 | + public Object getUserData(String arg0) { | ||
1455 | + // TODO Auto-generated method stub | ||
1456 | + return null; | ||
1457 | + } | ||
1458 | + | ||
1459 | // Implementation methods | ||
1460 | // ------------------------------------------------------------------------- | ||
1461 | } | ||
1462 | --- dom4j-1.6.1+dfsg.orig/src/java/org/dom4j/dom/DOMText.java | ||
1463 | +++ dom4j-1.6.1+dfsg/src/java/org/dom4j/dom/DOMText.java | ||
1464 | @@ -14,7 +14,9 @@ | ||
1465 | import org.w3c.dom.DOMException; | ||
1466 | import org.w3c.dom.Document; | ||
1467 | import org.w3c.dom.NamedNodeMap; | ||
1468 | +import org.w3c.dom.Node; | ||
1469 | import org.w3c.dom.NodeList; | ||
1470 | +import org.w3c.dom.UserDataHandler; | ||
1471 | |||
1472 | /** | ||
1473 | * <p> | ||
1474 | @@ -224,6 +226,81 @@ | ||
1475 | protected Text createText(String text) { | ||
1476 | return new DOMText(text); | ||
1477 | } | ||
1478 | + | ||
1479 | + public boolean isElementContentWhitespace() { | ||
1480 | + // TODO Auto-generated method stub | ||
1481 | + return false; | ||
1482 | + } | ||
1483 | + | ||
1484 | + public String getWholeText() { | ||
1485 | + // TODO Auto-generated method stub | ||
1486 | + return null; | ||
1487 | + } | ||
1488 | + | ||
1489 | + public org.w3c.dom.Text replaceWholeText(String arg0) throws DOMException { | ||
1490 | + // TODO Auto-generated method stub | ||
1491 | + return null; | ||
1492 | + } | ||
1493 | + | ||
1494 | + public String getBaseURI() { | ||
1495 | + // TODO Auto-generated method stub | ||
1496 | + return null; | ||
1497 | + } | ||
1498 | + | ||
1499 | + public short compareDocumentPosition(Node arg0) throws DOMException { | ||
1500 | + // TODO Auto-generated method stub | ||
1501 | + return 0; | ||
1502 | + } | ||
1503 | + | ||
1504 | + public String getTextContent() throws DOMException { | ||
1505 | + // TODO Auto-generated method stub | ||
1506 | + return null; | ||
1507 | + } | ||
1508 | + | ||
1509 | + public void setTextContent(String arg0) throws DOMException { | ||
1510 | + // TODO Auto-generated method stub | ||
1511 | + | ||
1512 | + } | ||
1513 | + | ||
1514 | + public boolean isSameNode(Node arg0) { | ||
1515 | + // TODO Auto-generated method stub | ||
1516 | + return false; | ||
1517 | + } | ||
1518 | + | ||
1519 | + public String lookupPrefix(String arg0) { | ||
1520 | + // TODO Auto-generated method stub | ||
1521 | + return null; | ||
1522 | + } | ||
1523 | + | ||
1524 | + public boolean isDefaultNamespace(String arg0) { | ||
1525 | + // TODO Auto-generated method stub | ||
1526 | + return false; | ||
1527 | + } | ||
1528 | + | ||
1529 | + public String lookupNamespaceURI(String arg0) { | ||
1530 | + // TODO Auto-generated method stub | ||
1531 | + return null; | ||
1532 | + } | ||
1533 | + | ||
1534 | + public boolean isEqualNode(Node arg0) { | ||
1535 | + // TODO Auto-generated method stub | ||
1536 | + return false; | ||
1537 | + } | ||
1538 | + | ||
1539 | + public Object getFeature(String arg0, String arg1) { | ||
1540 | + // TODO Auto-generated method stub | ||
1541 | + return null; | ||
1542 | + } | ||
1543 | + | ||
1544 | + public Object setUserData(String arg0, Object arg1, UserDataHandler arg2) { | ||
1545 | + // TODO Auto-generated method stub | ||
1546 | + return null; | ||
1547 | + } | ||
1548 | + | ||
1549 | + public Object getUserData(String arg0) { | ||
1550 | + // TODO Auto-generated method stub | ||
1551 | + return null; | ||
1552 | + } | ||
1553 | } | ||
1554 | |||
1555 | /* | ||
1556 | --- dom4j-1.6.1+dfsg.orig/src/java/org/dom4j/tree/NamespaceCache.java | ||
1557 | +++ dom4j-1.6.1+dfsg/src/java/org/dom4j/tree/NamespaceCache.java | ||
1558 | @@ -26,42 +26,46 @@ | ||
1559 | * @version $Revision: 1.15 $ | ||
1560 | */ | ||
1561 | public class NamespaceCache { | ||
1562 | - private static final String CONCURRENTREADERHASHMAP_CLASS | ||
1563 | - = "EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap"; | ||
1564 | + private static final String BACKPORT_CONCURRENTHASHMAP_CLASS | ||
1565 | + = "edu.emory.mathcs.backport.java.util.concurrent.ConcurrentHashMap"; | ||
1566 | + private static final String OSWEGO_CONCURRENTHASHMAP_CLASS | ||
1567 | + = "EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap"; | ||
1568 | |||
1569 | /** | ||
1570 | * Cache of {@link Map}instances indexed by URI which contain caches of | ||
1571 | * {@link Namespace}for each prefix | ||
1572 | */ | ||
1573 | - protected static Map cache; | ||
1574 | + protected static Map cache = newConcurrentHashMap(); | ||
1575 | |||
1576 | /** | ||
1577 | * Cache of {@link Namespace}instances indexed by URI for default | ||
1578 | * namespaces with no prefixes | ||
1579 | */ | ||
1580 | - protected static Map noPrefixCache; | ||
1581 | + protected static Map noPrefixCache = newConcurrentHashMap(); | ||
1582 | |||
1583 | - static { | ||
1584 | + protected static Map newConcurrentHashMap() | ||
1585 | + { | ||
1586 | /* Try the java.util.concurrent.ConcurrentHashMap first. */ | ||
1587 | try { | ||
1588 | Class clazz = Class | ||
1589 | .forName("java.util.concurrent.ConcurrentHashMap"); | ||
1590 | Constructor construct = clazz.getConstructor(new Class[] { | ||
1591 | Integer.TYPE, Float.TYPE, Integer.TYPE }); | ||
1592 | - cache = (Map) construct.newInstance(new Object[] {new Integer(11), | ||
1593 | + return (Map) construct.newInstance(new Object[] {new Integer(11), | ||
1594 | new Float(0.75f), new Integer(1) }); | ||
1595 | - noPrefixCache = (Map) construct.newInstance(new Object[] { | ||
1596 | - new Integer(11), new Float(0.75f), new Integer(1) }); | ||
1597 | } catch (Throwable t1) { | ||
1598 | - /* Try to use the util.concurrent library (if in classpath) */ | ||
1599 | try { | ||
1600 | - Class clazz = Class.forName(CONCURRENTREADERHASHMAP_CLASS); | ||
1601 | - cache = (Map) clazz.newInstance(); | ||
1602 | - noPrefixCache = (Map) clazz.newInstance(); | ||
1603 | + /* Try to use the backport-util-concurrent library */ | ||
1604 | + Class clazz = Class.forName(BACKPORT_CONCURRENTHASHMAP_CLASS); | ||
1605 | + return (Map) clazz.newInstance(); | ||
1606 | } catch (Throwable t2) { | ||
1607 | - /* If previous implementations fail, use internal one */ | ||
1608 | - cache = new ConcurrentReaderHashMap(); | ||
1609 | - noPrefixCache = new ConcurrentReaderHashMap(); | ||
1610 | + try { | ||
1611 | + /* Try to use the oswego concurrent library */ | ||
1612 | + Class clazz = Class.forName(OSWEGO_CONCURRENTHASHMAP_CLASS); | ||
1613 | + return (Map) clazz.newInstance(); | ||
1614 | + } catch (Throwable t3) { | ||
1615 | + return null; | ||
1616 | + } | ||
1617 | } | ||
1618 | } | ||
1619 | } | ||
1620 | @@ -154,7 +158,7 @@ | ||
1621 | answer = (Map) cache.get(uri); | ||
1622 | |||
1623 | if (answer == null) { | ||
1624 | - answer = new ConcurrentReaderHashMap(); | ||
1625 | + answer = newConcurrentHashMap(); | ||
1626 | cache.put(uri, answer); | ||
1627 | } | ||
1628 | } | ||