< prev index next >

src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/dom3/DOM3TreeWalker.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2015, 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) 2015, 2016 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.
*** 366,377 **** * Optimized dispatch of characters. */ private final void dispatachChars(Node node) throws org.xml.sax.SAXException { if (fSerializer != null) { - this.fSerializer.characters(node); - } else { String data = ((Text) node).getData(); this.fSerializer.characters(data.toCharArray(), 0, data.length()); } } --- 366,375 ----
*** 1064,1074 **** // The filter should not apply in this case, since the // EntityReference is not being expanded. // should we pass entity reference nodes to the filter??? } ! if (fLexicalHandler != null) { // startEntity outputs only Text but not Element, Attr, Comment // and PI child nodes. It does so by setting the m_inEntityRef // in ToStream and using this to decide if a node is to be // serialized or not. --- 1062,1074 ---- // The filter should not apply in this case, since the // EntityReference is not being expanded. // should we pass entity reference nodes to the filter??? } ! // if "entities" is true, or EntityReference node has no children, ! // it will be serialized as the form "&entityName;" in the output. ! if (fLexicalHandler != null && ((fFeatures & ENTITIES) != 0 || !node.hasChildNodes())) { // startEntity outputs only Text but not Element, Attr, Comment // and PI child nodes. It does so by setting the m_inEntityRef // in ToStream and using this to decide if a node is to be // serialized or not.
< prev index next >