<! 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 > Article with comments </ title > <br> < meta http-equiv ="Content-Type" content ="text/html; charset=utf-8" /> <br> < link href ="?style:article/version:666" type ="text/css" rel ="stylesheet" /> <br> < script src ="?script:article/version:333" type ="text/javascript" ></ script > <br> </ head > <br> < body > <br> < section src ="?article:right.cache/content/version:123" srctype ="text/xml" > <br> < a href ="?article:right.cache/content/version:123" > article content </ a > <br> </ section > <br> < section src ="?article:right.cache/comments/time:2010-12-01" srctype ="text/xml" > <br> < a href ="?article:right.cache/comments/time:2010-12-01" > article comments </ a > <br> </ section > <br> < section src ="?live/time:2010-12-01" srctype ="text/xml" > <br> < a href ="?live/time:2010-12-01" > live content </ a > <br> </ section > <br> </ body > <br> </ html > <br> </ t:template > <br> </ t:stylesheet >
<! 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 name ="content" > <br> < html > <br> < head > <br> < title > Article content </ title > <br> < meta http-equiv ="Content-Type" content ="text/html; charset=utf-8" /> <br> </ head > <br> < body > <br> < h > Article content </ h > <br> </ body > <br> </ html > <br> </ t:template > <br> < t:template match =" / " > <br> < t:element name ="meta" > <br> < t:attribute name ="http-equiv" > refresh </ attribute > <br> < t:attribute name ="content" > 0;url=?article:right.cache </ attribute > <br> </ t:element > <br> </ t:template > <br> </ t:stylesheet >
Source: https://habr.com/ru/post/90481/
All Articles