|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
footnote/para/programlisting -> invalid XHTMLHi,
Don't really know what to do with this so I'll post it here. Please bear with me. I have a problem with how the XSL stylesheets (nwalsh) transform footnote/para/programlisting to XHTML. xsltproc, make.valid.html=1, html.cleanup=1 Output: <div class="footnote"><p> ... <pre class="programlisting"> <pre> inside <p> is invalid XHTML. I fixed it by modifying the template which matches "footnote/para[1]|footnote/simpara[1]" (in footnote.xsl) to call the "paragraph" template (in block.xsl) which then calls "unwrap.p" -- just as the template which matches "para" (in block.xsl) does. <xsl:template match="footnote/para[1]|footnote/simpara[1]" priority="2"> <!-- this only works if the first thing in a footnote is a para, --> <!-- which is ok, because it usually is. --> <xsl:variable name="name"> <xsl:text>ftn.</xsl:text> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="ancestor::footnote"/> </xsl:call-template> </xsl:variable> <xsl:variable name="href"> <xsl:text>#</xsl:text> <xsl:call-template name="object.id"> <xsl:with-param name="object" select="ancestor::footnote"/> </xsl:call-template> </xsl:variable> <!-- - - - - - - - - - - - - - - - - - - - - ORIGINAL { - - - - --> <!--<![CDATA[ <p> <xsl:if test="@role and $para.propagates.style != 0"> <xsl:apply-templates select="." mode="class.attribute"> <xsl:with-param name="class" select="@role"/> </xsl:apply-templates> </xsl:if> <sup> <xsl:text>[</xsl:text> <a id="{$name}" href="{$href}"> <xsl:apply-templates select="." mode="class.attribute"/> <xsl:apply-templates select="ancestor::footnote" mode="footnote.number"/> </a> <xsl:text>] </xsl:text> </sup> <xsl:apply-templates/> </p> ]]>--> <!-- - - - - - - - - - - - - - - - - - - - - ORIGINAL } - - - - --> <!-- - - - - - - - - - - - - - - - - - - - - NEW { - - - - --> <xsl:call-template name="paragraph"> <xsl:with-param name="class"> <xsl:if test="@role and $para.propagates.style != 0"> <xsl:value-of select="@role"/> </xsl:if> </xsl:with-param> <xsl:with-param name="content"> <sup> <xsl:text>[</xsl:text> <a id="{$name}" href="{$href}"> <xsl:apply-templates select="." mode="class.attribute"/> <xsl:apply-templates select="ancestor::footnote" mode="footnote.number"/> </a> <xsl:text>] </xsl:text> </sup> <xsl:apply-templates/> </xsl:with-param> </xsl:call-template> <!-- - - - - - - - - - - - - - - - - - - - - NEW } - - - - --> </xsl:template> Philipp Kempgen -- AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied -> http://www.amooma.de Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998 Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de Videos of the AMOOCON VoIP conference 2009 -> http://www.amoocon.de -- --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@... For additional commands, e-mail: docbook-apps-help@... |
|
|
Re: footnote/para/programlisting -> invalid XHTMLOn Sun, Jun 7, 2009 at 11:20 AM, Philipp
Kempgen<philipp.kempgen@...> wrote: > Don't really know what to do with this so I'll post it here. > Please bear with me. Thanks for the bug report. Formally, http://sourceforge.net/tracker/?atid=373747&group_id=21935&func=browse is the bug tracker. > I have a problem with how the XSL stylesheets (nwalsh) transform > footnote/para/programlisting to XHTML. Which version of the stylesheets are you using? 1.74.3? 1.75.1? > xsltproc, make.valid.html=1, html.cleanup=1 Are you using the xhtml/ or xhtml-1_1/ targets or html/? > Output: > <div class="footnote"><p> ... <pre class="programlisting"> > <pre> inside <p> is invalid XHTML. Would you mind including the DocBook that generated that XHTML? > I fixed it by modifying the template which matches > "footnote/para[1]|footnote/simpara[1]" (in footnote.xsl) to call > the "paragraph" template (in block.xsl) which then calls "unwrap.p" > -- just as the template which matches "para" (in block.xsl) does. Are you familiar with the diff command? That might be a clearer way to specify your changes. $ cp footnote.xsl footnote.before.xsl # Make your edits to footenote.xsl $ diff footnote.before.xsl footnote.xsl Thanks, Keith --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@... For additional commands, e-mail: docbook-apps-help@... |
|
|
Re: footnote/para/programlisting -> invalid XHTMLKeith Fahlgren schrieb:
> On Sun, Jun 7, 2009 at 11:20 AM, Philipp > Kempgen<philipp.kempgen@...> wrote: >> Don't really know what to do with this so I'll post it here. >> Please bear with me. > > Thanks for the bug report. Formally, > http://sourceforge.net/tracker/?atid=373747&group_id=21935&func=browse > is the bug tracker. Ok, I have reported a bug: https://sourceforge.net/tracker/?func=detail&aid=2803739&group_id=21935&atid=373747 > Which version of the stylesheets are you using? 1.74.3? 1.75.1? 1.75.1 > Are you using the xhtml/ or xhtml-1_1/ targets or html/? xhtml > Would you mind including the DocBook that generated that XHTML? I have attached a test case. >> I fixed it by modifying the template which matches >> "footnote/para[1]|footnote/simpara[1]" (in footnote.xsl) to call >> the "paragraph" template (in block.xsl) which then calls "unwrap.p" >> -- just as the template which matches "para" (in block.xsl) does. > > Are you familiar with the diff command? Sure. I have attached a patch to the bug report. Philipp Kempgen -- AMOOMA GmbH - Bachstr. 126 - 56566 Neuwied -> http://www.amooma.de Geschäftsführer: Stefan Wintermeyer, Handelsregister: Neuwied B14998 Asterisk: http://the-asterisk-book.com - http://das-asterisk-buch.de Videos of the AMOOCON VoIP conference 2009 -> http://www.amoocon.de -- --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@... For additional commands, e-mail: docbook-apps-help@... |
| Free embeddable forum powered by Nabble | Forum Help |