phpxd-commits Mailing List for phpXD
Status: Beta
Brought to you by:
growbal
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(6) |
Jul
(4) |
Aug
|
Sep
(1) |
Oct
|
Nov
(14) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(49) |
Feb
(43) |
Mar
(15) |
Apr
|
May
|
Jun
(10) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
From: Thomas D. <th...@us...> - 2002-11-02 14:02:34
|
Update of /cvsroot/phpxd/phpXD/include/dom In directory usw-pr-cvs1:/tmp/cvs-serv30693 Modified Files: Node.php Log Message: Index: Node.php =================================================================== RCS file: /cvsroot/phpxd/phpXD/include/dom/Node.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Node.php 13 Feb 2002 21:21:47 -0000 1.4 --- Node.php 2 Nov 2002 14:02:31 -0000 1.5 *************** *** 471,475 **** for ($i = 0; $i < $this->attributes->getLength(); $i++) { $attr =& $this->attributes->item($i); ! $newAttr[$i] =& $attr->cloneNode(true, $ownerDocument); $newAttr[$i]->specified = true; if (!isset($oldAttr)) { --- 471,475 ---- for ($i = 0; $i < $this->attributes->getLength(); $i++) { $attr =& $this->attributes->item($i); ! $newAttr[$i] =& $attr->Node(true, $ownerDocument); $newAttr[$i]->specified = true; if (!isset($oldAttr)) { *************** *** 493,496 **** --- 493,497 ---- $child =& $this->childNodes->item($i); $newChild[$i] =& $child->cloneNode($deep, $ownerDocument); + $newChild[$i]->parentNode = &$clone; if (!isset($oldChild)) { $clone->firstChild = &$newChild[$i]; |
From: Thomas D. <th...@us...> - 2002-10-05 20:38:06
|
Update of /cvsroot/phpxd/phpXD/include/dom In directory usw-pr-cvs1:/tmp/cvs-serv13066 Modified Files: Document.php Log Message: Index: Document.php =================================================================== RCS file: /cvsroot/phpxd/phpXD/include/dom/Document.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -r1.7 -r1.8 *** Document.php 4 Mar 2002 16:58:42 -0000 1.7 --- Document.php 5 Oct 2002 20:38:03 -0000 1.8 *************** *** 303,307 **** * Returns a Element node from the current document whose id attribute * matches the given id.<br> ! * DOM-Level 2 -- NYI * * @public --- 303,307 ---- * Returns a Element node from the current document whose id attribute * matches the given id.<br> ! * DOM-Level 2 * * @public *************** *** 421,426 **** } ! if ((isset($parent->nextSibling)) && ($element != null)) { ! return $this->getElementByIdHelp($id, $parent->nextSibling, $result); } return $element; --- 421,426 ---- } ! if ((isset($parent->nextSibling)) && ($element == null)) { ! return $this->getElementByIdHelp($id, $dtd, $parent->nextSibling); } return $element; |
From: Thomas D. <th...@us...> - 2002-06-26 21:15:00
|
Update of /cvsroot/phpxd/phpXD/include/dom In directory usw-pr-cvs1:/tmp/cvs-serv3371/include/dom Modified Files: Entity.php Log Message: Index: Entity.php =================================================================== RCS file: /cvsroot/phpxd/phpXD/include/dom/Entity.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** Entity.php 14 Feb 2002 13:26:16 -0000 1.4 --- Entity.php 26 Jun 2002 21:14:57 -0000 1.5 *************** *** 26,30 **** /** ! * Die public identifier URL (URI) for this entity.<br> * DOM-Level 1 * --- 26,30 ---- /** ! * The public identifier URL (URI) for this entity.<br> * DOM-Level 1 * *************** *** 35,39 **** /** ! * Die system identifier URL (URI) for this entity.<br> * DOM-Level 1 * --- 35,39 ---- /** ! * The system identifier URL (URI) for this entity.<br> * DOM-Level 1 * |
From: Thomas D. <th...@us...> - 2002-06-26 20:53:26
|
Update of /cvsroot/phpxd/phpXD.www/include/phpXD/include In directory usw-pr-cvs1:/tmp/cvs-serv26259/include/phpXD/include Removed Files: attr.php cdatasection.php characterdata.php comment.php document.php documentfragment.php documenttype.php domexception.php domimplementation.php element.php entity.php entityreference.php namednodemap.php node.php nodelist.php processinginstruction.php text.php Log Message: no message --- attr.php DELETED --- --- cdatasection.php DELETED --- --- characterdata.php DELETED --- --- comment.php DELETED --- --- document.php DELETED --- --- documentfragment.php DELETED --- --- documenttype.php DELETED --- --- domexception.php DELETED --- --- domimplementation.php DELETED --- --- element.php DELETED --- --- entity.php DELETED --- --- entityreference.php DELETED --- --- namednodemap.php DELETED --- --- node.php DELETED --- --- nodelist.php DELETED --- --- processinginstruction.php DELETED --- --- text.php DELETED --- |
From: Thomas D. <th...@us...> - 2002-06-26 20:53:26
|
Update of /cvsroot/phpxd/phpXD.www/classes In directory usw-pr-cvs1:/tmp/cvs-serv26259/classes Removed Files: .htaccess Site.php Sites.php StaticSite.php Log Message: no message --- .htaccess DELETED --- --- Site.php DELETED --- --- Sites.php DELETED --- --- StaticSite.php DELETED --- |
From: Thomas D. <th...@us...> - 2002-06-26 20:53:26
|
Update of /cvsroot/phpxd/phpXD.www/stylesheets In directory usw-pr-cvs1:/tmp/cvs-serv26259/stylesheets Removed Files: netscape.css print.css screen.css Log Message: no message --- netscape.css DELETED --- --- print.css DELETED --- --- screen.css DELETED --- |
From: Thomas D. <th...@us...> - 2002-06-26 20:53:26
|
Update of /cvsroot/phpxd/phpXD.www/data/en In directory usw-pr-cvs1:/tmp/cvs-serv26259/data/en Removed Files: index.xml navigation.xml readme.xml releases.xml Log Message: no message --- index.xml DELETED --- --- navigation.xml DELETED --- --- readme.xml DELETED --- --- releases.xml DELETED --- |
From: Thomas D. <th...@us...> - 2002-06-26 20:53:26
|
Update of /cvsroot/phpxd/phpXD.www/templates In directory usw-pr-cvs1:/tmp/cvs-serv26259/templates Removed Files: .htaccess template.html Log Message: no message --- .htaccess DELETED --- --- template.html DELETED --- |
From: Thomas D. <th...@us...> - 2002-06-26 20:53:26
|
Update of /cvsroot/phpxd/phpXD.www/include In directory usw-pr-cvs1:/tmp/cvs-serv26259/include Removed Files: .htaccess Log Message: no message --- .htaccess DELETED --- |
From: Thomas D. <th...@us...> - 2002-06-26 20:53:26
|
Update of /cvsroot/phpxd/phpXD.www/data In directory usw-pr-cvs1:/tmp/cvs-serv26259/data Removed Files: .htaccess Log Message: no message --- .htaccess DELETED --- |
From: Thomas D. <th...@us...> - 2002-06-26 20:53:26
|
Update of /cvsroot/phpxd/phpXD.www In directory usw-pr-cvs1:/tmp/cvs-serv26259 Removed Files: default.php Log Message: no message --- default.php DELETED --- |
From: Thomas D. <th...@us...> - 2002-06-26 20:53:26
|
Update of /cvsroot/phpxd/phpXD.www/include/phpXD In directory usw-pr-cvs1:/tmp/cvs-serv26259/include/phpXD Removed Files: LICENSE phpXD.php Log Message: no message --- LICENSE DELETED --- --- phpXD.php DELETED --- |
From: Growbal K. <gr...@us...> - 2002-03-08 17:54:12
|
Update of /cvsroot/phpxd/phpXD/samples/cfg2xml In directory usw-pr-cvs1:/tmp/cvs-serv15150 Modified Files: Cfg2xml.php Log Message: no message Index: Cfg2xml.php =================================================================== RCS file: /cvsroot/phpxd/phpXD/samples/cfg2xml/Cfg2xml.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Cfg2xml.php 8 Mar 2002 17:49:47 -0000 1.3 --- Cfg2xml.php 8 Mar 2002 17:54:06 -0000 1.4 *************** *** 157,161 **** $sumType = $sumTypeArr[ getColumn($lineArray, 5) ]; $fieldUnit = getColumn($lineArray, 6); ! $defaultValue = $defaultValue; $labStd["M"]["upper"] = getColumn($lineArray, 8); $labStd["M"]["lower"] = getColumn($lineArray, 9); --- 157,161 ---- $sumType = $sumTypeArr[ getColumn($lineArray, 5) ]; $fieldUnit = getColumn($lineArray, 6); ! $defaultValue = getColumn($lineArray, 7); $labStd["M"]["upper"] = getColumn($lineArray, 8); $labStd["M"]["lower"] = getColumn($lineArray, 9); |
From: Growbal K. <gr...@us...> - 2002-03-08 17:49:51
|
Update of /cvsroot/phpxd/phpXD/samples/cfg2xml In directory usw-pr-cvs1:/tmp/cvs-serv13918 Added Files: Cfg2xml.php Log Message: no message |
From: Growbal K. <gr...@us...> - 2002-03-08 17:25:49
|
Update of /cvsroot/phpxd/phpXD/samples/cfg2xml In directory usw-pr-cvs1:/tmp/cvs-serv6660/samples/cfg2xml Removed Files: Cfg2xml.php Log Message: no message --- Cfg2xml.php DELETED --- |
From: Growbal K. <gr...@us...> - 2002-03-08 06:54:35
|
Update of /cvsroot/phpxd/phpXD/samples/cfg2xml In directory usw-pr-cvs1:/tmp/cvs-serv25305/samples/cfg2xml Added Files: Cfg2xml.php Log Message: Add sample files: samples/cfg2xml/cfg2xml.php samples/files/fielddef1.cfg --- NEW FILE: Cfg2xml.php --- <?php // phpXMLDOM - an XML DOM Implementation // // This Software and all associated files are released unter the // GNU Public License (GPL), see LICENSE for details. // // $Id: Cfg2xml.php,v 1.1 2002/03/08 06:54:32 growbal Exp $ /** * Sample PHP script for using phpXMLDOM. Converts the file ../files/fielddef1.cfg * to fielddef1.xml and prints it out. * * @package phpXD * @author Growbal Kuo <gr...@ta...> * @version $Revision: 1.1 $ */ define( "PHPXD_INCLUDE_DIR", "d:/dev/cvs/phpXD/" ); include( PHPXD_INCLUDE_DIR . "phpXD.php" ); //=========================================================== /** * Gets the value of cfg file.<br> * * * * @param $str <code>string</code> * @param $col <code>int</code> * @returns string */ function getColumn($str, $col) { $str = trim($str); $str = trim(stristr($str, " ")); $arr = split(",",$str); if ( $col >= count($arr)) return ""; return trim($arr[$col]); } //=========================================================== function convertFile($FieldDefFile) { if (! ($file= fopen($FieldDefFile, "r"))) { echo("file FieldDefFile open error"); exit(); } else { $doc = new Document(); $root =& $doc->createElement("fields"); $lines = file($FieldDefFile); while (list($key, $value) = each($lines)) { $ele =& convertLine ( $value, $doc); if (get_class ($ele)=="element" ) { $root->appendChild( $ele ); } } fclose($file); $doc->appendChild($root); } return $doc; } function newElement($tagname, $content, $doc) { $ret =& $doc->createElement($tagname); if (trim($content)!="") { $text = new Text(); $text -> setData($content); $ret->appendChild($text); } return $ret; } function convertLine($line, $doc) { //... definition of cfg file // fieldtypeForInput: 1:simple text, 2:text with select menu 3:textArea 4:only menu 5:teeth // varType: 0:decimal, 1:text // sumType: 0:no sum, 1:simple expression, 2:lab data(justify with max and min), // 3: fields with menu 4: urine cells data 5:+ ++ +++... 6: only + - // fieldUnit: unit of the field or other description or instruction // will display on the screen at the tail of the field $fieldTypeArr = array ( "1" => "simple_text", "2" => "menu_text", "3" => "text_area", "4" => "menu", "5" => "teeth" ); $varTypeArr = array( "0" => "decimal", "1" => "text" ); $sumTypeArr = array( "0" => "no_sum", "1" => "simple_sum", "2" => "lab", "3" => "menu", "4" => "urine_cell", "5" => "multiple+-", "6" => "single+-" ); if (strtolower(substr(trim($line), 0, 6)) == "field ") { $caption = getColumn($line, 0); $maxLen = getColumn($line, 1); $fieldName = strtoupper( getColumn($line, 2) ); $fieldType = $fieldTypeArr[ getColumn($line, 3) ]; $varType = $varTypeArr[ getColumn($line, 4) ]; $sumType = $sumTypeArr[ getColumn($line, 5) ]; $fieldUnit = getColumn($line, 6); $defaultValue = $defaultValue; $labStd["M"]["upper"] = getColumn($line, 8); $labStd["M"]["lower"] = getColumn($line, 9); $labStd["F"]["upper"] = getColumn($line, 10); $labStd["F"]["lower"] = getColumn($line, 11); $sumText = $caption; $field_ele =& newElement("field", "", $doc); $field_ele ->setAttribute( "name", $fieldName ); $field_ele ->appendChild( newElement( "caption" , $caption, $doc)); $field_ele ->appendChild( newElement( "sumText", $caption, $doc)); $field_ele ->appendChild( newElement( "maxLen", $maxLen, $doc)); $field_ele ->appendChild( newElement( "fieldtype", $fieldType, $doc)); $field_ele ->appendChild( newElement( "varType", $varType , $doc)); $field_ele ->appendChild( newElement( "sumType", $sumType, $doc)); $field_ele ->appendChild( newElement( "fieldUnit", $fieldUnit, $doc)); $defaultValue_ele =& $field_ele->appendChild( newElement("defaultValue","", $doc)); $defaultValue_ele->appendChild( newElement( "common", $defaultValue,$doc) ); if ($sumType=="lab") { $limit_ele =& newElement("limit", "", $doc); if ($labStd["M"]["upper"]==$labStd["F"]["upper"] && $labStd["M"]["lower"]==$labStd["F"]["lower"]) { $lower_ele =& newElement("lower", "", $doc); $lower_ele->appendChild(newElement("official", $labStd["M"]["lower"], $doc)); $upper_ele =& newElement("upper", "", $doc); $upper_ele->appendChild(newElement("official", $labStd["M"]["upper"], $doc)); $common_ele =& newElement("common", "", $doc); $common_ele->appendChild($lower_ele); $common_ele->appendChild($upper_ele); $limit_ele->appendChild($common_ele); } else { $lower_ele =& newElement("lower", "", $doc); $lower_ele->appendChild(newElement("official", $labStd["M"]["lower"], $doc)); $upper_ele =& newElement("upper", "", $doc); $upper_ele->appendChild(newElement("official", $labStd["M"]["upper"], $doc)); $male_ele =& newElement("male", "", $doc); $male_ele->appendChild($lower_ele); $male_ele->appendChild($upper_ele); $limit_ele->appendChild($male_ele); $lower_ele =& newElement("lower", "", $doc); $lower_ele->appendChild(newElement("official", $labStd["F"]["lower"], $doc)); $upper_ele =& newElement("upper", "", $doc); $upper_ele->appendChild(newElement("official", $labStd["F"]["upper"], $doc)); $female_ele =& newElement("female", "", $doc); $female_ele->appendChild($lower_ele); $female_ele->appendChild($upper_ele); $limit_ele->appendChild($female_ele); } $field_ele->appendChild( $limit_ele); } } else $field_ele = null; return $field_ele; } //================================== $filename = "../files/fielddef1"; //... build a DOM Document object from a file $document =& convertFile($filename.".cfg"); //... build a DOMWriter object , set the encoding $dw = new DOMWriter(); $dw->encoding = "Big5"; //... write output to file test.xml $dw->writeNode($filename.".xml", $document); //... write output to stdout $dw->writeNode("php://stdout", $document); //... write output to stdout //echo $dw->writeToString($document); ?> |
From: Growbal K. <gr...@us...> - 2002-03-08 06:54:35
|
Update of /cvsroot/phpxd/phpXD/samples/files In directory usw-pr-cvs1:/tmp/cvs-serv25305/samples/files Added Files: fielddef1.cfg Log Message: Add sample files: samples/cfg2xml/cfg2xml.php samples/files/fielddef1.cfg --- NEW FILE: fielddef1.cfg --- # # Field Define for 90 (2001) Exam , new patient # # identifier # 0 caption, # 1 maxlen, # 2 fieldname, # 3 fieldtypeForInput, # 4 vartype, # 5 SumType, # 6 fieldUnit, # // 7 SumText, # 7 Default value when ADD # 8 UpperLimitMale, # 9 LowerLimitMale, # 10 UpperLimitFemale, # 11 LowerLimitFemale # # fieldtypeForInput: 1:simple text, 2:text with select menu 3:textArea # vartype: 0:decimal, 1:text # SumType: 0:no sum, 1:simple expression, 2:lab data(justify with max and min), # 3: fields with menu 4: urine cells data # fieldUnit: unit of the field or other description or instruction # will display on the screen at the tail of the field # # SumText: title of the field for display, (not necessary now!) field WBC ,6, WBC ,1,0,2,*10^3/ul ,, 10.80, 4.00, 10.80, 4.00 field RBC ,5, RBC ,1,0,2,*10^3/ul ,, 6.10, 4.20, 5.40, 4.00 field HGB ,4, HB ,1,0,2,g/dl ,, 18.0, 12.0, 16.0, 12.0 Field HCT , 4, HCT ,1,0,2,% ,, 52.0, 37.0, 47.0, 35.0 field MCV , 5, MCV ,1,0,2,fl ,, 99.0, 80.0, 99.9, 80.0 field MCH , 4, MCH ,1,0,2,pg ,, 31.0, 27.0, 31.0, 27.0 field MCHC , 4, MCHC ,1,0,2,g/dl ,, 37.0, 33.0, 37.0, 33.0 field Platelet , 5, PLT ,1,0,2,*10^3/ul ,,400,130,400,130 Field Neutrophil , 4, NEU ,1,0,2,% ,, 74.0, 40.0, 74.0, 40.0 field Lymphocyte , 4, LYM ,1,0,2,% ,, 50.0, 19.0, 50.0, 19.0 field Monocyte , 4, MON ,1,0,2,% ,, 12.0, 2.0, 12.0, 2.0 field Eosinophil , 4, EOS ,1,0,2,% ,, 7.0, 0.0, 7.0, 0.0 field Basophil , 4, BAS ,1,0,2,% ,, 1.5, 0.0, 1.5, 0.0 |
From: Growbal K. <gr...@us...> - 2002-03-08 06:54:35
|
Update of /cvsroot/phpxd/phpXD In directory usw-pr-cvs1:/tmp/cvs-serv25305 Modified Files: phpXD.php Log Message: Add sample files: samples/cfg2xml/cfg2xml.php samples/files/fielddef1.cfg Index: phpXD.php =================================================================== RCS file: /cvsroot/phpxd/phpXD/phpXD.php,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -r1.29 -r1.30 *** phpXD.php 3 Mar 2002 06:23:14 -0000 1.29 --- phpXD.php 8 Mar 2002 06:54:32 -0000 1.30 *************** *** 8,12 **** // Set $path to the home directory of phpXMLDOM: ! $path = ""; require($path."include/dom.php"); --- 8,12 ---- // Set $path to the home directory of phpXMLDOM: ! $path = PHPXD_INCLUDE_DIR; require($path."include/dom.php"); |
From: Growbal K. <gr...@us...> - 2002-03-08 06:50:49
|
Update of /cvsroot/phpxd/phpXD/samples/cfg2xml In directory usw-pr-cvs1:/tmp/cvs-serv24725/cfg2xml Log Message: Directory /cvsroot/phpxd/phpXD/samples/cfg2xml added to the repository |
From: Thomas D. <th...@us...> - 2002-03-04 16:58:46
|
Update of /cvsroot/phpxd/phpXD/doc In directory usw-pr-cvs1:/tmp/cvs-serv14473/doc Modified Files: Document.html allclasses-frame.html Added Files: DOMWriter.html Log Message: --- NEW FILE: DOMWriter.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc on Mon Mar 04 17:54:31 CET 2002 --> <TITLE> phpXMLDOM: API Documentation - Class DOMWriter </TITLE> <LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> </HEAD> <BODY BGCOLOR="white"> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_top"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="DOMParser.html"><B>PREV CLASS</B></A> <A HREF="DTDParser.html"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="DOMWriter.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <!-- =========== END OF NAVBAR =========== --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> Class DOMWriter</H2> <PRE> <B>DOMWriter</B> </PRE> <HR> <DL> <DT>public class <B>DOMWriter</B></DL> <P> Class representing the DOMWriter interface. <P> <HR> <P> <!-- ======== INNER CLASS SUMMARY ======== --> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Field Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> string</CODE></FONT></TD> <TD><CODE><B><A HREF="DOMWriter.html#$encoding">$encoding</A></B></CODE> <BR> The character encoding in which the output will be written. </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> string</CODE></FONT></TD> <TD><CODE><B><A HREF="DOMWriter.html#$errorHandler">$errorHandler</A></B></CODE> <BR> The error handler that will receive error notifications during serialization. </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>private string</CODE></FONT></TD> <TD><CODE><B><A HREF="DOMWriter.html#$lastEncoding">$lastEncoding</A></B></CODE> <BR> The actual character encoding that was last used by this formatter. </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>private array</CODE></FONT></TD> <TD><CODE><B><A HREF="DOMWriter.html#$namedFeatures">$namedFeatures</A></B></CODE> <BR> An array for saving DOMWriter's names features. </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> string</CODE></FONT></TD> <TD><CODE><B><A HREF="DOMWriter.html#$newLine">$newLine</A></B></CODE> <BR> The end-of-line sequence of characters to be used in the XML being written out. </TD> </TR> </TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="DOMWriter.html#DOMWriter()">DOMWriter</A></B>()</CODE> <BR> Constructor of the class.<br></TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Method Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>private boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="DOMWriter.html#canRecognizeFeatureName(var)">canRecognizeFeatureName</A></B>(var $name)</CODE> <BR> Returns true if the feature could be successfully set.<br></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="DOMWriter.html#canSetFeature(var, var)">canSetFeature</A></B>(var $name, var $state)</CODE> <BR> Returns true if the feature could be successfully set to the specified value.<br> DOM-Level 3</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="DOMWriter.html#getFeature(var)">getFeature</A></B>(var $name)</CODE> <BR> Returns the current state of the feature (true or false).<br> DOM-Level 3</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>private string</CODE></FONT></TD> <TD><CODE><B><A HREF="DOMWriter.html#printIndent(var)">printIndent</A></B>(var $indent)</CODE> <BR> Print indents for pretty format<br></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="DOMWriter.html#setFeature(var, var)">setFeature</A></B>(var $name, var $state)</CODE> <BR> Returns true if the feature could be successfully set to the specified value.<br> DOM-Level 3</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="DOMWriter.html#writeNode(var, var)">writeNode</A></B>(var $destination, var $wnode)</CODE> <BR> Write out the specified node in the description of DOMWriter. </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> string</CODE></FONT></TD> <TD><CODE><B><A HREF="DOMWriter.html#writeToString(var)">writeToString</A></B>(var $wnode)</CODE> <BR> Serialize the specified node in the description of DOMWriter.<br> DOM-Level 3</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>private void</CODE></FONT></TD> <TD><CODE><B><A HREF="DOMWriter.html#writeToString2(var, var, var, var)">writeToString2</A></B>(var $dom, var $trim, var $indent, var $text)</CODE> <BR> Serialize the specified node in the description of DOMWriter.<br></TD> </TR> </TABLE> <P> <!-- ============ FIELD DETAIL =========== --> <A NAME="field_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Field Detail</B></FONT></TD> </TR> </TABLE> <A NAME="$namedFeatures"><!-- --></A><H3> $namedFeatures</H3> <PRE> private array <B>$namedFeatures</B></PRE> <DL> <DD>An array for saving DOMWriter's names features. The array keys are the feature names. The array values are the feature states (true or false).<br> DOM-Level 3</DL> <HR> <A NAME="$encoding"><!-- --></A><H3> $encoding</H3> <PRE> public string <B>$encoding</B></PRE> <DL> <DD>The character encoding in which the output will be written. The encoding to use when writing is determined as follows: <br><ul> <li>If the encoding attribute has been set, that value will be used. <br> <li>If the encoding attribute is null or empty, but the item to be written includes an encoding declaration, that value will be used.<br> <li>If neither of the above provides an encoding name, a default encoding of "UTF-8" will be used. </ul><br> DOM-Level 3</DL> <HR> <A NAME="$lastEncoding"><!-- --></A><H3> $lastEncoding</H3> <PRE> private string <B>$lastEncoding</B></PRE> <DL> <DD>The actual character encoding that was last used by this formatter. This convenience method allows the encoding that was used when serializing a document to be directly obtained.<br> DOM-Level 3</DL> <HR> <A NAME="$errorHandler"><!-- --></A><H3> $errorHandler</H3> <PRE> public string <B>$errorHandler</B></PRE> <DL> <DD>The error handler that will receive error notifications during serialization. The node where the error occured is passed to this error handler, any modification to nodes from within an error callback should be avoided since this will result in undefined, implementation dependent behavior.<br> DOM-Level 3</DL> <HR> <A NAME="$newLine"><!-- --></A><H3> $newLine</H3> <PRE> public string <B>$newLine</B></PRE> <DL> <DD>The end-of-line sequence of characters to be used in the XML being written out. The only permitted values are these: <br><ul> <li>null <li>CR <li>CR-LF <li>LF</ul><br> DOM-Level 3</DL> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TD> </TR> </TABLE> <A NAME="DOMWriter()"><!-- --></A><H3> DOMWriter</H3> <PRE> public <B>DOMWriter</B>()</PRE> <DL> <DD>Constructor of the class.<br></DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Method Detail</B></FONT></TD> </TR> </TABLE> <A NAME="setFeature(var, var)"><!-- --></A><H3> setFeature</H3> <PRE> public void <B>setFeature</B>(var $name, var $state)</PRE> <DL> <DD>Returns true if the feature could be successfully set to the specified value.<br> DOM-Level 3<DD><DL> <DT><B>Parameters:</B><DD><CODE>$name</CODE> - <code>string</code><DD><CODE>$state</CODE> - <code>boolean</code></DL> </DD> </DL> <HR> <A NAME="canRecognizeFeatureName(var)"><!-- --></A><H3> canRecognizeFeatureName</H3> <PRE> private boolean <B>canRecognizeFeatureName</B>(var $name)</PRE> <DL> <DD>Returns true if the feature could be successfully set.<br><DD><DL> <DT><B>Parameters:</B><DD><CODE>$name</CODE> - <code>string</code></DL> </DD> </DL> <HR> <A NAME="canSetFeature(var, var)"><!-- --></A><H3> canSetFeature</H3> <PRE> public boolean <B>canSetFeature</B>(var $name, var $state)</PRE> <DL> <DD>Returns true if the feature could be successfully set to the specified value.<br> DOM-Level 3<DD><DL> <DT><B>Parameters:</B><DD><CODE>$name</CODE> - <code>string</code><DD><CODE>$state</CODE> - <code>boolean</code></DL> </DD> </DL> <HR> <A NAME="getFeature(var)"><!-- --></A><H3> getFeature</H3> <PRE> public boolean <B>getFeature</B>(var $name)</PRE> <DL> <DD>Returns the current state of the feature (true or false).<br> DOM-Level 3<DD><DL> <DT><B>Parameters:</B><DD><CODE>$name</CODE> - <code>string</code></DL> </DD> </DL> <HR> <A NAME="writeNode(var, var)"><!-- --></A><H3> writeNode</H3> <PRE> public boolean <B>writeNode</B>(var $destination, var $wnode)</PRE> <DL> <DD>Write out the specified node in the description of DOMWriter. Destination can be in these PHP supported output:<ul> <li> "/home/rasmus/file.xml" <li> "ftp:/ /user:pas...@ex.../file.xml" <li> "php:/ /stdout", or "php:/ /stderr"</ul> On the Windows platform, be careful to escape any backslashes used in the path to the file, or use forward slashes: "c:\\data\\file.xml".<br> DOM-Level 3<DD><DL> <DT><B>Parameters:</B><DD><CODE>$destination</CODE> - <code>string</code><DD><CODE>$wnode</CODE> - <code>Node</code></DL> </DD> </DL> <HR> <A NAME="writeToString(var)"><!-- --></A><H3> writeToString</H3> <PRE> public string <B>writeToString</B>(var $wnode)</PRE> <DL> <DD>Serialize the specified node in the description of DOMWriter.<br> DOM-Level 3<DD><DL> <DT><B>Parameters:</B><DD><CODE>$wnode</CODE> - <code>Node</code></DL> </DD> </DL> <HR> <A NAME="printIndent(var)"><!-- --></A><H3> printIndent</H3> <PRE> private string <B>printIndent</B>(var $indent)</PRE> <DL> <DD>Print indents for pretty format<br><DD><DL> <DT><B>Parameters:</B><DD><CODE>$indent</CODE> - <code>int</code></DL> </DD> </DL> <HR> <A NAME="writeToString2(var, var, var, var)"><!-- --></A><H3> writeToString2</H3> <PRE> private void <B>writeToString2</B>(var $dom, var $trim, var $indent, var $text)</PRE> <DL> <DD>Serialize the specified node in the description of DOMWriter.<br><DD><DL> <DT><B>Parameters:</B><DD><CODE>$dom</CODE> - <code>Node</code><DD><CODE>$trim</CODE> - <code>boolean</code><DD><CODE>$indent</CODE> - <code>string</code><DD><CODE>&$text</CODE> - <code>string</code><DD><CODE>$dom</CODE> - is passed by reference<DD><CODE>$text</CODE> - is passed by reference</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_bottom"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="DOMParser.html"><B>PREV CLASS</B></A> <A HREF="DTDParser.html"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="DOMWriter.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <!-- =========== END OF NAVBAR =========== --> <HR> </BODY> </HTML> Index: Document.html =================================================================== RCS file: /cvsroot/phpxd/phpXD/doc/Document.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** Document.html 9 Feb 2002 17:56:15 -0000 1.3 --- Document.html 4 Mar 2002 16:58:42 -0000 1.4 *************** *** 3,9 **** <HTML> <HEAD> ! <!-- Generated by javadoc on Sat Feb 09 18:40:34 CET 2002 --> <TITLE> ! phpXMLDOM: API Documentation - Class Document </TITLE> <LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> --- 3,9 ---- <HTML> <HEAD> ! <!-- Generated by javadoc on Mon Mar 04 17:56:34 CET 2002 --> <TITLE> ! phpXMLDOM: API Documentation - Class Document </TITLE> <LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> *************** *** 450,454 **** <DD>Creates an Attribute node.<br> DOM-Level 1<DD><DL> ! <DT><B>Parameters:</B><DD><CODE>$name</CODE> - <code>string</code><DD><CODE>$value</CODE> - <code>string</code></DL> </DD> </DL> --- 450,454 ---- <DD>Creates an Attribute node.<br> DOM-Level 1<DD><DL> ! <DT><B>Parameters:</B><DD><CODE>$name</CODE> - <code>string</code></DL> </DD> </DL> *************** *** 462,466 **** <DD>Creates a CDataSection node.<br> DOM-Level 1<DD><DL> ! <DT><B>Parameters:</B><DD><CODE>$data</CODE> - </DL> </DD> </DL> --- 462,466 ---- <DD>Creates a CDataSection node.<br> DOM-Level 1<DD><DL> ! <DT><B>Parameters:</B><DD><CODE>$data</CODE> - <code>string</code></DL> </DD> </DL> Index: allclasses-frame.html =================================================================== RCS file: /cvsroot/phpxd/phpXD/doc/allclasses-frame.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** allclasses-frame.html 9 Feb 2002 17:56:15 -0000 1.3 --- allclasses-frame.html 4 Mar 2002 16:58:42 -0000 1.4 *************** *** 3,9 **** <HTML> <HEAD> ! <!-- Generated by javadoc on Sat Feb 09 18:40:34 CET 2002 --> <TITLE> ! phpXMLDOM: API Documentation - All Classes </TITLE> <LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> --- 3,9 ---- <HTML> <HEAD> ! <!-- Generated by javadoc on Mon Mar 04 17:54:31 CET 2002 --> <TITLE> ! All Classes </TITLE> <LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> *************** *** 33,36 **** --- 33,40 ---- <BR> <A HREF="DOMParser.html" TARGET="classFrame">DOMParser</A> + <BR> + <A HREF="DOMWriter.html" TARGET="classFrame">DOMWriter</A> + <BR> + <A HREF="DTDParser.html" TARGET="classFrame">DTDParser</A> <BR> <A HREF="Element.html" TARGET="classFrame">Element</A> |
From: Thomas D. <th...@us...> - 2002-03-04 16:58:46
|
Update of /cvsroot/phpxd/phpXD/include/dom In directory usw-pr-cvs1:/tmp/cvs-serv14473/include/dom Modified Files: DOMWriter.php Document.php Log Message: Index: DOMWriter.php =================================================================== RCS file: /cvsroot/phpxd/phpXD/include/dom/DOMWriter.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -r1.1 -r1.2 *** DOMWriter.php 3 Mar 2002 06:23:16 -0000 1.1 --- DOMWriter.php 4 Mar 2002 16:58:42 -0000 1.2 *************** *** 9,13 **** /** * Class representing the DOMWriter interface. - * * * @package phpXD --- 9,12 ---- *************** *** 17,25 **** */ class DOMWriter { - /** ! * An array for saving DOMWriter's names features.<br> ! * array keys are feature names. array values are feature states(true or false).<br> ! * * DOM-Level 3 * --- 16,23 ---- */ class DOMWriter { /** ! * An array for saving DOMWriter's names features. ! * The array keys are the feature names. The array values are the ! * feature states (true or false).<br> * DOM-Level 3 * *************** *** 27,43 **** * @type array */ - var $namedFeatures; /** ! * The character encoding in which the output will be written.<br> ! * The encoding to use when writing is determined as follows: <br> * <li>If the encoding attribute has been set, that value will be used. <br> ! * <li>If the encoding attribute is null or empty, but the item to be <br> ! * written includes an encoding declaration, that value will be used. <br> ! * <li>If neither of the above provides an encoding name, a default encoding <br> ! * of "UTF-8" will be used. <br> ! ! * DOM-Level 3 * --- 25,38 ---- * @type array */ var $namedFeatures; /** ! * The character encoding in which the output will be written. ! * The encoding to use when writing is determined as follows: <br><ul> * <li>If the encoding attribute has been set, that value will be used. <br> ! * <li>If the encoding attribute is null or empty, but the item to be ! * written includes an encoding declaration, that value will be used.<br> ! * <li>If neither of the above provides an encoding name, a default ! * encoding of "UTF-8" will be used. </ul><br> * DOM-Level 3 * *************** *** 45,57 **** * @type string */ - var $encoding; /** ! * The actual character encoding that was last used by this formatter.<br> ! * This convenience method allows the encoding that was used <br> * when serializing a document to be directly obtained.<br> - * Readonly<br> - * * DOM-Level 3 * --- 40,49 ---- * @type string */ var $encoding; /** ! * The actual character encoding that was last used by this formatter. ! * This convenience method allows the encoding that was used * when serializing a document to be directly obtained.<br> * DOM-Level 3 * *************** *** 59,72 **** * @type string */ - var $lastEncoding; /** ! * The error handler that will receive error notifications <br> ! * during serialization. The node where the error occured is <br> ! * passed to this error handler, any modification to nodes <br> ! * from within an error callback should be avoided since this<br> ! * will result in undefined, implementation dependent behavior.<br> ! * * DOM-Level 3 * --- 51,63 ---- * @type string */ var $lastEncoding; /** ! * The error handler that will receive error notifications ! * during serialization. ! * The node where the error occured is passed to this error handler, ! * any modification to nodes from within an error callback should be ! * avoided since this will result in undefined, implementation dependent ! * behavior.<br> * DOM-Level 3 * *************** *** 74,88 **** * @type string */ - var $errorHandler; /** ! * The end-of-line sequence of characters to be used in<br> ! * the XML being written out. The only permitted values are these: <br> ! * <li> null<br> ! * <li> CR <br> ! * <li> CR-LF <br> ! * <li> LF <br> ! * * DOM-Level 3 * --- 65,77 ---- * @type string */ var $errorHandler; /** ! * The end-of-line sequence of characters to be used in ! * the XML being written out. The only permitted values are these: <br><ul> ! * <li>null ! * <li>CR ! * <li>CR-LF ! * <li>LF</ul><br> * DOM-Level 3 * *************** *** 90,94 **** * @type string */ - var $newLine; --- 79,82 ---- *************** *** 111,119 **** $this->encoding = "UTF-8"; ! $this->$newLine = "\n"; //LF } /** ! * Returns true if the feature could be successfully set to the specified value.<br> * DOM-Level 3 * --- 99,108 ---- $this->encoding = "UTF-8"; ! $this->newLine = "\n"; //LF } /** ! * Returns true if the feature could be successfully set to the specified ! * value.<br> * DOM-Level 3 * *************** *** 124,128 **** */ function setFeature($name, $state) { ! if ($this->canSetFeatureName($name)) if ($this->canSetFeature($name, $state)) { $this->namedFeatures[$name] = $state; --- 113,117 ---- */ function setFeature($name, $state) { ! if ($this->canSetFeatureName($name)) { if ($this->canSetFeature($name, $state)) { $this->namedFeatures[$name] = $state; *************** *** 134,144 **** } ! } else return NOT_SUPPORTED_ERR; ! else return NOT_FOUND_ERR; } - /** * Returns true if the feature could be successfully set.<br> --- 123,136 ---- } ! } ! else { return NOT_SUPPORTED_ERR; ! } ! } ! else { return NOT_FOUND_ERR; + } } /** * Returns true if the feature could be successfully set.<br> *************** *** 153,159 **** } - /** ! * Returns true if the feature could be successfully set to the specified value.<br> * DOM-Level 3 * --- 145,151 ---- } /** ! * Returns true if the feature could be successfully set to the specified ! * value.<br> * DOM-Level 3 * *************** *** 164,172 **** */ function canSetFeature($name, $state) { ! $canSetState = ($state===true || $state===false); return canRecognizeFeatureName($name) && $canSetState; } - /** * Returns the current state of the feature (true or false).<br> --- 156,163 ---- */ function canSetFeature($name, $state) { ! $canSetState = ($state === true || $state === false); return canRecognizeFeatureName($name) && $canSetState; } /** * Returns the current state of the feature (true or false).<br> *************** *** 178,201 **** */ function getFeature($name) { ! if ($this->canRecognizeFeatureName($name)) return $this->namedFeatures[$name]; ! else return NOT_FOUND_ERR; } - /** ! * Write out the specified node in the description of DOMWriter. <br> ! * ! * Destination can be in these PHP supported output: * <li> "/home/rasmus/file.xml" ! * <li> "ftp://user:pas...@ex.../file.xml" ! * <li> "php://stdout", or "php://stderr" ! * ! * On the Windows platform, be careful to escape any backslashes <br> * used in the path to the file, or use forward slashes: ! * "c:\\data\\file.xml" ! * ! * * DOM-Level 3 * --- 169,189 ---- */ function getFeature($name) { ! if ($this->canRecognizeFeatureName($name)) { return $this->namedFeatures[$name]; ! } ! else { return NOT_FOUND_ERR; + } } /** ! * Write out the specified node in the description of DOMWriter. ! * Destination can be in these PHP supported output:<ul> * <li> "/home/rasmus/file.xml" ! * <li> "ftp:/ /user:pas...@ex.../file.xml" ! * <li> "php:/ /stdout", or "php:/ /stderr"</ul> ! * On the Windows platform, be careful to escape any backslashes * used in the path to the file, or use forward slashes: ! * "c:\\data\\file.xml".<br> * DOM-Level 3 * *************** *** 206,210 **** */ function writeNode($destination, $wnode) { - $ok = true; if ($fp = fopen($destination, "w")) { --- 194,197 ---- *************** *** 215,224 **** fclose($fp); } ! else $ok = false; return $ok; } - /** * Serialize the specified node in the description of DOMWriter.<br> --- 202,211 ---- fclose($fp); } ! else { $ok = false; + } return $ok; } /** * Serialize the specified node in the description of DOMWriter.<br> *************** *** 235,243 **** } - - /** * Print indents for pretty format<br> - * * * @private --- 222,227 ---- *************** *** 259,263 **** /** * Serialize the specified node in the description of DOMWriter.<br> - * * * @private --- 243,246 ---- *************** *** 269,273 **** */ function writeToString2(&$dom, $trim, $indent, &$text) { ! $newLine=$this->$newLine; $indentStr = $this->printIndent($indent); --- 252,256 ---- */ function writeToString2(&$dom, $trim, $indent, &$text) { ! $newLine = $this->newLine; $indentStr = $this->printIndent($indent); Index: Document.php =================================================================== RCS file: /cvsroot/phpxd/phpXD/include/dom/Document.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** Document.php 13 Feb 2002 22:47:40 -0000 1.6 --- Document.php 4 Mar 2002 16:58:42 -0000 1.7 *************** *** 96,100 **** * @public * @param $name <code>string</code> - * @param $value <code>string</code> * @returns Attr */ --- 96,99 ---- *************** *** 112,116 **** * * @public ! * @param $data * @returns CDataSection */ --- 111,115 ---- * * @public ! * @param $data <code>string</code> * @returns CDataSection */ |
From: Growbal K. <gr...@us...> - 2002-03-03 06:23:48
|
Update of /cvsroot/phpxd/phpXD/include In directory usw-pr-cvs1:/tmp/cvs-serv8265/include Modified Files: dom.php Log Message: Add DOMWriter.php sample_big5.xml dwtest.php Modify dom.php for including DOMWriter.php by Growbal Index: dom.php =================================================================== RCS file: /cvsroot/phpxd/phpXD/include/dom.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -r1.3 -r1.4 *** dom.php 13 Feb 2002 21:21:47 -0000 1.3 --- dom.php 3 Mar 2002 06:23:15 -0000 1.4 *************** *** 25,27 **** --- 25,28 ---- require($path."include/dom/Text.php"); require($path."include/dom/CDataSection.php"); + require($path."include/dom/DOMWriter.php"); ?> |
From: Growbal K. <gr...@us...> - 2002-03-03 06:23:47
|
Update of /cvsroot/phpxd/phpXD In directory usw-pr-cvs1:/tmp/cvs-serv8265 Modified Files: phpXD.php Log Message: Add DOMWriter.php sample_big5.xml dwtest.php Modify dom.php for including DOMWriter.php by Growbal Index: phpXD.php =================================================================== RCS file: /cvsroot/phpxd/phpXD/phpXD.php,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -r1.28 -r1.29 *** phpXD.php 13 Feb 2002 21:21:47 -0000 1.28 --- phpXD.php 3 Mar 2002 06:23:14 -0000 1.29 *************** *** 8,12 **** // Set $path to the home directory of phpXMLDOM: ! $path = "."; require($path."include/dom.php"); --- 8,12 ---- // Set $path to the home directory of phpXMLDOM: ! $path = ""; require($path."include/dom.php"); |
From: Growbal K. <gr...@us...> - 2002-03-03 06:23:24
|
Update of /cvsroot/phpxd/phpXD/samples/files In directory usw-pr-cvs1:/tmp/cvs-serv8265/samples/files Added Files: sample_big5.xml Log Message: Add DOMWriter.php sample_big5.xml dwtest.php Modify dom.php for including DOMWriter.php by Growbal --- NEW FILE: sample_big5.xml --- <?xml version="1.0"?> <hello> <introduction> <content language="English"> This is a sample document. Here are some XML features. </content> <content language="Traditional Chinese"> ³o¬OÁcÅ餤¤åXML½d¨Ò¤å¥ó </content> </introduction> <a_child attribute="value"> Hello World. </a_child> <an_empty_child /> <!-- This is a comment... --> <![CDATA[ ... and this a CDATA-Section ... ]]> <?php // ... and this a Processing-Instruction echo "PHP is cool. "; echo "PHP, »Å!"; ?> </hello> |
From: Growbal K. <gr...@us...> - 2002-03-03 06:23:22
|
Update of /cvsroot/phpxd/phpXD/samples/dwtest In directory usw-pr-cvs1:/tmp/cvs-serv8265/samples/dwtest Added Files: dwtest.php Log Message: Add DOMWriter.php sample_big5.xml dwtest.php Modify dom.php for including DOMWriter.php by Growbal --- NEW FILE: dwtest.php --- <?php // phpXMLDOM - an XML DOM Implementation // // This Software and all associated files are released unter the // GNU Public License (GPL), see LICENSE for details. // // $Id: dwtest.php,v 1.1 2002/03/03 06:23:17 growbal Exp $ /** * Sample PHP script for using DOMWriter of phpXMLDOM. * Loads the file ../files/sample_big5.xml (some content in Chinese Big5 encode) * and output it to test.xml and stdout * * you can try this by PHP excutable directly: * php -q dwtest.php * * remember put the sample file in the right path * * @package phpXD * @author Growbal Kuo <gr...@ta...> * @version $Revision: 1.1 $ */ //... define your phpXD root path here define( "PHPXD_INCLUDE_DIR", "/dev/cvs/phpXD/" ); include( PHPXD_INCLUDE_DIR . "phpXD.php" ); //... remove this line if DOMWriter.php was included by include/dom.php //require(PHPXD_INCLUDE_DIR."include/dom/DOMWriter.php"); //... XML source file $sampleFile = "../files/sample_big5.xml"; //... build a DOM Document object $parser = new DOMParser(); $document = $parser->parseFile($sampleFile, true); //... build a DOMWriter object , set the encoding $dw = new DOMWriter(); $dw->encoding = "Big5"; //... write output to file test.xml $dw->writeNode("test.xml", $document); //... write output to stdout $dw->writeNode("php://stdout", $document); //... write output to stdout echo $dw->writeToString($document); ?> |