|
xml+xsl+DOMDocument
|
|||
---|---|---|---|
#18+
Доброго всем времени! Есть страница на php. Есть несколько xml, и xsl Заголовки у них одинаковы $xmlf='<?xml version="1.0" encoding="windows-1251"?>....'; $xsltemplate='<?xml version="1.0" encoding="windows-1251"?> <!DOCTYPE xsl:stylesheet> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output xmlns="http://www.w3.org/TR/xhtml1/strict" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" encoding="Windows-1251" indent="yes" method="html" omit-xml-declaration="no" cdata-section-elements="body" version="1.0" media-type="text/xml"/>...'; в страницу вставляю в произвольных местах с использованием: $xml = new DOMDocument; $xml->LoadXML($xmlf); $xsl = new DOMDocument; $xsl->LoadXML($xsltemplate); $xlsproc = new XSLTProcessor(); $xlsproc->importStylesheet($xsl); echo $xlsproc->transformToXML($xml); Все обрабатывается хорошо но в HTML перед каждым вставленным блоком добавляется строка: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"> как от этого избавиться? Спасибо! ... |
|||
:
Нравится:
Не нравится:
|
|||
18.11.2008, 13:05 |
|
xml+xsl+DOMDocument
|
|||
---|---|---|---|
#18+
убрать doctype-public ... |
|||
:
Нравится:
Не нравится:
|
|||
18.11.2008, 15:55 |
|
xml+xsl+DOMDocument
|
|||
---|---|---|---|
#18+
оставить только там, где генерится элемент html, для промежуточных узлов doctype убрать. ... |
|||
:
Нравится:
Не нравится:
|
|||
18.11.2008, 15:57 |
|
xml+xsl+DOMDocument
|
|||
---|---|---|---|
#18+
Да и наверно вместо XHTML 1.0 Strict лучше на XHTML 1.1 перейти. ... |
|||
:
Нравится:
Не нравится:
|
|||
18.11.2008, 15:58 |
|
|
start [/forum/topic.php?fid=14&msg=35660226&tid=1333727]: |
0ms |
get settings: |
11ms |
get forum list: |
15ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
36ms |
get topic data: |
9ms |
get forum data: |
2ms |
get page messages: |
42ms |
get tp. blocked users: |
1ms |
others: | 324ms |
total: | 448ms |
0 / 0 |