< prev index next >
src/java.xml/share/classes/com/sun/org/apache/xml/internal/serializer/ToXMLStream.java
Print this page
*** 1,27 ****
/*
! * reserved comment block
! * DO NOT REMOVE OR ALTER!
*/
/*
! * Copyright 2001-2004 The Apache Software Foundation.
! *
! * Licensed under the Apache License, Version 2.0 (the "License");
! * you may not use this file except in compliance with the License.
! * You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
! /*
! * $Id: ToXMLStream.java,v 1.2.4.2 2005/09/15 12:01:25 suresh_emailid Exp $
! */
package com.sun.org.apache.xml.internal.serializer;
import java.io.IOException;
import javax.xml.transform.ErrorListener;
--- 1,25 ----
/*
! * Copyright (c) 2014, 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.
! * The ASF licenses this file to You under the Apache License, Version 2.0
! * (the "License"); you may not use this file except in compliance with
! * the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
!
package com.sun.org.apache.xml.internal.serializer;
import java.io.IOException;
import javax.xml.transform.ErrorListener;
*** 90,99 ****
--- 88,103 ----
setOmitXMLDeclaration(xmlListener.getOmitXMLDeclaration());
m_ispreserve = xmlListener.m_ispreserve;
m_preserves = xmlListener.m_preserves;
+ m_ispreserveSpace = xmlListener.m_ispreserveSpace;
+ m_preserveSpaces = xmlListener.m_preserveSpaces;
+ m_childNodeNum = xmlListener.m_childNodeNum;
+ m_childNodeNumStack = xmlListener.m_childNodeNumStack;
+ m_charactersBuffer = xmlListener.m_charactersBuffer;
+ m_inEntityRef = xmlListener.m_inEntityRef;
m_isprevtext = xmlListener.m_isprevtext;
m_doIndent = xmlListener.m_doIndent;
setIndentAmount(xmlListener.getIndentAmount());
m_startNewLine = xmlListener.m_startNewLine;
m_needToOutputDocTypeDecl = xmlListener.m_needToOutputDocTypeDecl;
*** 122,132 ****
if (m_needToCallStartDocument)
{
super.startDocumentInternal();
m_needToCallStartDocument = false;
! if (m_inEntityRef)
return;
m_needToOutputDocTypeDecl = true;
m_startNewLine = false;
/* The call to getXMLVersion() might emit an error message
--- 126,136 ----
if (m_needToCallStartDocument)
{
super.startDocumentInternal();
m_needToCallStartDocument = false;
! if (isInEntityRef())
return;
m_needToOutputDocTypeDecl = true;
m_startNewLine = false;
/* The call to getXMLVersion() might emit an error message
*** 195,204 ****
--- 199,209 ----
*
* @throws org.xml.sax.SAXException
*/
public void endDocument() throws org.xml.sax.SAXException
{
+ flushCharactersBuffer();
flushPending();
if (m_doIndent && !m_isprevtext)
{
try
{
*** 263,275 ****
* @throws org.xml.sax.SAXException
*/
public void processingInstruction(String target, String data)
throws org.xml.sax.SAXException
{
! if (m_inEntityRef)
return;
flushPending();
if (target.equals(Result.PI_DISABLE_OUTPUT_ESCAPING))
{
startNonEscaping();
--- 268,282 ----
* @throws org.xml.sax.SAXException
*/
public void processingInstruction(String target, String data)
throws org.xml.sax.SAXException
{
! if (isInEntityRef())
return;
+ m_childNodeNum++;
+ flushCharactersBuffer();
flushPending();
if (target.equals(Result.PI_DISABLE_OUTPUT_ESCAPING))
{
startNonEscaping();
< prev index next >