Demoseite Update

This commit is contained in:
Andreas Österreicher
2010-04-26 14:24:05 +00:00
parent 83412c9457
commit 2d21d9826b
15 changed files with 342 additions and 307 deletions
+17 -17
View File
@@ -158,15 +158,15 @@ class XML_HTMLSax3_StateParser {
*/
function XML_HTMLSax3_StateParser (& $htmlsax) {
$this->htmlsax = & $htmlsax;
$this->State[XML_HTMLSAX3_STATE_START] =& new XML_HTMLSax3_StartingState();
$this->State[XML_HTMLSAX3_STATE_START] = new XML_HTMLSax3_StartingState();
$this->State[XML_HTMLSAX3_STATE_CLOSING_TAG] =& new XML_HTMLSax3_ClosingTagState();
$this->State[XML_HTMLSAX3_STATE_TAG] =& new XML_HTMLSax3_TagState();
$this->State[XML_HTMLSAX3_STATE_OPENING_TAG] =& new XML_HTMLSax3_OpeningTagState();
$this->State[XML_HTMLSAX3_STATE_CLOSING_TAG] = new XML_HTMLSax3_ClosingTagState();
$this->State[XML_HTMLSAX3_STATE_TAG] = new XML_HTMLSax3_TagState();
$this->State[XML_HTMLSAX3_STATE_OPENING_TAG] = new XML_HTMLSax3_OpeningTagState();
$this->State[XML_HTMLSAX3_STATE_PI] =& new XML_HTMLSax3_PiState();
$this->State[XML_HTMLSAX3_STATE_JASP] =& new XML_HTMLSax3_JaspState();
$this->State[XML_HTMLSAX3_STATE_ESCAPE] =& new XML_HTMLSax3_EscapeState();
$this->State[XML_HTMLSAX3_STATE_PI] = new XML_HTMLSax3_PiState();
$this->State[XML_HTMLSAX3_STATE_JASP] = new XML_HTMLSax3_JaspState();
$this->State[XML_HTMLSAX3_STATE_ESCAPE] = new XML_HTMLSax3_EscapeState();
}
/**
@@ -241,14 +241,14 @@ class XML_HTMLSax3_StateParser {
*/
function parse($data) {
if ($this->parser_options['XML_OPTION_TRIM_DATA_NODES']==1) {
$decorator =& new XML_HTMLSax3_Trim(
$decorator = new XML_HTMLSax3_Trim(
$this->handler_object_data,
$this->handler_method_data);
$this->handler_object_data =& $decorator;
$this->handler_method_data = 'trimData';
}
if ($this->parser_options['XML_OPTION_CASE_FOLDING']==1) {
$open_decor =& new XML_HTMLSax3_CaseFolding(
$open_decor = new XML_HTMLSax3_CaseFolding(
$this->handler_object_element,
$this->handler_method_opening,
$this->handler_method_closing);
@@ -257,28 +257,28 @@ class XML_HTMLSax3_StateParser {
$this->handler_method_closing ='foldClose';
}
if ($this->parser_options['XML_OPTION_LINEFEED_BREAK']==1) {
$decorator =& new XML_HTMLSax3_Linefeed(
$decorator = new XML_HTMLSax3_Linefeed(
$this->handler_object_data,
$this->handler_method_data);
$this->handler_object_data =& $decorator;
$this->handler_method_data = 'breakData';
}
if ($this->parser_options['XML_OPTION_TAB_BREAK']==1) {
$decorator =& new XML_HTMLSax3_Tab(
$decorator = new XML_HTMLSax3_Tab(
$this->handler_object_data,
$this->handler_method_data);
$this->handler_object_data =& $decorator;
$this->handler_method_data = 'breakData';
}
if ($this->parser_options['XML_OPTION_ENTITIES_UNPARSED']==1) {
$decorator =& new XML_HTMLSax3_Entities_Unparsed(
$decorator = new XML_HTMLSax3_Entities_Unparsed(
$this->handler_object_data,
$this->handler_method_data);
$this->handler_object_data =& $decorator;
$this->handler_method_data = 'breakData';
}
if ($this->parser_options['XML_OPTION_ENTITIES_PARSED']==1) {
$decorator =& new XML_HTMLSax3_Entities_Parsed(
$decorator = new XML_HTMLSax3_Entities_Parsed(
$this->handler_object_data,
$this->handler_method_data);
$this->handler_object_data =& $decorator;
@@ -286,7 +286,7 @@ class XML_HTMLSax3_StateParser {
}
// Note switched on by default
if ($this->parser_options['XML_OPTION_STRIP_ESCAPES']==1) {
$decorator =& new XML_HTMLSax3_Escape_Stripper(
$decorator = new XML_HTMLSax3_Escape_Stripper(
$this->handler_object_escape,
$this->handler_method_escape);
$this->handler_object_escape =& $decorator;
@@ -483,11 +483,11 @@ class XML_HTMLSax3 {
*/
function XML_HTMLSax3() {
if (version_compare(phpversion(), '4.3', 'ge')) {
$this->state_parser =& new XML_HTMLSax3_StateParser_Gtet430($this);
$this->state_parser = new XML_HTMLSax3_StateParser_Gtet430($this);
} else {
$this->state_parser =& new XML_HTMLSax3_StateParser_Lt430($this);
$this->state_parser = new XML_HTMLSax3_StateParser_Lt430($this);
}
$nullhandler =& new XML_HTMLSax3_NullHandler();
$nullhandler = new XML_HTMLSax3_NullHandler();
$this->set_object($nullhandler);
$this->set_element_handler('DoNothing', 'DoNothing');
$this->set_data_handler('DoNothing');