<! DOCTYPE html > <br> < html > <br> < head > <br> < title > Xbrowser HTML includes </ title > <br> < meta http-equiv ="Content-Type" content ="text/html; charset=utf-8" /> <br> </ head > <br> < body > <br> < h1 > First file </ h1 > <br> </ body > <br> </ html >
new function (){<br> var frame= window.frameElement<br> if ( !frame ) return <br> var parent= frame.parentNode<br> var body= document .getElementsByTagName( 'body' )[0]<br> var child;<br> while ( child= body.firstChild ) parent.insertBefore( child, frame )<br> parent.removeChild( frame )<br>}
<! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 2.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml2.dtd" > <br> < html > <br> < head > <br> < title > Xbrowser HTML includes </ title > <br> < meta http-equiv ="Content-Type" content ="text/html; charset=utf-8" /> <br> </ head > <br> < body > <br> < h1 > Second file </ h1 > <br> < div src ="index1.xml" srctype ="text/xml" > <br> < a href ="index1.xml" > link 2 first file </ a > <br> </ div > <br> </ body > <br> </ html >
<! DOCTYPE t:stylesheet [ <! ATTLIST t:stylesheet id ID # REQUIRED > ] > <br> <? xml-stylesheet type ="text/xsl" href ="#t:stylesheet" ? > <br> < t:stylesheet id ="t:stylesheet" version ="1.0" xmlns:t ="http://www.w3.org/1999/XSL/Transform" > <br> < t:output method ="html" doctype-public ="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system ="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" /> <br> < t:template match =" @* | node() " > <br> < t:copy > <br> < t:apply-templates select =" @* | node() " /> <br> </ t:copy > <br> </ t:template > <br> < t:template match =" / " > <br> < t:apply-templates select =" document( '#t:stylesheet' )//html " /> <br> </ t:template > <br> < t:template name ="content" > <br> < html > <br> < head > <br> < title > Xbrowser HTML includes </ title > <br> < meta http-equiv ="Content-Type" content ="text/html; charset=utf-8" /> <br> </ head > <br> < body > <br> < h1 > Second file </ h1 > <br> < div src ="index1.htm" srctype ="text/xml" > <br> < a href ="index1.htm" > link 2 first file </ a > <br> </ div > <br> </ body > <br> </ html > <br> </ t:template > <br> </ t:stylesheet >
< t:template match =" *[ @src and contains( @srctype, 'xml' ) ] " > <br> < t:copy > <br> < t:apply-templates select =" @* " /> <br> < t:apply-templates select =' document( @src )//html/body/* ' /> <br> </ t:copy > <br> </ t:template >
<! DOCTYPE t:stylesheet [ <! ATTLIST t:stylesheet id ID # REQUIRED > ] > <br> <? xml-stylesheet type ="text/xsl" href ="#t:stylesheet" ? > <br> < t:stylesheet id ="t:stylesheet" version ="1.0" xmlns:t ="http://www.w3.org/1999/XSL/Transform" > <br> < t:output doctype-public ="-//W3C//DTD XHTML 2.0//EN" doctype-system ="http://www.w3.org/MarkUp/DTD/xhtml2.dtd" /> <br> < t:template match =" @* | node() " > <br> < t:copy > <br> < t:apply-templates select =" @* | node() " /> <br> </ t:copy > <br> </ t:template > <br> < t:template match =" *[ @src and contains( @srctype, 'xml' ) ] " > <br> < t:copy > <br> < t:apply-templates select =" @* " /> <br> < t:apply-templates select =' document( @src )//html/body/* ' /> <br> </ t:copy > <br> </ t:template > <br> < t:template match =" / " > <br> < t:apply-templates select =" document( '#t:stylesheet' )//html " /> <br> </ t:template > <br> < t:template name ="content" > <br> < html > <br> < head > <br> < title > Xbrowser HTML includes </ title > <br> < meta http-equiv ="Content-Type" content ="text/html; charset=utf-8" /> <br> </ head > <br> < body > <br> < h1 > Third file </ h1 > <br> < div src ="index2.xml" srctype ="text/xml" > <br> < a href ="index2.xml" > link 2 second file </ a > <br> </ div > <br> </ body > <br> </ html > <br> </ t:template > <br> </ t:stylesheet >
Source: https://habr.com/ru/post/90373/
All Articles