OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: 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.


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]