mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 16:48:49 +01:00
Replace extra XML declaration
This commit is contained in:
parent
ec5b162bfa
commit
005b483487
@ -348,7 +348,6 @@ abstract class bo_merge
|
||||
{
|
||||
$mso_application_progid = '';
|
||||
}
|
||||
|
||||
// Tags we can replace with the target document's version
|
||||
$replace_tags = array();
|
||||
switch($mimetype.$mso_application_progid)
|
||||
@ -402,6 +401,15 @@ abstract class bo_merge
|
||||
{
|
||||
$element = new SimpleXMLelement($content);
|
||||
$content = $xslt->transformToXml($element);
|
||||
|
||||
// Word 2003 needs invalid XML, add back in
|
||||
if($mimetype == 'application/xml' && $mso_application_progid == 'Word.Document') {
|
||||
$content = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'.$content;
|
||||
}
|
||||
// Validate
|
||||
$doc = new DOMDocument();
|
||||
// $doc->loadXML($content);
|
||||
// $doc->schemaValidate('/home/nathan/Downloads/WordprocessingML Schemas/wordnet.xsd');
|
||||
//echo $content;die();
|
||||
}
|
||||
catch (Exception $e)
|
||||
|
Loading…
Reference in New Issue
Block a user