<?xml version="1.0" encoding="ISO-8859-2" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> <xsl:apply-templates/> </xsl:template> <xsl:template match="content"> <html> <head> <title><xsl:value-of select="title"/></title> </head> <body> <xsl:value-of select="pageContent"/> </body> </html> </xsl:template> </xsl:stylesheet>
index.xml:
<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet href="index.xsl" type="text/xsl"?> <content> <title>Test</title> <pageContent>tresc <b>Pogrubione</b> </pageContent> </content>
Chodzi o to aby zawartość spomiędzy tagów <pageContent></pageContent> wyświetlić umożiwiając działanie tagów HTML w tejże zawartości (żeby <b>Pogrubione</b> zostało zamienione na Pogrubione). Czy to jest wogóle możliwe? Jeżeli nie, to w jaki sposób mogę wyświetlić sformatowany tekst z tagów xml poprzez xsl?