xalan-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mor...@apache.org
Subject cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
Date Fri, 12 Oct 2001 12:25:28 GMT
morten      01/10/12 05:25:27

  Modified:    java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
  Log:
  Changed the values for the output properties "OMIT_XML_DECLARATION" and
  "INDENT" from "true" and "false" to "yes" and "no".
  PR:		bugzilla 4039
  Obtained from:	n/a
  Submitted by:	morten@xml.apache.org
  Reviewed by:	morten@xml.apache.org
  
  Revision  Changes    Path
  1.26      +16 -11    xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerImpl.java
  
  Index: TransformerImpl.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/trax/TransformerImpl.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- TransformerImpl.java	2001/10/10 11:51:20	1.25
  +++ TransformerImpl.java	2001/10/12 12:25:27	1.26
  @@ -1,5 +1,5 @@
   /*
  - * @(#)$Id: TransformerImpl.java,v 1.25 2001/10/10 11:51:20 tmiller Exp $
  + * @(#)$Id: TransformerImpl.java,v 1.26 2001/10/12 12:25:27 morten Exp $
    *
    * The Apache Software License, Version 1.1
    *
  @@ -635,17 +635,19 @@
   	    else if (name.equals(OutputKeys.VERSION))
   		translet._version = value;
   	    else if (name.equals(OutputKeys.OMIT_XML_DECLARATION)) {
  -		if ((value != null) && (value.toLowerCase().equals("true"))) {
  +		if ((value != null) && (value.toLowerCase().equals("yes")))
   		    translet._omitHeader = true;
  -		}
  +		else
  +		    translet._omitHeader = false;
   	    }
   	    else if (name.equals(OutputKeys.INDENT)) {
  -		if ((value != null) && (value.toLowerCase().equals("true"))) {
  +		if ((value != null) && (value.toLowerCase().equals("yes")))
   		    translet._indent = true;
  -		}
  +		else
  +		    translet._indent = false;
   	    }
   	    else if (name.equals(OutputKeys.CDATA_SECTION_ELEMENTS)) {
  -		if ((value != null) && (value.toLowerCase().equals("true"))) {
  +		if (value != null) {
   		    translet._cdata = null; // clear previous setting
   		    StringTokenizer e = new StringTokenizer(value);
   		    while (e.hasMoreTokens()) {
  @@ -685,8 +687,10 @@
   	    value = _translet._method;
   	    if (value != null) second.setProperty(OutputKeys.METHOD, value);
   
  -	    value = (new Boolean(_translet._indent)).toString();
  -	    if (value != null) second.setProperty(OutputKeys.INDENT, value);
  +	    if (_translet._indent)
  +		second.setProperty(OutputKeys.INDENT, "yes");
  +	    else
  +		second.setProperty(OutputKeys.INDENT, "no");
   
   	    value = _translet._doctypePublic;
   	    if (value != null) 
  @@ -703,9 +707,10 @@
   	    value = _translet._mediaType;
   	    if (value != null) second.setProperty(OutputKeys.MEDIA_TYPE, value);
   
  -	    value = (new Boolean(_translet._omitHeader)).toString();
  -	    if (value != null) 
  -		second.setProperty(OutputKeys.OMIT_XML_DECLARATION, value);
  +	    if (_translet._omitHeader)
  +		second.setProperty(OutputKeys.OMIT_XML_DECLARATION, "no");
  +	    else
  +		second.setProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
   
   	    value = _translet._standalone;
   	    if (value != null) second.setProperty(OutputKeys.STANDALONE, value);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org


Mime
View raw message