This is the mail archive of the mailing list for the DocBook project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[docbook] 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"/>
<%@ 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"  %> 

that didn't work... Wrong syntax.
Tried putting it in between

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"  /> 

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="";
                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=""; 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

To unsubscribe from this list, send a post to, or visit

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]