< prev index next >
src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/trax/TransformerFactoryImpl.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
--- 1,7 ----
/*
! * Copyright (c) 2007, 2019, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
*** 82,92 ****
/**
* Implementation of a JAXP TransformerFactory for Translets.
* @author G. Todd Miller
* @author Morten Jorgensen
* @author Santiago Pericas-Geertsen
! * @LastModified: July 2018
*/
public class TransformerFactoryImpl
extends SAXTransformerFactory implements SourceLoader, ErrorListener
{
// Public constants for attributes supported by the XSLTC TransformerFactory.
--- 82,92 ----
/**
* Implementation of a JAXP TransformerFactory for Translets.
* @author G. Todd Miller
* @author Morten Jorgensen
* @author Santiago Pericas-Geertsen
! * @LastModified: July 2019
*/
public class TransformerFactoryImpl
extends SAXTransformerFactory implements SourceLoader, ErrorListener
{
// Public constants for attributes supported by the XSLTC TransformerFactory.
*** 105,114 ****
--- 105,117 ----
* This error listener is used only for this factory and is not passed to
* the Templates or Transformer objects that we create.
*/
private ErrorListener _errorListener = this;
+ // flag indicating whether there's an user's ErrorListener
+ private boolean _hasUserErrListener;
+
/**
* This URIResolver is passed to all created Templates and Transformers
*/
private URIResolver _uriResolver = null;
*** 295,304 ****
--- 298,308 ----
if (listener == null) {
ErrorMsg err = new ErrorMsg(ErrorMsg.ERROR_LISTENER_NULL_ERR,
"TransformerFactory");
throw new IllegalArgumentException(err.toString());
}
+ _hasUserErrListener = true;
_errorListener = listener;
}
/**
* javax.xml.transform.sax.TransformerFactory implementation.
*** 944,954 ****
return templates;
}
}
// Create and initialize a stylesheet compiler
! final XSLTC xsltc = new XSLTC(_xmlFeatures);
if (_debug) xsltc.setDebug(true);
if (_enableInlining)
xsltc.setTemplateInlining(true);
else
xsltc.setTemplateInlining(false);
--- 948,958 ----
return templates;
}
}
// Create and initialize a stylesheet compiler
! final XSLTC xsltc = new XSLTC(_xmlFeatures, _hasUserErrListener);
if (_debug) xsltc.setDebug(true);
if (_enableInlining)
xsltc.setTemplateInlining(true);
else
xsltc.setTemplateInlining(false);
*** 1102,1112 ****
{
// create CatalogFeatures that is accessible by the Handler
// through the factory instance
buildCatalogFeatures();
final TemplatesHandlerImpl handler =
! new TemplatesHandlerImpl(_indentNumber, this);
if (_uriResolver != null) {
handler.setURIResolver(_uriResolver);
}
return handler;
}
--- 1106,1116 ----
{
// create CatalogFeatures that is accessible by the Handler
// through the factory instance
buildCatalogFeatures();
final TemplatesHandlerImpl handler =
! new TemplatesHandlerImpl(_indentNumber, this, _hasUserErrListener);
if (_uriResolver != null) {
handler.setURIResolver(_uriResolver);
}
return handler;
}
< prev index next >