src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/CoreDocumentImpl.java
equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2009, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2009, 2019, Oracle and/or its affiliates. All rights reserved. |
3 */ |
3 */ |
4 /* |
4 /* |
5 * Licensed to the Apache Software Foundation (ASF) under one or more |
5 * Licensed to the Apache Software Foundation (ASF) under one or more |
6 * contributor license agreements. See the NOTICE file distributed with |
6 * contributor license agreements. See the NOTICE file distributed with |
7 * this work for additional information regarding copyright ownership. |
7 * this work for additional information regarding copyright ownership. |
81 * @author Arnaud Le Hors, IBM |
81 * @author Arnaud Le Hors, IBM |
82 * @author Joe Kesselman, IBM |
82 * @author Joe Kesselman, IBM |
83 * @author Andy Clark, IBM |
83 * @author Andy Clark, IBM |
84 * @author Ralf Pfeiffer, IBM |
84 * @author Ralf Pfeiffer, IBM |
85 * @since PR-DOM-Level-1-19980818. |
85 * @since PR-DOM-Level-1-19980818. |
86 * @LastModified: Nov 2018 |
86 * @LastModified: Sept 2019 |
87 */ |
87 */ |
88 public class CoreDocumentImpl |
88 public class CoreDocumentImpl |
89 extends ParentNode implements Document { |
89 extends ParentNode implements Document { |
90 |
90 |
91 /** |
91 /** |
860 * DOM Level 3 CR - Experimental. |
860 * DOM Level 3 CR - Experimental. |
861 * version - An attribute specifying, as part of the XML declaration, |
861 * version - An attribute specifying, as part of the XML declaration, |
862 * the version number of this document. |
862 * the version number of this document. |
863 */ |
863 */ |
864 public void setXmlVersion(String value) { |
864 public void setXmlVersion(String value) { |
|
865 if (value == null) { |
|
866 return; |
|
867 } |
865 if(value.equals("1.0") || value.equals("1.1")){ |
868 if(value.equals("1.0") || value.equals("1.1")){ |
866 //we need to change the flag value only -- |
869 //we need to change the flag value only -- |
867 // when the version set is different than already set. |
870 // when the version set is different than already set. |
868 if(!getXmlVersion().equals(value)){ |
871 if(!getXmlVersion().equals(value)){ |
869 xmlVersionChanged = true ; |
872 xmlVersionChanged = true ; |