1 /*
2 * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
3 * @LastModified: Nov 2017
4 */
5 /*
6 * Licensed to the Apache Software Foundation (ASF) under one or more
7 * contributor license agreements. See the NOTICE file distributed with
8 * this work for additional information regarding copyright ownership.
9 * The ASF licenses this file to You under the Apache License, Version 2.0
10 * (the "License"); you may not use this file except in compliance with
11 * the License. You may obtain a copy of the License at
12 *
13 * http://www.apache.org/licenses/LICENSE-2.0
14 *
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
20 */
21
22 package com.sun.org.apache.xalan.internal.xsltc.trax;
23
78 import javax.xml.transform.dom.DOMResult;
79 import javax.xml.transform.dom.DOMSource;
80 import javax.xml.transform.sax.SAXResult;
81 import javax.xml.transform.sax.SAXSource;
82 import javax.xml.transform.stax.StAXResult;
83 import javax.xml.transform.stax.StAXSource;
84 import javax.xml.transform.stream.StreamResult;
85 import javax.xml.transform.stream.StreamSource;
86 import jdk.xml.internal.JdkXmlFeatures;
87 import jdk.xml.internal.JdkXmlUtils;
88 import org.xml.sax.ContentHandler;
89 import org.xml.sax.InputSource;
90 import org.xml.sax.SAXException;
91 import org.xml.sax.XMLReader;
92 import org.xml.sax.ext.LexicalHandler;
93
94 /**
95 * @author Morten Jorgensen
96 * @author G. Todd Miller
97 * @author Santiago Pericas-Geertsen
98 */
99 public final class TransformerImpl extends Transformer
100 implements DOMCache, ErrorListener
101 {
102
103 private final static String LEXICAL_HANDLER_PROPERTY =
104 "http://xml.org/sax/properties/lexical-handler";
105 private static final String NAMESPACE_FEATURE =
106 "http://xml.org/sax/features/namespaces";
107
108 /**
109 * Namespace prefixes feature for {@link XMLReader}.
110 */
111 private static final String NAMESPACE_PREFIXES_FEATURE =
112 "http://xml.org/sax/features/namespace-prefixes";
113
114 /**
115 * A reference to the translet or null if the identity transform.
116 */
117 private AbstractTranslet _translet = null;
|
1 /*
2 * Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
3 */
4 /*
5 * Licensed to the Apache Software Foundation (ASF) under one or more
6 * contributor license agreements. See the NOTICE file distributed with
7 * this work for additional information regarding copyright ownership.
8 * The ASF licenses this file to You under the Apache License, Version 2.0
9 * (the "License"); you may not use this file except in compliance with
10 * the License. You may obtain a copy of the License at
11 *
12 * http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing, software
15 * distributed under the License is distributed on an "AS IS" BASIS,
16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 * See the License for the specific language governing permissions and
18 * limitations under the License.
19 */
20
21 package com.sun.org.apache.xalan.internal.xsltc.trax;
22
77 import javax.xml.transform.dom.DOMResult;
78 import javax.xml.transform.dom.DOMSource;
79 import javax.xml.transform.sax.SAXResult;
80 import javax.xml.transform.sax.SAXSource;
81 import javax.xml.transform.stax.StAXResult;
82 import javax.xml.transform.stax.StAXSource;
83 import javax.xml.transform.stream.StreamResult;
84 import javax.xml.transform.stream.StreamSource;
85 import jdk.xml.internal.JdkXmlFeatures;
86 import jdk.xml.internal.JdkXmlUtils;
87 import org.xml.sax.ContentHandler;
88 import org.xml.sax.InputSource;
89 import org.xml.sax.SAXException;
90 import org.xml.sax.XMLReader;
91 import org.xml.sax.ext.LexicalHandler;
92
93 /**
94 * @author Morten Jorgensen
95 * @author G. Todd Miller
96 * @author Santiago Pericas-Geertsen
97 * @LastModified: Nov 2017
98 */
99 public final class TransformerImpl extends Transformer
100 implements DOMCache, ErrorListener
101 {
102
103 private final static String LEXICAL_HANDLER_PROPERTY =
104 "http://xml.org/sax/properties/lexical-handler";
105 private static final String NAMESPACE_FEATURE =
106 "http://xml.org/sax/features/namespaces";
107
108 /**
109 * Namespace prefixes feature for {@link XMLReader}.
110 */
111 private static final String NAMESPACE_PREFIXES_FEATURE =
112 "http://xml.org/sax/features/namespace-prefixes";
113
114 /**
115 * A reference to the translet or null if the identity transform.
116 */
117 private AbstractTranslet _translet = null;
|