@@ 567-571 (lines=5) @@ | ||
564 | if ($type != '' && isset($this->typemap[$this->XMLSchemaVersion][$type])) { |
|
565 | $this->debug('serialize_val: serialize xsd built-in primitive type'); |
|
566 | if (is_bool($val)) { |
|
567 | if ($type === 'boolean') { |
|
568 | $val = $val ? 'true' : 'false'; |
|
569 | } elseif (!$val) { |
|
570 | $val = 0; |
|
571 | } |
|
572 | } elseif (is_string($val)) { |
|
573 | $val = $this->expandEntities($val); |
|
574 | } |
|
@@ 592-596 (lines=5) @@ | ||
589 | switch (true) { |
|
590 | case (is_bool($val) || $type === 'boolean'): |
|
591 | $this->debug('serialize_val: serialize boolean'); |
|
592 | if ($type === 'boolean') { |
|
593 | $val = $val ? 'true' : 'false'; |
|
594 | } elseif (!$val) { |
|
595 | $val = 0; |
|
596 | } |
|
597 | if ($use === 'literal') { |
|
598 | $xml .= "<$name$xmlns$atts>$val</$name>"; |
|
599 | } else { |