Subject: Re: [xsl] XHTML html validation From: John Steel <john.steel@xxxxxxxxxxxxxxx> Date: Fri, 16 Feb 2007 22:18:27 +0000 |
I think it would help to separate the problems of generating correct XHTML and delivering it to the browser. Small but complete sample input XML and simplified but complete stylesheet would be useful for the generating correct XHTML part.Thank you, and I apologize for the length of this reply but have simplified it to a smaller working example. I'm using resin 3.0.21 and to kick it off must load a jsp in my browser, I called it dev.jsp:
<%@ page contentType='x-application/xslt' %> <?xml-stylesheet href='xslt/dev.xsl'?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <body> <table>
<faqlist> <faq> <question> Question One? </question> <answer> Answer One. </answer> </faq>
<faq> <question> Question Two? </question> <answer> Answer Two. </answer> </faq>
</table> </body> </html>
<xsl:template match='faqlist'> <xsl:apply-templates select="*[local-name() != 'faq']" /> <xsl:apply-templates select="faq" mode="question" /> <xsl:apply-templates select="faq" mode="answer" /> </xsl:template>
<xsl:template match='faq' mode="answer"> <tr> <td width='1%'> </td> <td width='24' class="mText" style="font-size: 11px" >   </td> <td class="mText" style="font-size: 11px" align='left'> <xsl:copy-of select='answer' /> <br/> <br/> </td> </tr> </xsl:template>
<xsl:template match='*|@*'> <xsl:copy> <xsl:apply-templates select='node()|@*' /> </xsl:copy> </xsl:template>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
Answer One. </answer>
-- -------------------------- http://www.phonewebcam.com john.steel@xxxxxxxxxxxxxxx
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XHTML html validation, Owen Rees | Thread | Re: [xsl] XHTML html validation, Abel Braaksma |
Re: [xsl] Functional Programming, ", M. David Peterson | Date | Re: [xsl] XHTML html validation, Abel Braaksma |
Month |