[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Generating JSPs from Docbook/XSLT
I'm learning Jboss/JSP, and trying to generate a jsp version of a docbook from a customization XSLT layer so I can turn my HTML book into a more dynamic application. I want my chunk files to include a .jsp file at the top which would be like a main menu. So I changed the parameter in the chunk.xsl so it's generating files with a JSP extension. The way to include JSP pages from other JSP pages is with two possible syntaxes: <jsp:include page="filename.jsp"/> or <%@ include file="/header.html" %> So I went into the XSLT customization layer, and added a template that looks like this: <xsl:template name="user.header.content"> <%@ include file="/header.html" %> </xsl:template> that didn't work... Wrong syntax. Tried putting it in between <xsl:text> tags but then it prints out the <> as literals. So then I tried using the XML syntax... <xsl:template name="user.header.content"> <jsp:include page="../index.jsp" /> </xsl:template> xsltproc didn't recognize it as a tag, and chopped off the jsp: in the html output, so that looks like this: <include page="../index.jsp" > </include> obviously I need some kind of namespace. But which one? I tried importing a jsp namespace at the top of my stylesheet. I thought the below namespace was the correct one to use, because it's used in a bunch of other JSP books: <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/TR/xhtml1/transitional" version='1.0' xmlns:jsp="http://java.sun.com/jsp_1_2" exclude-result-prefixes="#default" > But jboss doesn't like that. It complains: The attribute prefix xmlns does not correspond to any imported tag library And what it's complaining about is this line: <jsp:include xmlns:jsp="http://java.sun.com/jsp_1_2" page="../header.jsp"> It seems XSLT proc inserts this XMLNS attribute into the JSP:include tag. It's unnecessary, since the namespace is already imported. How do I tell XSLT not to put that attribute into its output? Or is there something simple that I am missing here? -- S. Alan Ezust Ottawa, Ontario, Canada http://cartan.cas.suffolk.edu/~sae
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]