[Home] [By Thread] [By Date] [Recent Entries]
Hi John,
If you use the text output method then you need to emit the tags as text to the output that means you need to escape < to < and instead of <html> for instance write <html>. In XSLT 2.0 you can use character maps, for instance <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:character-map name="percentAt"> <xsl:output-character character="#" string="<%"/> <xsl:output-character character=">" string=">"/> </xsl:character-map> <xsl:output method="xml" use-character-maps="percentAt"/> <xsl:template match="/"> #@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <test></test> </xsl:template> </xsl:stylesheet> will give: <?xml version="1.0" encoding="UTF-8"?> <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <test/> Of course you can emit that to the output if you use disable output escaping in XSLT 1.0, but that is not recommended in general, only as the last possible solution: <xsl:text disable-output-escaping="yes"><%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %></xsl:text> Best Regards, George --------------------------------------------------------------------- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com John Burgess wrote: I'm trying to transform an XML file that describes a database schema into a set of jsf files to display the data.
|

Cart



