[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] DocBook 5.0 XSLT Customisation: runtime error: file /usr/share/sgml/docbook/xsl-stylesheets-db5-1.73.2/common/l10n.xsl line 140 element attribute
Hi Mr. Stayton! On Fri, Aug 22, 2008 at 11:11 PM, Bob Stayton <bobs@sagehill.net> wrote: > Hi Shlomi, > The template named language.attribute generates an xsl:attribute element, > and it must appear just after an output element's start tag. The problem is > that in your custom template, you are calling that template and generating > an attribute but you have not started an output element yet. The <p> > element to which you want to attach the attribute is generated by the > template named "paragraph", which you call after language.attribute. Perhaps > instead of customizing d:para, you should customize the template named > "paragraph". > Thanks! That seems to have done the trick. Now the custom.xsl is working. Regards, Shlomi Fish > Bob Stayton > Sagehill Enterprises > bobs@sagehill.net > > > ----- Original Message ----- From: "Shlomi Fish" <shlomif@gmail.com> > To: <docbook-apps@lists.oasis-open.org> > Sent: Friday, August 22, 2008 3:39 AM > Subject: [docbook-apps] DocBook 5.0 XSLT Customisation: runtime error: file > /usr/share/sgml/docbook/xsl-stylesheets-db5-1.73.2/common/l10n.xsl line 140 > element attribute > > >> Hi all! >> >> I'm trying to use the custom.xsl here: >> >> >> https://svn.berlios.de/svnroot/repos/web-cpan/doc-Hebrew-HTML-Tutorial/trunk/hebrew-html-tutorial/ >> >> (You can use the "svn checkout" to checkout it.) >> >> What it's trying to do is to propagate xml:lang into various elements >> that I'm using and require it. >> >> I'm using the command (also in the makefile): >> >> {{{{{{{ >> xsltproc --path >> /usr/share/sgml/docbook/xsl-stylesheets-db5-1.73.2/xhtml -o >> hebrew-html-tutorial/index.html custom.xsl hebrew-html-tutorial.xml >> }}}}}}} >> >> And I'm getting the following errors: >> >> {{{{{{{{{{{{{ >> runtime error: file >> /usr/share/sgml/docbook/xsl-stylesheets-db5-1.73.2/common/l10n.xsl >> line 140 element attribute >> xsl:attribute: Cannot add attributes to an element if children have >> been already added to the element. >> runtime error: file >> /usr/share/sgml/docbook/xsl-stylesheets-db5-1.73.2/common/l10n.xsl >> line 140 element attribute >> xsl:attribute: Cannot add attributes to an element if children have >> been already added to the element. >> runtime error: file >> /usr/share/sgml/docbook/xsl-stylesheets-db5-1.73.2/common/l10n.xsl >> line 140 element attribute >> xsl:attribute: Cannot add attributes to an element if children have >> been already added to the element. >> runtime error: file >> /usr/share/sgml/docbook/xsl-stylesheets-db5-1.73.2/common/l10n.xsl >> line 140 element attribute >> xsl:attribute: Cannot add attributes to an element if children have >> been already added to the element. >> runtime error: file >> /usr/share/sgml/docbook/xsl-stylesheets-db5-1.73.2/common/l10n.xsl >> line 140 element attribute >> xsl:attribute: Cannot add attributes to an element if children have >> been already added to the element. >> runtime error: file >> /usr/share/sgml/docbook/xsl-stylesheets-db5-1.73.2/common/l10n.xsl >> line 140 element attribute >> xsl:attribute: Cannot add attributes to an element if children have >> been already added to the element. >> error: file hebrew-html-tutorial.xml >> xsltRunStylesheet : run failed >> }}}}}}}}}}}}} >> >> Now custom.xsl contains the following customisation: >> >> {{{{{{{{{{ >> <xsl:template match="d:para"> >> <xsl:call-template name="language.attribute" /> >> <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"> >> <xsl:if test="position() = 1 and parent::d:listitem"> >> <xsl:call-template name="anchor"> >> <xsl:with-param name="node" select="parent::d:listitem"/> >> </xsl:call-template> >> </xsl:if> >> >> <xsl:call-template name="anchor"/> >> <xsl:apply-templates/> >> </xsl:with-param> >> </xsl:call-template> >> </xsl:template> >> }}}}}}}}}} >> >> When I remove the <xsl:call-template name="language.attribute" /> the >> problem disappears but naturally then I don't have xml:lang propagated >> which is what I want. >> >> The .xml validates according to {{ xmllint --relaxng ~/docbook.rng >> hebrew-html-tutorial.xml }}. >> >> Regards, >> >> Shlomi Fish >> >> ------------------------------------------ >> Shlomi Fish http://www.shlomifish.org/ >> >> Electrical Engineering studies. In the Technion. Been there. Done >> that. Forgot a lot. Remember too much. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org >> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org >> >> >> > > -- ------------------------------------------ Shlomi Fish http://www.shlomifish.org/ Electrical Engineering studies. In the Technion. Been there. Done that. Forgot a lot. Remember too much.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]