Update of /var/cvs/src/org/mmbase/util/xml
In directory james.mmbase.org:/tmp/cvs-serv30748
Modified Files:
DocumentReader.java
Log Message:
warning about xinclude awareness
See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/util/xml
Index: DocumentReader.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/util/xml/DocumentReader.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -b -r1.39 -r1.40
--- DocumentReader.java 11 Mar 2008 11:45:28 -0000 1.39
+++ DocumentReader.java 11 Jul 2008 14:50:35 -0000 1.40
@@ -40,7 +40,7 @@
* @author Rico Jansen
* @author Pierre van Rooden
* @author Michiel Meeuwissen
- * @version $Id: DocumentReader.java,v 1.39 2008/03/11 11:45:28 michiel Exp $
+ * @version $Id: DocumentReader.java,v 1.40 2008/07/11 14:50:35 michiel Exp $
* @since MMBase-1.7
*/
public class DocumentReader {
@@ -166,6 +166,7 @@
private static boolean warnedJAXP12 = false;
+ private static boolean warnedXinclude = false;
/**
* Creates a DocumentBuilder using SAX.
* @param validating if true, the documentbuilder will validate documents
read
@@ -183,7 +184,14 @@
DocumentBuilderFactory dfactory =
DocumentBuilderFactory.newInstance();
// get document builder AFTER setting the validation
dfactory.setValidating(validating);
+ try {
dfactory.setXIncludeAware(true);
+ } catch(Exception e) {
+ if (! warnedXinclude) {
+ log.info(e + " Your current document builder factory does
not support xi:include.");
+ warnedXinclude = true;
+ }
+ }
if (validating && xsd) {
try {
dfactory.setAttribute("http://java.sun.com/xml/jaxp/properties/schemaLanguage",
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs