< prev index next >

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

Print this page

        

*** 1,7 **** /* ! * 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. --- 1,7 ---- /* ! * Copyright (c) 2014, 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.
*** 38,47 **** --- 38,48 ---- * * This class is not a public API, it is public * because it is used from another package. * * @xsl.usage internal + * @LastModified: Sept 2018 */ public final class ToHTMLStream extends ToStream { /** This flag is set while receiving events from the DTD */
*** 1047,1057 **** protected void processAttribute( java.io.Writer writer, String name, String value, ElemDesc elemDesc) ! throws IOException { writer.write(' '); if ( ((value.length() == 0) || value.equalsIgnoreCase(name)) && elemDesc != null --- 1048,1058 ---- protected void processAttribute( java.io.Writer writer, String name, String value, ElemDesc elemDesc) ! throws IOException, SAXException { writer.write(' '); if ( ((value.length() == 0) || value.equalsIgnoreCase(name)) && elemDesc != null
*** 1371,1381 **** * * @throws org.xml.sax.SAXException */ public void writeAttrString( final java.io.Writer writer, String string, String encoding) ! throws IOException { final int end = string.length(); if (end > m_attrBuff.length) { m_attrBuff = new char[end * 2 + 1]; --- 1372,1382 ---- * * @throws org.xml.sax.SAXException */ public void writeAttrString( final java.io.Writer writer, String string, String encoding) ! throws IOException, SAXException { final int end = string.length(); if (end > m_attrBuff.length) { m_attrBuff = new char[end * 2 + 1];
*** 1423,1439 **** { i = pos - 1; } else { ! if (Encodings.isHighUTF16Surrogate(ch)) { ! ! writeUTF16Surrogate(ch, chars, i, end); ! i++; // two input characters processed ! // this increments by one and the for() ! // loop itself increments by another one. } // The next is kind of a hack to keep from escaping in the case // of Shift_JIS and the like. --- 1424,1443 ---- { i = pos - 1; } else { ! if (Encodings.isHighUTF16Surrogate(ch) || ! Encodings.isLowUTF16Surrogate(ch)) { ! if (writeUTF16Surrogate(ch, chars, i, end) >= 0) { ! // move the index if the low surrogate is consumed ! // as writeUTF16Surrogate has written the pair ! if (Encodings.isHighUTF16Surrogate(ch)) { ! i++; ! } ! } } // The next is kind of a hack to keep from escaping in the case // of Shift_JIS and the like.
< prev index next >