forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.Pietschmann" <>
Subject document v10 - v11 conversion
Date Sun, 23 Jun 2002 19:21:33 GMT
the s1|s2... template is broken in docv10todocv11.xsl.
Saxon complained
  Error at xsl:copy-of on line 65 of ...docv10todocv11.xsl:
   Cannot write an attribute when there is no open start tag
Guys, what tools are you using?

Furthermore, if there is no title, an empty title element
will be created, and if there is a title, it will also be
copied as an attribute. The for-each is redundant.

I suggest something like this:
   <xsl:template match="s1 | s2 | s3 | s4">
       <xsl:apply-templates select="@*|node()"/>

   <xsl:template match="@title">
     <title><xsl:value-of select="."/></title>

Furthermore I'd use xsl:apply-templates instead of
xsl:value-of in the tempaltes for connect and link/@idref
in order to preserve markup which might be present.

The template for sl could be shortened too:
   <xsl:template match="sl">
       <xsl:apply-templates select="@*|node()"/>

Have fun!


View raw message