forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "J.Pietschmann" <j3322...@yahoo.de>
Subject document v10 - v11 conversion
Date Sun, 23 Jun 2002 19:21:33 GMT
Hi,
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">
     <section>
       <xsl:apply-templates select="@*|node()"/>
     </section>
   </xsl:template>

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


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">
     <ul>
       <xsl:apply-templates select="@*|node()"/>
     </ul>
   </xsl:template>


Have fun!

J.Pietschmann


Mime
View raw message